:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #f43f5e;
    --accent-dark: #e11d48;
    --success: #22c55e;
    --info: #0ea5e9;
    --info-dark: #0284c7;
    --warning: #f59e0b;
    --danger: #ef4444;
    --neutral: #64748b;
    --neutral-light: #e2e8f0;
    --text: #111827;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #f8fafc;
    --bg-light: #ffffff;
    --card-bg: #ffffff;
    --glass-border: rgba(209, 213, 219, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(10px);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --accent: #fb7185;
    --accent-dark: #f43f5e;
    --success: #4ade80;
    --info: #38bdf8;
    --info-dark: #0ea5e9;
    --warning: #fbbf24;
    --danger: #ef4444;
    --neutral: #94a3b8;
    --neutral-light: #4b5563;
    --text: #e5e7eb;
    --text-light: #9ca3af;
    --text-muted: #6b7280;
    --bg: #1f2937;
    --bg-light: #374151;
    --card-bg: #1f2937;
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(31, 41, 55, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 70px 0 0 0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.divider {
    position: relative;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 2px;
    margin: 20px auto;
    width: 200px;
    overflow: hidden;
}

.divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
    min-height: 70px;
    width: 100%;
    gap: 16px;
    overflow: hidden; /* Prevent content from overflowing */
}

/* Left: Company Name Only */
.nav-left {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 300px; /* Prevent taking too much space */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

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

.nav-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-logo-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.nav-center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0 16px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Hide nav links when search is expanded to prevent overlap */
.nav-center.search-expanded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Prevent nav link shadows from overlapping adjacent links */
.nav-links li {
    position: relative;
    z-index: 1;
}

/* Use a clipping context that doesn't cut content but limits visual overflow */
.nav-links li a {
    isolation: isolate; /* confine box-shadow painting to this element's stacking context */
    position: relative;
    z-index: 2;
}

.nav-links li a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    backdrop-filter: blur(0px);
    white-space: nowrap;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    opacity: 0.35;
    transition: all 0.4s ease;
    border-radius: 16px;
    z-index: -1;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

.nav-links li a:hover {
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -10px rgba(59, 130, 246, 0.28);
    /* border removed */
}

.nav-links li a:focus {
    outline: none;
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -10px rgba(59, 130, 246, 0.22);
    /* border removed */
}

.nav-links li a:hover::before,
.nav-links li a:focus::before {
    opacity: 0.55;
}

.nav-links li a:hover::after,
.nav-links li a:focus::after {
    opacity: 0.8;
    transform: rotate(30deg) translate(50%, 50%);
}

/* Active state for current page */
.nav-links li a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    backdrop-filter: var(--glass-blur);
    color: var(--bg-light);
    border: none;
    box-shadow: 0 12px 22px -10px rgba(59, 130, 246, 0.26);
    transform: translateY(-1px);
}

.nav-links li a.active::before {
    opacity: 0;
}

.nav-links li a.active::after {
    opacity: 0.3;
}

.nav-links li a.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -12px rgba(59, 130, 246, 0.28);
}

.nav-links li a.active i {
    color: var(--bg-light);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Icon styling for navigation links */
.nav-links li a i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-links li a:hover i {
    transform: scale(1.1);
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7rem !important;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    backdrop-filter: var(--glass-blur);
    min-width: max-content;
    max-width: 350px;
    max-height: none;
    overflow: visible;
    z-index: 999999;
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    white-space: nowrap;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}

.nav-dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.nav-dropdown-menu.show::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(10%, 10%);
}

/* Debug: temporarily show all dropdowns */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.dropdown-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dropdown-section {
    padding: 0;
}

.dropdown-section-title {
    padding: 8px 14px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dropdown-item {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 0;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: max-content;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

.dropdown-item:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-1px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    font-weight: 600;
}

.dropdown-item:hover::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(25%, 25%);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-view-all {
    border-top: 1px solid var(--glass-border);
    margin-top: 6px;
    padding: 8px 14px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    text-align: center;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--glass-border);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.dropdown-view-all::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

.dropdown-view-all:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-1px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    text-shadow: none;
}

