:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --bg: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #10b981;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 8rem 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Navbar - Desktop Default */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-light);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Components */
.card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background: var(--primary);
    transform: scale(1.02);
}

input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    transition: var(--transition);
}

/* Mobile Critical Overrides - Ensuring display: none is the default for mobile nav links */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 3rem;
        transition: right 0.4s ease;
        border-left: 1px solid var(--glass-border);
        z-index: 1001;
    }

    .nav-links.active {
        display: flex;
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1002;
    }

    /* Hero & Content adjustments for mobile */
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-grid,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }
}

/* Shared Sections */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(30, 58, 138, 0.3) 0%, transparent 70%);
}

.hero h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.info-label {
    color: var(--text-dim);
    min-width: 120px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1rem;
}

footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-dim);
}

.icp {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-light);
    color: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Registration Specific Styles */
.gender-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.gender-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.gender-option input {
    display: none;
}

.gender-option span {
    display: block;
    padding: 0.8rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-dim);
    transition: var(--transition);
}

.gender-option input:checked+span {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#reg-fields,
#reg-confirm {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logout-btn {
    font-weight: 500;
    transition: var(--transition);
}

.logout-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.order-modal {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .order-modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text);
}

.order-items {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.pay-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    color: var(--text-dim);
}

.pay-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.pay-btn.selected {
    border-color: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.qr-section {
    text-align: center;
    padding: 1rem;
    display: none;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    background: white;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-weight: bold;
}

.qr-placeholder img {
    max-width: 100%;
}

.qr-section.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Address Form */
.address-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.address-form .input-group {
    margin-bottom: 1rem;
}

.address-form .input-group:last-child {
    margin-bottom: 0;
}

.address-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.address-form input,
.address-form textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}

.address-form input:focus,
.address-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
}

.address-form textarea {
    resize: none;
}