/* Shared header styles - used across all pages */
:root {
  --header-height: 60px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top left, #141a2e 0, #050815 55%);
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #facc15, #ec4899);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  white-space: nowrap;
  color: #f9fafb;
}

.brand-title.mobile-only {
  display: none;
}

.brand-title.desktop-only {
  display: block;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #f9fafb;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.main-nav {
  display: flex;
  gap: 0.4rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.main-nav a {
  color: var(--text-muted, #9ca3af);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--text-main, #f9fafb);
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
}

.main-nav a.active {
  color: #fff;
  border-color: var(--accent-blue, #007bff);
  background: rgba(37, 99, 235, 0.3);
}

/* Highlighted nav items */
.main-nav a.nav-hot {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.15));
  border-color: rgba(239, 68, 68, 0.4);
  color: #fbbf24;
  font-weight: 600;
}

.main-nav a.nav-hot:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(249, 115, 22, 0.25));
  border-color: rgba(239, 68, 68, 0.6);
  color: #fef3c7;
}

/* Dropdown menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  color: var(--text-muted, #9ca3af);
  background: none;
  border: 1px solid transparent;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-btn:hover {
  color: var(--text-main, #f9fafb);
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(11, 16, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  padding: 0.5rem;
  margin-top: 0.25rem;
  backdrop-filter: blur(10px);
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted, #9ca3af);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-content a:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, var(--accent-purple, #6f42c1), var(--accent-blue, #007bff));
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

/* ========== TABLET BREAKPOINT ========== */
@media (max-width: 1100px) {
  .app-header {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
  }
  
  .main-nav {
    order: 2;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  
  .main-nav a {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ========== MOBILE BREAKPOINT ========== */
@media (max-width: 768px) {
  .app-header {
    padding: 0.6rem 1rem;
  }
  
  .brand-title {
    font-size: 0.75rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 21, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem;
    gap: 0.5rem;
    overflow-y: auto;
    z-index: 999;
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .main-nav a {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
  }
  
  .main-nav a:hover,
  .main-nav a.active {
    background: rgba(37, 99, 235, 0.2);
  }
  
  /* Mobile dropdown */
  .nav-dropdown {
    width: 100%;
  }
  
  .nav-dropdown-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
    text-align: left;
  }
  
  .nav-dropdown-content {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
  }
  
  .nav-dropdown-content a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .brand-title.desktop-only {
    display: none;
  }
  
  .brand-title.mobile-only {
    display: block;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
  }
  
  .app-header {
    padding: 0.5rem 0.75rem;
  }
}