.dropdown-view-all:hover::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(25%, 25%);
}

/* Dark theme support for better contrast */
[data-theme="dark"] .nav-dropdown-menu {
    background: rgba(31, 41, 55, 0.95);
    border-color: var(--glass-border);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--primary) !important;
    color: white !important;
}

[data-theme="dark"] .dropdown-section-title {
    color: var(--primary);
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

[data-theme="dark"] .dropdown-view-all {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

[data-theme="dark"] .dropdown-view-all:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Ensure all dropdown links have proper contrast on hover */
.nav-dropdown-menu a:hover,
.nav-dropdown-menu .dropdown-item:hover {
    background: var(--primary) !important;
    color: white !important;
    text-decoration: none !important;
}

.nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
    max-width: 400px; /* Prevent taking too much space on desktop */
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

.global-search {
    position: relative;
    width: 40px;
    height: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 10000;
}

.global-search.expanded {
    width: 160px;
}

/* Search icon container inherits consistent button styling */
.search-icon-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    
    /* Consistent with other header buttons */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text);
    
    /* Layout consistent with other buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    /* Interaction consistent with other buttons */
    cursor: pointer;
    outline: none;
    
    /* Visual effects consistent with other buttons */
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 10001;
    
    /* Typography consistent with other buttons */
    font-size: 0.9rem;
    font-weight: 600;
}

/* Consistent pseudo-element for shine effect */
.search-icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

/* Consistent hover effects */
.search-icon-container:hover {
    background: var(--primary);
    color: var(--bg-light);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
    border-color: var(--primary);
}

.search-icon-container:hover::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

.global-search.expanded .search-icon-container {
    border-radius: 20px 0 0 20px;
    border-right: none;
}

.search-input-container {
    position: absolute;
    left: 40px;
    top: 0;
    height: 40px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-left: none;
    border-radius: 0 20px 20px 0;
    display: flex;
    align-items: center;
    opacity: 0;
    width: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.global-search.expanded .search-input-container {
    opacity: 1;
    width: calc(100% - 40px);
}

.search-icon {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Ensure search icon is properly sized on mobile */
@media (max-width: 768px) {
    .search-icon {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .search-icon {
        font-size: 0.75rem;
    }
}

.global-search-input {
    width: 100%;
    height: 100%;
    padding: 0 16px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}

.global-search-input::placeholder {
    color: var(--text-muted);
}

/* Search suggestions container - Match nav-dropdown-menu style */
.search-suggestions {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    backdrop-filter: var(--glass-blur);
    min-width: max-content;
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 999999;
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    white-space: nowrap;
}

/* Add gradient overlay effect to match the nav-dropdown-menu */
.search-suggestions::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}

/* Show animation - Match nav-dropdown-menu.show */
.search-suggestions.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.search-suggestions.show::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(10%, 10%);
}

/* Suggestion items - Match dropdown-item style */
.suggestion-item {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 0;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Add gradient effect for suggestion items */
.suggestion-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

/* Hover effect - Match dropdown-item:hover */
.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-1px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    font-weight: 600;
}

.suggestion-item:hover::before,
.suggestion-item.selected::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(25%, 25%);
}

/* Only add border-bottom to non-last items */
.suggestion-item:not(:last-child) {
    border-bottom: none; /* Remove default border */
    margin-bottom: 6px;
}

/* Update text colors on hover to match submenu */
.suggestion-item:hover .suggestion-title,
.suggestion-item.selected .suggestion-title {
    color: white !important;
}

.suggestion-item:hover .suggestion-meta,
.suggestion-item.selected .suggestion-meta {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Style the suggestion icon to match submenu items */
.suggestion-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.suggestion-item:hover .suggestion-icon,
.suggestion-item.selected .suggestion-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Add special styling for the "View all results" item to match dropdown-view-all */
.suggestion-item:last-child {
    margin-top: 6px;
    padding: 8px 14px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--glass-border);
}

