/* Shared Banner Styles */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 64px;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.nav-brand .logo:hover {
    color: var(--accent-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.beta-badge {
    display: inline-block;
    background: var(--gradient);
    color: white !important;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    margin-left: 0.5rem;
    vertical-align: top;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: pulse-beta 2s infinite;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
    background-clip: unset;
}

@keyframes pulse-beta {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.nav-login {
    background: var(--gradient);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: white !important;
    transition: all 0.3s ease;
}

.nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white !important;
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.user-button i:first-child {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.user-button i:last-child {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.user-dropdown.show .user-button i:last-child {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.user-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-item i {
    color: var(--text-secondary);
    width: 16px;
}

.dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-buttons .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

/* Ensure user name is visible on larger screens */
#userName {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.open {
    max-height: 600px;
}

.mobile-menu-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-nav-link.active {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    font-weight: 600;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.mobile-user-header {
    padding: 1rem;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-user-header i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.mobile-user-status {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
        height: 56px;
    }

    .nav-brand .logo {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .beta-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
        margin-left: 0.3rem;
    }

    /* Hide desktop navigation links - use !important to override inline styles */
    .nav-menu .nav-link {
        display: none !important;
    }

    /* Show hamburger menu */
    .hamburger {
        display: flex;
    }

    /* Adjust nav-menu layout for mobile */
    .nav-menu {
        gap: 1rem;
        align-items: center;
    }

    /* Hide desktop user menu completely on mobile */
    .user-menu {
        display: none !important;
    }

    /* Theme toggle mobile adjustments */
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    /* Mobile menu positioning */
    .mobile-menu {
        top: 56px;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0 0.75rem;
    }

    .nav-brand .logo {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 0.75rem;
    }

    .user-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .mobile-menu-content {
        padding: 0.75rem;
    }

    .mobile-nav-link {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}