/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 68px;
    gap: 40px;
}

/* Logo */
.navbar-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.8px;
    transition: transform 0.2s ease;
}

.logo-text:hover {
    transform: scale(1.02);
}

.logo-domain {
    background: linear-gradient(135deg, #f97316, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Menu */
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    flex: 1;
}

.navbar-item {
    position: relative;
}

.navbar-link {
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 550;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.navbar-link:hover {
    color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.dropdown-icon {
    font-size: 9px;
    transition: transform 0.25s ease;
    opacity: 0.5;
}

/* Dropdown */
.navbar-item.dropdown.active .dropdown-menu {
    display: block;
    animation: dropdownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-item.dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.navbar-item.dropdown.active > .navbar-link {
    color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(241, 245, 249, 0.9);
    border-radius: 14px;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dropdown-menu li { margin: 0; }

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    transform: translateX(2px);
}

/* Submenu Styling */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(241, 245, 249, 0.9);
    border-radius: 12px;
    min-width: 170px;
    list-style: none;
    margin: 0;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-left: 6px;
    z-index: 1001;
}

.dropdown-submenu.active > .submenu {
    display: block;
    animation: submenuFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-submenu.active > a {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #f97316;
}

.dropdown-submenu.active > a .dropdown-icon {
    transform: rotate(90deg);
}

@keyframes submenuFade {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.submenu a {
    display: block;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.submenu a:hover {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    transform: translateX(2px);
}

/* Action Buttons */
.navbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.btn {
    padding: 9px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-login {
    color: #475569;
    background-color: transparent;
    border: 1.5px solid #e2e8f0;
}

.btn-login:hover {
    border-color: #f97316;
    color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.btn-register {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}

.btn-register:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

/* Mobile Toggle - hidden by default */
.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
}

.navbar-toggle span {
    width: 24px;
    height: 2.5px;
    background-color: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
}

/* ===== MOBILE OVERLAY MENU ===== */
.mobile-overlay {
    display: none; /* Hidden on desktop */
}

/* ===== Desktop Responsive ===== */
@media (max-width: 1024px) {
    .navbar-menu { gap: 0; }
    .navbar-link { padding: 8px 10px; font-size: 13px; }
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    /* Hide desktop nav elements on mobile */
    .navbar-container { height: 56px; padding: 0 16px; gap: 0; }
    .navbar-menu { display: none !important; }
    .navbar-actions { display: none !important; }
    .navbar-toggle { display: none !important; }

    .logo-text { font-size: 20px; }

    /* Add bottom padding to body for bottom nav */
    body { padding-bottom: 72px; }

    /* ===== BOTTOM NAV BAR ===== */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(241,245,249,0.8);
        box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #94a3b8;
        font-size: 10.5px;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 12px;
        transition: all 0.25s ease;
        background: none;
        border: none;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        -webkit-tap-highlight-color: transparent;
        min-width: 56px;
    }

    .bottom-nav-item.active {
        color: #f97316;
    }

    .bottom-nav-icon {
        font-size: 22px;
        line-height: 1;
        transition: transform 0.2s ease;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        transform: scale(1.15);
    }

    .bottom-nav-item:active {
        transform: scale(0.92);
    }

    /* ===== FULL-SCREEN OVERLAY MENU ===== */
    .mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: #ffffff;
        z-index: 10000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
    }

    .mobile-overlay.active {
        transform: translateY(0);
        opacity: 1;
    }

    .mobile-overlay-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid #f1f5f9;
        position: sticky;
        top: 0;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(12px);
        z-index: 10;
    }

    .mobile-overlay-title {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        letter-spacing: -0.3px;
    }

    .mobile-overlay-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: #f1f5f9;
        color: #475569;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-overlay-close:active {
        background: #e2e8f0;
        transform: scale(0.9);
    }

    .mobile-overlay-content {
        padding: 20px;
        padding-bottom: 100px;
    }

    /* Quick Actions Grid */
    .mobile-quick-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-bottom: 28px;
    }

    .mobile-quick-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: #334155;
        font-size: 12.5px;
        font-weight: 650;
        padding: 16px 8px;
        border-radius: 16px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-quick-item:active {
        transform: scale(0.95);
        background: #f1f5f9;
    }

    .mobile-quick-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* Section */
    .mobile-section {
        margin-bottom: 24px;
    }

    .mobile-section-title {
        font-size: 15px;
        font-weight: 800;
        color: #0f172a;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #f1f5f9;
        letter-spacing: -0.2px;
    }

    /* List Items */
    .mobile-list {
        display: flex;
        flex-direction: column;
    }

    .mobile-list-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        text-decoration: none;
        color: #475569;
        font-size: 14.5px;
        font-weight: 550;
        border-radius: 12px;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-list-item:active {
        background: #f8fafc;
    }

    .mobile-arrow {
        color: #cbd5e1;
        font-size: 20px;
        font-weight: 300;
    }

    /* Auth Buttons */
    .mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
        padding-top: 24px;
        border-top: 1px solid #f1f5f9;
    }

    .mobile-auth-btn {
        display: block;
        text-align: center;
        padding: 15px;
        border-radius: 14px;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-auth-login {
        color: #475569;
        background: #f8fafc;
        border: 1.5px solid #e2e8f0;
    }

    .mobile-auth-login:active {
        background: #f1f5f9;
    }

    .mobile-auth-register {
        color: #fff;
        background: linear-gradient(135deg, #f97316, #ea580c);
        box-shadow: 0 4px 14px rgba(249,115,22,0.3);
    }

    .mobile-auth-register:active {
        transform: scale(0.98);
    }
}

/* Small phones */
@media (max-width: 380px) {
    .mobile-quick-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .mobile-quick-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .mobile-quick-item {
        font-size: 11.5px;
        padding: 12px 6px;
    }
}