.suggestion-item:last-child:hover {
    background: var(--primary) !important;
    color: white !important;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 2px;
}

.suggestion-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Dark theme support to match submenu */
[data-theme="dark"] .search-suggestions {
    background: rgba(31, 41, 55, 0.95);
    border-color: var(--glass-border);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .suggestion-item {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

[data-theme="dark"] .suggestion-item:hover,
[data-theme="dark"] .suggestion-item.selected {
    background: var(--primary) !important;
    color: white !important;
}

[data-theme="dark"] .suggestion-item:last-child {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

[data-theme="dark"] .suggestion-item:last-child:hover {
    background: var(--primary) !important;
    color: white !important;
}

/*
 * CONSISTENT HEADER BUTTON SYSTEM
 * ===============================
 * All header buttons (theme-toggle, nav-toggle, auth-btn, search-icon-container, user-avatar)
 * share consistent styling, sizing, and behavior:
 * 
 * - Desktop: 40px × 40px
 * - Mobile (≤768px): 44px × 44px  
 * - Small mobile (≤480px): 36px × 36px
 * 
 * All buttons have:
 * - Glass morphism styling with backdrop blur
 * - Consistent hover effects with scale and glow
 * - Touch-friendly interaction for mobile
 * - Accessibility support (focus states, keyboard navigation)
 * - Uniform spacing and visual feedback
 */

/* Base header button styles - applied to all header buttons */
.theme-toggle, .nav-toggle, .auth-btn {
    /* Consistent sizing */
    width: 40px;
    height: 40px;
    
    /* Consistent styling */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text);
    
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    /* Interaction */
    cursor: pointer;
    outline: none;
    
    /* Visual effects */
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* Typography */
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

/* Consistent pseudo-element for shine effect */
.theme-toggle::before, .nav-toggle::before, .auth-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

/* Consistent hover effects for all buttons */
.theme-toggle:hover, .nav-toggle:hover {
    background: var(--primary);
    color: var(--bg-light);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
    border-color: var(--primary);
}

.theme-toggle:hover::before, .nav-toggle:hover::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

/* Auth button specific styles (inherits from base button styles above) */

/* Login button - default state with primary accent */
.login-btn {
    color: var(--primary);
    border-color: var(--primary);
}

.login-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
    border-color: var(--primary);
}

.login-btn:hover::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

/* Logout button - filled primary state */
.logout-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.logout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
}

.logout-btn:hover::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

.user-info {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.user-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.user-link:hover {
    /* Keep link hover minimal to not conflict with avatar hover */
    transform: translateY(-1px);
}

.user-link:hover .user-avatar {
    /* Consistent hover effects with other header buttons */
    background: var(--primary);
    color: var(--bg-light);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
    border-color: var(--primary);
}

.user-link:hover .user-avatar::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

.user-avatar {
    /* Consistent sizing with other header buttons */
    width: 40px;
    height: 40px;
    
    /* Consistent styling with other header buttons */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text);
    
    /* Layout consistent with other buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    /* Visual effects consistent with other buttons */
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* Typography consistent with other buttons */
    font-size: 0.9rem;
    font-weight: 600;
}

/* Consistent pseudo-element for shine effect */
.user-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
    z-index: -1;
}

/* Logged in section styling */
#logged-in-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile Navigation - Hidden by default (desktop) */
.nav-mobile {
    display: none !important;
}

/* Ensure no mobile menus are visible by default */
.mobile-menu {
    display: none !important;
}

.mobile-menu-overlay {
    display: none !important;
}

/* Enhanced button interaction styles for all header buttons */
.theme-toggle, .nav-toggle, .auth-btn, .search-icon-container, .user-avatar {
    /* Touch and interaction improvements */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3);
    tap-highlight-color: rgba(59, 130, 246, 0.3);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: pointer;
    outline: none;
    
    /* Ensure clickability */
    pointer-events: auto;
    z-index: 100;
    position: relative;
    
    /* Minimum touch target size */
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Add visual feedback on interactions */
    transition: all 0.2s ease;
}

/* Active/pressed state for better feedback */
.theme-toggle:active, .nav-toggle:active, .auth-btn:active, .search-icon-container:active, .user-avatar:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Focus states for accessibility */
.theme-toggle:focus-visible, .nav-toggle:focus-visible, .auth-btn:focus-visible, .search-icon-container:focus-visible, .user-avatar:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Ensure navbar and nav sections don't block interactions */
.navbar {
    z-index: 1000;
}

.nav-right, .nav-actions {
    pointer-events: auto;
    z-index: 1000;
}

/* Special handling for search elements */
#global-search, #search-icon-container {
    pointer-events: auto;
    z-index: 101;
    position: relative;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    display: none;
}

.mobile-menu.show {
    display: block;
    transform: translateY(0);
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

.mobile-nav-links li {
    width: 100%;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.mobile-nav-links a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Mobile Search in Menu */
.mobile-search-container {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-search {
    position: relative;
    width: 100%;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.mobile-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mobile-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* Mobile Search Suggestions */
/* Mobile search suggestions - apply the same styling */
#mobile-search-suggestions {
    position: relative;
    top: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    backdrop-filter: var(--glass-blur);
    max-height: 250px;
    overflow-y: auto;
    z-index: 10002;
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
}

#mobile-search-suggestions::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}

#mobile-search-suggestions.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#mobile-search-suggestions.show::before {
    opacity: 0.8;
    transform: rotate(30deg) translate(10%, 10%);
}

#mobile-search-suggestions .suggestion-item {
    padding: 8px 14px;
    margin: 2px 0;
}

[data-theme="dark"] #mobile-search-suggestions {
    background: rgba(31, 41, 55, 0.95);
    border-color: var(--glass-border);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

/* Ensure mobile menu prevents body scroll when open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Add smooth animations for mobile menu */
.mobile-menu-overlay {
    backdrop-filter: blur(4px);
}

/* Ensure the mobile menu works on landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-menu {
        max-height: calc(100vh - 60px);
    }
    
    .mobile-menu-content {
        padding: 12px 20px;
    }
    
    .mobile-nav-links a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Nav toggle inherits from base button styles above - no additional styles needed */

/* Footer Styles */
.footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    padding: 40px 0 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    z-index: -1;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-info-item i {
    width: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 12px;
        gap: 12px;
    }
    
    .nav-left {
        max-width: 260px;
    }
    
    .nav-links {
        gap: 2px;
    }
    
    .nav-links li a {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .nav-center {
        margin: 0 8px;
    }
    
    .nav-right {
        max-width: 340px;
        gap: 10px;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .global-search.expanded {
        width: 140px;
    }
}

@media (max-width: 1024px) {
    /* Tablet and mobile styles */
    .nav-container {
        gap: 10px;
    }
    
    .nav-center { 
        display: none; 
    }
    
    .nav-left {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none; /* Remove max-width constraint */
    }
    
    .nav-logo-text {
        display: none;
    }
    
    .nav-right {
        flex: 0 0 auto;
        max-width: none; /* Remove max-width constraint */
        gap: 10px;
    }
    
    .global-search { 
        max-width: 200px;
        min-width: 140px;
    }
    
    .global-search.expanded {
        width: 180px;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .nav-mobile {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    /* Allow mobile menu to be shown on tablets/mobile */
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.show {
        display: block !important;
    }
    
    .mobile-menu-overlay {
        display: none;
    }
    
    .mobile-menu-overlay.show {
        display: block !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 60px 0 0 0;
    }
    
    /* Enhanced mobile button support - consistent sizing */
    .theme-toggle, .nav-toggle, .auth-btn, .search-icon-container {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        z-index: 1001;
        
        /* Slightly smaller font on mobile */
        font-size: 0.85rem;
    }
    
    /* Search container adjustments for mobile */
    .global-search {
        width: 44px;
        height: 44px;
    }
    
    .global-search.expanded {
        width: 180px; /* Slightly larger for mobile readability */
    }
    
    .search-input-container {
        left: 44px;
        height: 44px;
    }
    
    .global-search.expanded .search-input-container {
        width: calc(100% - 44px);
    }
    
    /* User avatar should also be consistent on mobile */
    .user-avatar {
        width: 44px;
        height: 44px;
        font-size: 0.85rem;
    }
    
    /* Increase touch target area on mobile */
    .theme-toggle::after, .nav-toggle::after, .auth-btn::after, .search-icon-container::after, .user-avatar::after {
        content: '';
        position: absolute;
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
        z-index: -1;
    }
    
    /* Prevent mobile menu flash on load */
    .mobile-menu,
    .mobile-menu-overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .mobile-menu.show,
    .mobile-menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-container {
        padding: 0 12px;
        height: 60px;
        min-height: 60px;
        gap: 8px;
    }
    
    .nav-left {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }
    
    .nav-right {
        flex: 0 0 auto;
        max-width: none;
        gap: 8px;
    }
    
    .nav-center {
        display: none;
    }
    
    .nav-links {
        display: none;
    }

    .nav-mobile {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    /* Allow mobile menu to be shown on mobile */
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.show {
        display: block !important;
    }
    
    .mobile-menu-overlay {
        display: none;
    }
    
    .mobile-menu-overlay.show {
        display: block !important;
    }

    .nav-actions {
        gap: 8px; /* Consistent spacing */
        align-items: center;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    /* Hide desktop search on mobile */
    .global-search {
        display: none;
    }

    .auth-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .nav-logo-text {
        font-size: 1.1rem;
    }
    
    .nav-logo-img {
        height: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info {
        align-items: center;
    }
    
    /* Ensure mobile menu is properly positioned */
    .mobile-menu {
        top: 60px;
        max-height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 55px 0 0 0;
    }
    
    .nav-container {
        padding: 0 10px;
        height: 55px;
        min-height: 55px;
        gap: 6px;
    }
    
    .nav-left {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }
    
    .nav-right {
        flex: 0 0 auto;
        gap: 6px;
    }
    
    .nav-actions {
        gap: 6px; /* Tighter spacing for very small screens */
        flex-shrink: 0;
    }
    
    .nav-logo-text {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .nav-logo-img {
        height: 32px;
    }
    
    /* Consistent small button sizing on very small screens */
    .theme-toggle, .nav-toggle, .auth-btn, .search-icon-container, .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Search container adjustments for very small screens */
    .global-search {
        width: 36px;
        height: 36px;
    }
    
    .global-search.expanded {
        width: 160px;
    }
    
    .search-input-container {
        left: 36px;
        height: 36px;
    }
    
    .global-search.expanded .search-input-container {
        width: calc(100% - 36px);
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Keep auth section visible but compact */
    #auth-section {
        flex-shrink: 0;
    }
    
    .mobile-menu {
        top: 55px;
        max-height: calc(100vh - 55px);
    }
    
    .mobile-menu-content {
        padding: 16px;
    }
    
    .mobile-nav-links a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .mobile-search-input {
        padding: 10px 14px 10px 40px;
        font-size: 0.85rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .nav-container {
        height: 50px;
        gap: 4px;
        padding: 0 8px;
    }
    
    body {
        padding: 50px 0 0 0;
    }
    
    .nav-left {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }
    
    .nav-right {
        flex: 0 0 auto;
        gap: 4px;
    }
    
    .nav-logo-text {
        max-width: 90px; /* Increased from 80px */
        font-size: 0.75rem; /* Increased from 0.7rem for readability */
    }
    
    .nav-logo-img {
        height: 30px;
    }
    
    .nav-actions {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .auth-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    
    .theme-toggle,
    .nav-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    
    .mobile-menu {
        top: 50px;
        max-height: calc(100vh - 50px);
    }
    
    /* Keep auth section visible but prioritize essential buttons */
    #auth-section {
        flex-shrink: 0;
    }
    
    /* If space is really critical, only hide theme toggle on ultra-small screens */
    .theme-toggle {
        display: none; /* Hide theme toggle to save space */
    }
}
