/**
 * Garage Pass - Unified Responsive Stylesheet
 *
 * Single mobile-first responsive stylesheet (formerly split across multiple files).
 *
 * Structure:
 * 1. CSS Variables & Design Tokens
 * 2. Base/Reset Styles
 * 3. Layout Components (Grid, Containers)
 * 4. Header & Navigation (Responsive)
 * 5. Cards & Panels
 * 6. Forms & Inputs
 * 7. Buttons & Interactive Elements
 * 8. Page-Specific Sections
 * 9. Mobile Bottom Navigation
 * 10. Utilities & Helpers
 * 11. Animations
 * 12. Print Styles
 */

/* ============================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
  /* Colors */
  --bg: #0b0f12;
  --panel: #11161c;
  --line: #1b2330;
  --text: #e9f3f6;
  --muted: #9db2bf;
  --muted-foreground: #6b7a85; /* Lighter muted for secondary text */
  --foreground: #e9f3f6;
  --teal: #18e1ff;
  --accent: #ff6a20;
  --good: #41d79e;
  --error: #ff6b6b;
  --warning: #ffc107;

  /* Glass Effects */
  --glass-bg: rgba(17, 22, 28, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px) saturate(180%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(24, 225, 255, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout - Mobile First */
  --container-sm: 640px;
  --container-md: 900px;
  --container-lg: 1200px;
  --container-xl: 1400px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;

  /* Mobile-specific */
  --mobile-header-height: 56px;
  --mobile-search-height: 56px;
  --mobile-nav-height: 64px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Light mode overrides (toggled via body.light-mode) */
body.light-mode {
  --bg: #f4f7f9;
  --panel: #ffffff;
  --line: rgba(11, 15, 18, 0.12);
  --text: #0b0f12;
  --foreground: #0b0f12;
  --muted: #4a5568; /* Darker muted for better contrast in light mode */
  --muted-foreground: #64748b; /* Secondary text - good contrast ratio */

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(11, 15, 18, 0.08);
  --glass-blur: blur(16px) saturate(120%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
  --shadow-glow: 0 0 20px rgba(24, 225, 255, 0.18);
}

/* Light mode component overrides - fix contrast for hardcoded dark colors */
body.light-mode .text-gray-400,
body.light-mode .text-gray-500,
body.light-mode .text-zinc-400,
body.light-mode .text-zinc-500 {
  color: #475569 !important; /* slate-600 - good contrast on light bg */
}

body.light-mode .text-gray-300,
body.light-mode .text-zinc-300 {
  color: #64748b !important; /* slate-500 */
}

body.light-mode .text-gray-600,
body.light-mode .text-zinc-600 {
  color: #334155 !important; /* slate-700 */
}

body.light-mode .bg-zinc-900,
body.light-mode .bg-gray-900,
body.light-mode .bg-slate-900 {
  background-color: #f1f5f9 !important; /* slate-100 */
}

body.light-mode .bg-zinc-800,
body.light-mode .bg-gray-800,
body.light-mode .bg-slate-800 {
  background-color: #e2e8f0 !important; /* slate-200 */
}

body.light-mode .bg-black\/40,
body.light-mode .bg-black\/50,
body.light-mode .bg-black\/60 {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .border-gray-700,
body.light-mode .border-gray-800,
body.light-mode .border-zinc-700,
body.light-mode .border-zinc-800 {
  border-color: #cbd5e1 !important; /* slate-300 */
}

body.light-mode .text-white {
  color: #0f172a !important; /* slate-900 - dark text on light bg */
}

/* Glass panels in light mode */
body.light-mode .glass-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Cards and panels */
body.light-mode .card,
body.light-mode .panel {
  background: var(--panel);
  color: var(--text);
}

/* Input fields */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background-color: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #94a3b8;
}

/* Buttons */
body.light-mode .btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

body.light-mode .btn-secondary:hover {
  background: #cbd5e1;
}

/* Dropdown menus in light mode */
body.light-mode .menu {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .menu-item {
  color: #334155;
}

body.light-mode .menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

body.light-mode .menu-label {
  color: #64748b;
}

body.light-mode .menu-sep {
  border-color: #e2e8f0;
}

/* Mobile drawer in light mode */
body.light-mode .drawer-content {
  background: #fff;
  border-left-color: #e2e8f0;
}

body.light-mode .drawer-backdrop {
  background: rgba(0, 0, 0, 0.3);
}

body.light-mode .drawer-header {
  border-bottom-color: #e2e8f0;
}

body.light-mode .drawer-username {
  background: linear-gradient(90deg, #0f172a 0%, #0891b2 25%, #0f172a 50%, #0891b2 75%, #0f172a 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-mode .drawer-link,
body.light-mode .drawer-nav a {
  color: #334155;
}

body.light-mode .drawer-link:hover,
body.light-mode .drawer-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

body.light-mode .drawer-section-title {
  color: #64748b;
}

/* Header bar in light mode */
body.light-mode .site-header,
body.light-mode header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: #e2e8f0;
  backdrop-filter: blur(12px);
}

body.light-mode .site-header .btn,
body.light-mode header .btn {
  color: #334155;
}

body.light-mode .site-header .btn:hover,
body.light-mode header .btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

/* Notification dropdown */
body.light-mode .notifications-dropdown .menu {
  background: #fff;
  border-color: #e2e8f0;
}

body.light-mode #notifList {
  color: #334155;
}

/* Mobile bottom nav */
body.light-mode .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: #e2e8f0;
}

body.light-mode .mobile-bottom-nav .nav-btn {
  color: #64748b;
}

body.light-mode .mobile-bottom-nav .nav-btn.active,
body.light-mode .mobile-bottom-nav .nav-btn:hover {
  color: #0891b2;
}

body.light-mode .mobile-bottom-nav .nav-label {
  color: inherit;
}

body.light-mode .mobile-bottom-nav .nav-submenu {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
}

body.light-mode .mobile-bottom-nav .nav-submenu-item {
  color: #334155;
}

body.light-mode .mobile-bottom-nav .nav-submenu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* General page content contrast */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
  color: #0f172a;
}

body.light-mode p {
  color: #334155;
}

body.light-mode a:not(.btn) {
  color: #0891b2;
}

body.light-mode a:not(.btn):hover {
  color: #0e7490;
}

/* Fix hero sections in light mode */
body.light-mode .hero-title,
body.light-mode .hero-subtitle {
  color: #0f172a;
}

body.light-mode .hero-kicker {
  color: #64748b;
}

/* Glass panels - ensure readable text */
body.light-mode .glass-panel,
body.light-mode .glass-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

/* Stat cards and info boxes */
body.light-mode .stat-card,
body.light-mode .info-card {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

body.light-mode .stat-label {
  color: #64748b;
}

body.light-mode .stat-value {
  color: #0f172a;
}

/* Footer contrast */
body.light-mode footer,
body.light-mode .site-footer {
  background: #f8fafc;
  color: #334155;
  border-top-color: #e2e8f0;
}

body.light-mode footer a,
body.light-mode .site-footer a {
  color: #475569;
}

body.light-mode footer a:hover,
body.light-mode .site-footer a:hover {
  color: #0891b2;
}

/* Muted/secondary text */
body.light-mode .text-muted,
body.light-mode .muted {
  color: #64748b !important;
}

body.light-mode .text-muted-foreground {
  color: #64748b !important;
}

/* Fix any remaining rgba white text */
body.light-mode [style*="rgba(255"] {
  color: inherit;
}

/* ============================================
   2. BASE/RESET STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* Smooth scrolling for anchor links */
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font: 16px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overscroll-behavior: contain;
  /* Prevent horizontal scrolling on mobile - critical for app feel */
  overflow-x: hidden;
  /* Prevent text selection on UI elements for app-like feel */
  -webkit-user-select: none;
  user-select: none;
}

/* Allow text selection in content areas */
p, h1, h2, h3, h4, h5, h6, span, li, td, th, blockquote, article, .selectable {
  -webkit-user-select: text;
  user-select: text;
}

/* Prevent callout on long-press for buttons/links */
a, button {
  -webkit-touch-callout: none;
}

/* ─────────────────────────────────────────────────────────
   Auth & Role-Based Visibility (hidden by default, JS reveals)
   ───────────────────────────────────────────────────────── */
.auth-logged-in,
.auth-logged-out,
.business-only,
.not-business,
.organizer-only,
.admin-only,
.founder-only {
  display: none !important;
}
/* When JS has determined visibility, it adds .is-visible to reveal */
.auth-logged-in.is-visible,
.auth-logged-out.is-visible,
.business-only.is-visible,
.not-business.is-visible,
.organizer-only.is-visible,
.admin-only.is-visible,
.founder-only.is-visible {
  display: revert !important;
}

/* Fix layout for specific components when explicitly visible */
.menu-item.is-visible { display: block !important; }
.drawer-item.is-visible { display: flex !important; }

/* Mobile bottom nav visibility overrides (higher specificity) */
.mobile-bottom-nav .nav-item.business-only,
.mobile-bottom-nav .nav-item.not-business {
  display: none;
}
.mobile-bottom-nav .nav-item.business-only.is-visible,
.mobile-bottom-nav .nav-item.not-business.is-visible {
  display: flex;
}

/* ─────────────────────────────────────────────────────────
   JS-Controlled Visibility (initially hidden, JS toggles)
   ───────────────────────────────────────────────────────── */
/* Elements hidden by default that JS reveals dynamically */
.js-hidden {
  display: none;
}
.js-hidden.is-visible {
  display: revert;
}

/* Specific component initial states */
#notifDropdown,
#notifMenu,
#notifBadge,
#drawerUserInfo,
#drawerNotifBadge,
#drawerNotifContainer {
  display: none;
}

/* Drawer notification container styling */
.drawer-notif-container {
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
}

/* Footer heart color */
.footer-heart {
  color: #e25555;
}

/* Theme toggle button styling */
#themeToggle {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
}

/* Admin build stamp */
#adminBuildStamp {
  font-size: 11px;
  opacity: 0.6;
}

/* Menu sign out button */
#menuSignOut {
  width: 100%;
  text-align: left;
}

/* ─────────────────────────────────────────────────────────
   Admin Dashboard Utilities
   ───────────────────────────────────────────────────────── */
/* Margin utilities */
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* Padding utilities */
.pt-24 { padding-top: 24px; }
.pl-0 { padding-left: 0; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }

/* Gap utilities */
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* Flex utilities for admin */
.flex-center { display: flex; align-items: center; }
.flex-wrap-start { flex-wrap: wrap; align-items: flex-start; }

/* Admin form containers */
.admin-form-container {
  margin-top: 16px;
  padding: 16px;
  background: #1a2332;
  border-radius: 8px;
}
.admin-form-container--lg {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admin section styling */
.admin-section { margin-top: 20px; }
.admin-section--lg { margin-top: 24px; }
.admin-section--xl { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* Admin preview sections */
.admin-preview {
  margin-top: 16px;
  padding: 16px;
  background: #0f1318;
  border-radius: 8px;
}

/* Admin input labels (floating style) */
.admin-label-float {
  position: relative;
  top: -8px;
  font-size: 11px;
}

/* Color input styling */
.admin-color-input {
  height: 48px;
  cursor: pointer;
}

/* Admin banner */
.admin-banner.mt-8 { margin-top: 8px; }

/* Ribbon previews */
.ribbon-preview--blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.ribbon-preview--green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ribbon-preview--purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.ribbon-preview--gold { background: linear-gradient(135deg, #ffd700, #f59e0b); }

/* Badge preview inline display */
.badge-preview-inline { display: inline-flex; }

/* Analytics chart */
.analytics-chart {
  width: 100%;
  height: 220px;
}

/* Flex utilities for gap variants */
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }

/* Background gradient */
body {
  background-image: radial-gradient(circle at 50% 0%, #1a2025 0%, var(--bg) 60%);
  background-attachment: fixed;
}

/* Mobile: scroll background for performance */
@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* Skip Link - Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(24px, 5vw, 36px); }
h2 { font-size: clamp(20px, 4vw, 28px); }
h3 { font-size: clamp(18px, 3vw, 22px); }

.meta {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================
   3. LAYOUT COMPONENTS
   ============================================ */
.wrap,
.container {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: var(--space-sm);
  width: 100%;
}

/* Tighter padding on mobile */
@media (max-width: 640px) {
  .wrap,
  .container {
    padding: var(--space-lg);
  }
}

/* Larger container on desktop */
@media (min-width: 1024px) {
  .wrap,
  .container {
    max-width: var(--container-lg);
    padding: var(--space-xl) var(--space-2xl);
  }

  .page-home .wrap,
  .page-browse .wrap,
  .page-garage .wrap,
  .page-events .wrap,
  .page-shops .wrap,
  .page-binders .wrap,
  .page-login .wrap,
  .page-create-account .wrap {
    max-width: var(--container-xl);
  }

  /* Header bar should always use full width regardless of page */
  .site-header .bar.wrap {
    max-width: var(--container-xl);
  }
}

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid.duo {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid.duo {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */

/* === Responsive Header === */
.site-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  background: rgba(11, 15, 18, 0.85);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
  transition: background var(--transition-medium), box-shadow var(--transition-medium);
  padding-top: env(safe-area-inset-top);
}

/* Subtle “drift smoke” motion in header background */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(closest-side, rgba(24, 225, 255, 0.16), rgba(24, 225, 255, 0) 65%),
    radial-gradient(closest-side, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 70%);
  background-size: 220% 220%;
  background-position: 20% 40%;
  filter: blur(18px);
  opacity: 0.35;
  animation: gpHeaderDrift 18s ease-in-out infinite;
}

.site-header::after {
  opacity: 0.22;
  filter: blur(26px);
  animation-duration: 28s;
  animation-direction: reverse;
}

.site-header .bar {
  z-index: 1;
}

@keyframes gpHeaderDrift {
  0% { background-position: 20% 40%; }
  50% { background-position: 80% 30%; }
  100% { background-position: 20% 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header::before,
  .site-header::after {
    animation: none;
  }
}

.site-header.scrolled {
  background: rgba(11, 15, 18, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  /* Remove justify-content: space-between to allow custom spacing */
  gap: var(--space-lg);
  padding: 6px 9px;
  max-width: var(--container-xl);
  margin: 8px auto 0;
}

@media (max-width: 768px) {
  .bar {
    padding: 8px 16px;
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  --brand-icon-h: 56px;
  --brand-wordmark-scale: 1.035; /* Increased by ~15% from 0.9 */
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .bar {
    padding: 12px var(--space-xl);
  }
  .logo {
    gap: 16px;
    --brand-icon-h: 69px; /* Increased by ~15% from 60px */
    --brand-wordmark-scale: 1.15; /* Increased by ~15% from 1.0 */
  }
}

/* Footer Logo Override */
.site-footer .logo {
  --brand-icon-h: 60px;
  --brand-wordmark-scale: 1.0;
}

@media (min-width: 768px) {
  .site-footer .logo {
    --brand-icon-h: 80px;
  }
}

.logo a {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo img {
  height: var(--brand-icon-h);
  width: auto;
}

.logo img.brand-wordmark {
  height: calc(var(--brand-icon-h) * var(--brand-wordmark-scale));
  margin-left: 0;
}

/* Desktop Nav - Spread Layout */
.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-grow: 1; /* Allow nav to take available space */
  margin-left: var(--space-xl); /* Space from logo */
  overflow-x: visible; /* Allow dropdowns to overflow */
}

/* Nav Button Styles - Sleek & Modern */
.pill .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  height: 36px; /* Fixed height for consistency */
}

.pill .btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.05);
}

.pill .btn.active {
  color: var(--teal);
  background: rgba(24, 225, 255, 0.08);
  border-color: rgba(24, 225, 255, 0.15);
}

.pill .btn .icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.pill .btn:hover .icon {
  opacity: 1;
}

/* Sign In Button - Pushed to Right */
.pill #navAuth {
  /* margin-left: auto; Removed to allow grouping */
  color: var(--teal);
  border: 1px solid rgba(24, 225, 255, 0.3);
  padding: 8px 20px;
  background: rgba(24, 225, 255, 0.05);
}

/* Menu Button - Match Sign In size */
#mainMenuBtn,
#mobileMenuBtn {
  padding: 8px 20px;
  color: var(--teal);
  border: 1px solid rgba(24, 225, 255, 0.3);
  background: rgba(24, 225, 255, 0.05);
}

.nav-group-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.nav-group-right .dropdown,
.nav-group-right #navAuth {
  width: 100%;
}
.nav-group-right .btn {
  width: 100%;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.pill #navAuth:hover,
#mainMenuBtn:hover,
#mobileMenuBtn:hover {
  background: rgba(24, 225, 255, 0.15);
  border-color: var(--teal);
  box-shadow: 0 0 15px rgba(24, 225, 255, 0.15);
}

/* === Mobile Header === */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-height);
  padding-top: var(--safe-area-top);
  background: rgba(11, 15, 18, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  z-index: 100;
}

.mobile-logo img {
  height: 40px;
  width: auto;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Keep desktop header visible on mobile by default */
.view-mobile .site-header {
  display: none;
}

/* If a dedicated mobile header exists, prefer it */
.has-mobile-header.view-mobile .site-header {
  display: none;
}

.has-mobile-header.view-mobile .mobile-header {
  display: flex;
}

/* Keep notifications inside the mobile "More" drawer */
.view-mobile .notifications-dropdown {
  display: none !important;
}

/* Hide mobile header on desktop view */
.view-desktop .mobile-header {
  display: none;
}

/* Desktop sizing */
@media (min-width: 1024px) {
  .bar {
    padding: 9px 18px;
  }

  .logo {
    --brand-icon-h: 82px;
    --brand-wordmark-scale: 1.3;
  }

  .pill .btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Large desktop */
@media (min-width: 1440px) {
  .logo {
    --brand-icon-h: 88px;
  }

  .bar {
    max-width: 1600px;
  }

  .pill .btn {
    padding: 9px 18px;
  }
}

/* Mobile sizing - App-like header for phones */
@media (max-width: 640px) {
  .site-header,
  .site-header {
    display: none !important;
    /* iOS safe area for notch */
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
    padding-bottom: 0;
    height: auto;
    min-height: 56px;
    background: rgba(11, 15, 18, 0.95);
  }

  .site-header .bar,
  .site-header .bar {
    padding: 8px 16px 4px;
    gap: 0;
    margin-top: 0;
    min-height: 52px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .site-header .logo,
  .site-header .logo {
    /* Compact app-like logo sizing */
    --brand-icon-h: 40px;
    --brand-wordmark-scale: 0.85;
    gap: 8px;
    flex-shrink: 0;
  }

  /* Hide wordmark on very small screens for cleaner look */
  .site-header .logo img.brand-wordmark,
  .site-header .logo img.brand-wordmark {
    display: block !important;
    max-width: 120px;
    object-fit: contain;
  }

  .site-header.scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  }

  .site-header .logo img,
  .site-header .logo img {
    max-height: none;
    height: var(--brand-icon-h);
  }

  /* App-style nav group - horizontal icons on right */
  .site-header .pill {
    display: flex !important;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .site-header .nav-group-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  /* App-style icon buttons for mobile - clean and tappable */
  .site-header .mobile-menu-btn,
  .site-header #mobileMenuBtn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(24, 225, 255, 0.08);
    border: 1px solid rgba(24, 225, 255, 0.2);
  }

  .site-header .mobile-menu-btn span,
  .site-header #mobileMenuBtn span {
    /* Hide text on mobile, show icon only */
    display: none;
  }

  .site-header .mobile-menu-btn svg,
  .site-header #mobileMenuBtn svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  /* Sign in button - compact app style */
  .site-header #navAuth {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
  }
}

/* Extra small phones (iPhone SE, etc) - even more compact */
@media (max-width: 375px) {
  .site-header .bar,
  .site-header .bar {
    padding: 6px 12px;
    min-height: 52px;
  }

  .site-header .logo,
  .site-header .logo {
    --brand-icon-h: 36px;
    --brand-wordmark-scale: 0.75;
    gap: 6px;
  }

  .site-header .logo img.brand-wordmark,
  .site-header .logo img.brand-wordmark {
    max-width: 100px;
  }

  .site-header #navAuth {
    padding: 8px 12px;
    font-size: 13px;
  }

  .site-header .mobile-menu-btn,
  .site-header #mobileMenuBtn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .site-header .nav-group-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
}

/* Landscape mode on phones - horizontal compact header */
@media (max-width: 896px) and (orientation: landscape) {
  .site-header,
  .site-header {
    padding-top: env(safe-area-inset-top);
    min-height: 48px;
  }

  .site-header .bar,
  .site-header .bar {
    padding: 4px 16px;
    min-height: 48px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .site-header .logo,
  .site-header .logo {
    --brand-icon-h: 32px;
    --brand-wordmark-scale: 0.7;
    gap: 8px;
  }

  .site-header .mobile-menu-btn,
  .site-header #mobileMenuBtn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .site-header #navAuth {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* Small screens (incl. many phones/tablets in portrait): app-like layout */
@media (min-width: 641px) and (max-width: 768px) {
  .site-header,
  .site-header {
    height: auto;
    min-height: 56px;
  }

  .site-header .bar,
  .site-header .bar {
    flex-wrap: nowrap;
    margin-top: 0;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
  }

  .site-header .logo,
  .site-header .logo {
    --brand-icon-h: 44px;
    --brand-wordmark-scale: 0.9;
  }

  .site-header .pill {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }

  .site-header .nav-group-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  /* Icon-only menu button */
  .site-header #mobileMenuBtn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
  }

  .site-header #mobileMenuBtn span {
    display: none;
  }
}

/* Tablet sizing */
@media (min-width: 641px) and (max-width: 1023px) {
  .bar {
    padding: 7.5px 9px;
  }

  .logo {
    --brand-icon-h: 67px;
    --brand-wordmark-scale: 1.17;
  }

  .pill .btn {
    padding: 7px 12px;
    font-size: 13px;
    gap: 5px;
  }

  .pill .btn .icon {
    width: 15px;
    height: 15px;
  }
}

/* === Dropdown Menu === */
.dropdown {
  position: relative;
  display: flex;
}

.menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  transform-origin: top right;
}

.menu.show {
  display: block;
}

.menu.open {
  display: block;
  animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-item {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Notification dropdown tweaks (mobile-friendly) */
.notifications-dropdown { position: relative; }
.notifications-dropdown .menu {
  right: 0;
  left: auto;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1200;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .notifications-dropdown { position: static; }
  .notifications-dropdown .menu {
    position: fixed;
    top: calc(var(--mobile-header-height) + var(--safe-area-top) + 10px);
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    border-radius: 14px;
  }
}

/* === Mobile Drawer === */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.mobile-drawer.open {
  visibility: visible;
  transition-delay: 0s;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-drawer.open .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
}

.drawer-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-username {
  font-size: 16px;
  font-weight: 600;
  padding-left: 2px;
  /* Animated gradient like hero tagline */
  background: linear-gradient(90deg, #fff 0%, #18e1ff 25%, #fff 50%, #18e1ff 75%, #fff 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 8s ease infinite;
}

@keyframes gradientText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .drawer-username {
    animation: none;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* User info container with role badge */
.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-role-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-founder {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.badge-admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.badge-organizer {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.badge-pro {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.badge-business {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.drawer-logo {
  height: 48px;
  width: auto;
}

.drawer-logo-text {
  height: 28px;
  width: auto;
}

.drawer-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.05);
}

.drawer-nav {
  padding: 8px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  transition: background 0.15s ease;
}

.drawer-item:hover,
.drawer-item.active {
  background: rgba(24, 225, 255, 0.08);
}

.drawer-item.active {
  color: var(--teal);
}

.drawer-item .icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
}

.drawer-item.active .icon {
  opacity: 1;
}

.drawer-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 16px;
}

.drawer-label {
  padding: 16px 16px 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ============================================
   5. CARDS & PANELS
   ============================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-medium),
              box-shadow var(--transition-medium),
              border-color var(--transition-medium);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 225, 255, 0.3);
  box-shadow: 0 10px 30px -10px rgba(24, 225, 255, 0.15);
}

/* Glass card variant */
.card.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
}

/* Card padding utilities */
.g-pad-12 { padding: var(--space-md); }
.g-pad-16 { padding: var(--space-lg); }
.g-pad-20 { padding: 20px; }
.g-pad-24 { padding: var(--space-xl); }

/* ============================================
   6. FORMS & INPUTS
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--muted);
  font-size: 14px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 16px; /* Prevents iOS zoom */
  transition: all var(--transition-fast);
  /* Allow text selection in form fields */
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(24, 225, 255, 0.1);
}

/* File inputs: make the system "Choose Files" control feel like the rest of the UI */
input[type="file"].form-control {
  padding: 10px 12px;
}

input[type="file"].form-control::file-selector-button,
input[type="file"].form-control::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 225, 255, 0.3);
  background: rgba(24, 225, 255, 0.05);
  color: var(--teal);
  cursor: pointer;
  transition: all var(--transition-fast);
}

input[type="file"].form-control::file-selector-button:hover,
input[type="file"].form-control::-webkit-file-upload-button:hover {
  background: rgba(24, 225, 255, 0.15);
  border-color: var(--teal);
  box-shadow: 0 0 15px rgba(24, 225, 255, 0.15);
}

input[type="file"].form-control + .form-hint {
  margin-top: 8px;
}

/* Form validation states */
.form-control.is-valid,
input.is-valid {
  border-color: var(--teal);
}

.form-control.is-invalid,
input.is-invalid {
  border-color: var(--coral, #e57373);
  background: rgba(229, 115, 115, 0.05);
}

.form-control.is-invalid:focus,
input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(229, 115, 115, 0.15);
}

.form-hint {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  color: var(--muted);
  min-height: 16px;
}

.form-hint--error {
  color: var(--coral, #e57373);
}

.form-hint--success {
  color: var(--teal);
}

.form-hint--checking {
  color: var(--gold, #ffc107);
  font-style: italic;
}

/* Password strength meter */
.password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.password-strength__bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.password-strength__fill {
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
  border-radius: 2px;
}

.password-strength__label {
  font-size: 11px;
  color: var(--muted);
  min-width: 70px;
  text-align: right;
}

/* Form Chips (Selection Tags) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.form-chip {
  cursor: pointer;
  display: inline-block;
}

.form-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-chip .chip-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 14px;
  transition: all var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.form-chip:hover .chip-tile {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.form-chip input:checked + .chip-tile {
  background: rgba(24, 225, 255, 0.15);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 12px rgba(24, 225, 255, 0.1);
}

.form-chip input:focus-visible + .chip-tile {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ============================================
   6b. AUTH PAGES (Login, Create Account)
   ============================================ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-lg);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-container.auth-container-wide {
  max-width: 520px;
}

.auth-card {
  padding: var(--space-xl);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: var(--space-xs);
  font-size: clamp(24px, 5vw, 32px);
}

.auth-card .subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: var(--space-xl);
  font-size: 14px;
}

.auth-card .form-group {
  margin-bottom: var(--space-lg);
}

/* Form label block - standalone label above control */
.auth-card .form-label-block,
.form-label-block {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.auth-card .btn-block {
  width: 100%;
  margin-top: var(--space-lg);
}

/* Social login section */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: var(--space-xl) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider::before {
  margin-right: var(--space-md);
}

.divider::after {
  margin-left: var(--space-md);
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.social-login > div {
  display: flex;
  justify-content: center;
}

.auth-link {
  text-align: center;
  margin-top: var(--space-xl);
  color: var(--muted);
}

.auth-link a {
  color: var(--teal);
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* Step indicator for multi-step forms */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
}

.step-dot.active {
  background: var(--teal);
  transform: scale(1.2);
}

.step-dot.completed {
  background: var(--teal);
}

/* Form section title */
.form-section-title {
  font-size: 18px;
  margin-bottom: var(--space-lg);
  color: var(--text);
}

.form-group-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.checkbox-text {
  flex: 1;
  color: var(--muted);
  line-height: 1.4;
}

.checkbox-text a {
  color: var(--teal);
  text-decoration: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .auth-page {
    padding: var(--space-md);
    min-height: calc(100vh - 160px);
  }

  .auth-card {
    padding: var(--space-lg);
  }

  .auth-card h1 {
    font-size: 24px;
  }
}

/* ============================================
   7. BUTTONS & INTERACTIVE ELEMENTS
   ============================================ */
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 14px;
  background: #16202b;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:active,
button:active {
  transform: scale(0.98);
}

/* Primary button */
.btn-primary,
.btn.teal {
  background: linear-gradient(135deg, rgba(24, 225, 255, 0.2), rgba(24, 225, 255, 0.1));
  border-color: rgba(24, 225, 255, 0.4);
  color: var(--teal);
}

.btn-primary:hover,
.btn.teal:hover {
  background: linear-gradient(135deg, rgba(24, 225, 255, 0.3), rgba(24, 225, 255, 0.15));
  box-shadow: 0 0 20px rgba(24, 225, 255, 0.2);
}

/* Secondary button */
.btn-secondary {
  background: transparent;
  border-color: var(--line);
}

/* Icon in button */
.btn .icon,
button .icon {
  width: 16px;
  height: 16px;
}

/* Chips */
.chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.chip,
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: #0f161d;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip.active,
.chip-toggle.is-active {
  color: var(--teal);
  border-color: rgba(24, 225, 255, 0.4);
  background: rgba(24, 225, 255, 0.1);
}

/* ============================================
   8. PAGE-SPECIFIC SECTIONS
   ============================================ */

/* Trust Signals Section */
.trust-signals {
  background: linear-gradient(135deg, rgba(24, 225, 255, 0.05), rgba(255, 106, 32, 0.03));
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(24, 225, 255, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.trust-value {
  color: var(--text);
  font-size: 1.25rem;
}

/* Hero Section */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
}

.hero-images {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-images img.is-active {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl);
}

/* Section titles */
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(20px, 4vw, 24px);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
}

/* ============================================
   9. MOBILE BOTTOM NAVIGATION (iOS-style Tab Bar)
   ============================================ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--mobile-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: rgba(11, 15, 18, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

/* Show bottom nav on mobile */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  min-width: 56px;
  transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-item svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item.active {
  color: var(--teal);
}

.mobile-bottom-nav .nav-item:active svg {
  transform: scale(0.9);
}

/* Scan Button - Elevated Center Button */
.mobile-bottom-nav .scan-btn {
  position: relative;
  margin-top: -28px;
  background: linear-gradient(135deg, var(--teal), #0ea5c7);
  color: #0b0f12;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(24, 225, 255, 0.4),
              0 0 40px rgba(24, 225, 255, 0.15);
}

.mobile-bottom-nav .scan-btn span {
  display: none;
}

.mobile-bottom-nav .scan-btn svg {
  width: 28px;
  height: 28px;
}

.mobile-bottom-nav .scan-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 12px rgba(24, 225, 255, 0.3);
}

/* Menu button in bottom nav */
.mobile-bottom-nav .nav-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
}

/* Expandable Browse with sub-menu */
.mobile-bottom-nav .nav-expand {
  position: relative;
  padding: 0;
}

.mobile-bottom-nav .nav-expand-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--muted);
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 500;
  min-width: 56px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-expand-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-expand.is-active .nav-expand-btn,
.mobile-bottom-nav .nav-expand-btn.active,
.mobile-bottom-nav .nav-expand-btn:focus {
  color: var(--teal);
}

/* Sub-menu popup */
.mobile-bottom-nav .nav-submenu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(17, 22, 28, 0.98);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
  min-width: 140px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(24, 225, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1001;
}

.mobile-bottom-nav .nav-expand.is-open .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.mobile-bottom-nav .nav-submenu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-bottom-nav .nav-submenu-item svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.mobile-bottom-nav .nav-submenu-item:hover,
.mobile-bottom-nav .nav-submenu-item:focus {
  background: rgba(24, 225, 255, 0.1);
  color: var(--teal);
}

.mobile-bottom-nav .nav-submenu-item:hover svg,
.mobile-bottom-nav .nav-submenu-item:focus svg {
  color: var(--teal);
}

.mobile-bottom-nav .nav-submenu-item:active {
  background: rgba(24, 225, 255, 0.2);
  transform: scale(0.98);
}

.mobile-bottom-nav .nav-submenu-item.active {
  background: rgba(24, 225, 255, 0.15);
  color: var(--teal);
}

.mobile-bottom-nav .nav-submenu-item.active svg {
  color: var(--teal);
}

/* Arrow indicator on submenu */
.mobile-bottom-nav .nav-submenu::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(17, 22, 28, 0.98);
  border-bottom: 0;
}

/* Add bottom padding when nav is visible */
@media (max-width: 768px) {
  main {
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 16px) !important;
  }
}

/* Honor DeviceManager view preference even on wide screens */
.view-mobile .mobile-bottom-nav {
  display: flex;
}

.view-desktop .mobile-bottom-nav {
  display: none !important;
}

.view-mobile .quick-actions {
  display: grid;
}

.view-desktop .quick-actions {
  display: none !important;
}

.view-mobile .stats-row {
  display: flex;
}

.view-desktop .stats-row {
  display: none !important;
}

.view-mobile main {
  padding-bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 8px) !important;
}

/* ============================================
   9.1 MOBILE QUICK ACTIONS GRID
   ============================================ */
.quick-actions {
  display: none; /* Hidden on desktop by default */
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 0;
}

@media (max-width: 768px) {
  .quick-actions {
    display: grid;
  }
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.quick-action svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

.quick-action:active {
  transform: scale(0.97);
  background: rgba(24, 225, 255, 0.05);
}

.quick-action.primary {
  background: linear-gradient(135deg, rgba(24, 225, 255, 0.15), rgba(24, 225, 255, 0.05));
  border-color: rgba(24, 225, 255, 0.3);
}

.quick-action.primary svg {
  color: var(--teal);
}

/* ============================================
   9.2 MOBILE STATS ROW
   ============================================ */
.stats-row {
  display: none;
  justify-content: space-around;
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 16px 0;
}

@media (max-width: 768px) {
  .stats-row {
    display: flex;
  }
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ============================================
   9.3 MOBILE HORIZONTAL SCROLL CARDS
   ============================================ */
.scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.scroll-card:active {
  transform: scale(0.98);
}

.scroll-card .card-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.scroll-card .card-body {
  padding: 12px;
}

.scroll-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroll-card .card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Event Card Variant */
.scroll-card.event-card .event-date {
  font-size: 11px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* ============================================
   9.4 MOBILE SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 12px;
}

.section-header h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.section-header a {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

/* ============================================
   9.5 MOBILE HERO
   ============================================ */
@media (max-width: 768px) {
  .mobile-hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    margin: -16px -16px 0;
    background: linear-gradient(to bottom, transparent, var(--bg));
  }

  .mobile-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11,15,18,0.2) 0%, rgba(11,15,18,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 16px;
  }

  .mobile-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  }

  .mobile-hero .tagline {
    font-size: 14px;
    color: var(--muted);
    margin: 8px 0 0;
  }
}

/* ============================================
   9.6 MOBILE CTA BANNER
   ============================================ */
.cta-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(24, 225, 255, 0.1), rgba(24, 225, 255, 0.02));
  border: 1px solid rgba(24, 225, 255, 0.2);
  border-radius: 16px;
  margin: 24px 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.cta-banner:active {
  background: rgba(24, 225, 255, 0.15);
}

.cta-banner svg {
  width: 48px;
  height: 48px;
  color: var(--teal);
  flex-shrink: 0;
}

.cta-banner .cta-text h3 {
  font-size: 16px;
  margin: 0;
}

.cta-banner .cta-text p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* ============================================
   9.7 BOTTOM SHEETS (iOS-style)
   ============================================ */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panel);
  border-radius: 24px 24px 0 0;
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-mini {
  max-height: 50vh;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 12px auto 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.sheet-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 12px;
}

.sheet-close:active {
  background: rgba(255, 255, 255, 0.1);
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.sheet-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + var(--safe-area-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
}

.sheet-footer .btn-clear {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

.sheet-footer .btn-apply {
  flex: 2;
  padding: 14px;
  background: var(--teal);
  border: none;
  border-radius: 12px;
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================
   9.9 MOBILE CARDS (Touch-Optimized)
   ============================================ */
.mobile-car-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  height: 120px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

.mobile-car-card:active {
  transform: scale(0.98);
}

.mobile-car-card .card-image {
  width: 120px;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.mobile-car-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-car-card .card-body {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.mobile-car-card .card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-car-card .card-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.mobile-car-card .badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(24, 225, 255, 0.1);
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: auto;
  width: fit-content;
}

/* ============================================
   9.10 MOBILE EVENT CARDS (Large Format)
   ============================================ */
.event-card-large {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  transition: transform 0.15s ease;
}

.event-card-large:active {
  transform: scale(0.98);
}

.event-card-large img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.event-card-large .event-card-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
  pointer-events: none;
}

.event-card-large .event-card-overlay .chip {
  padding: 4px 8px;
  font-size: 12px;
}

.event-card-large .body {
  padding: 16px;
}

.event-card-large .date {
  font-size: 12px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.event-card-large h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 600;
}

.event-card-large .location {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   9.11 MOBILE PROFILE HEADER
   ============================================ */
.profile-header {
  text-align: center;
  padding: 32px 16px;
  background: linear-gradient(180deg, rgba(24, 225, 255, 0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--line);
  margin: 0 -16px 16px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0ea5c7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 20px rgba(24, 225, 255, 0.3);
}

.profile-name {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.profile-handle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
}

.profile-stat .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   9.12 MOBILE COLLECTION GRID
   ============================================ */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.collection-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

.collection-card:active {
  transform: scale(0.98);
}

.collection-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.collection-card .info {
  padding: 10px;
}

.collection-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-card .meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================
   9.13 EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.empty-state svg {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text);
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 20px;
  font-size: 14px;
}

.empty-state .btn {
  display: inline-flex;
  padding: 14px 28px;
  background: var(--teal);
  color: var(--bg);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
}

/* ============================================
   9.14 MOBILE SORT OPTIONS
   ============================================ */
.sort-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sort-option:active {
  background: rgba(255, 255, 255, 0.05);
}

.sort-option .check-icon {
  opacity: 0;
  color: var(--teal);
}

.sort-option.active {
  color: var(--teal);
}

.sort-option.active .check-icon {
  opacity: 1;
}

/* ============================================
   9.15 MOBILE SEARCH BAR (Sticky)
   ============================================ */
@media (max-width: 768px) {
  .mobile-search-bar {
    position: sticky;
    top: 64px;
    left: 0;
    right: 0;
    height: var(--mobile-search-height);
    background: var(--bg);
    padding: 8px 16px;
    z-index: 99;
    border-bottom: 1px solid var(--line);
  }

  .search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    height: 44px;
    gap: 10px;
  }

  .search-input-wrap:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(24, 225, 255, 0.1);
  }

  .search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    outline: none;
  }

  .search-input-wrap input::placeholder {
    color: var(--muted);
  }
}

/* ============================================
   9.16 MOBILE RESULTS BAR
   ============================================ */
@media (max-width: 768px) {
  .mobile-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
  }

  .sort-btn:active {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ============================================
   10. UTILITIES & HELPERS
   ============================================

   UTILITY CLASS QUICK REFERENCE
   ─────────────────────────────────────────────

   LAYOUT
   ├─ .flex             → display: flex
   ├─ .flex-between     → flex + justify-between + align-center
   ├─ .flex-center      → flex + center both axes
   ├─ .grid             → display: grid with gap
   ├─ .grid.duo         → 2-column grid (responsive)
   ├─ .full-width       → width: 100%
   ├─ .self-end         → align-self: flex-end
   └─ .self-center      → align-self: center

   SPACING
   ├─ .mt-8/12/16/24    → margin-top in px
   ├─ .mb-8/12/16       → margin-bottom in px
   ├─ .mt-n2, .mt-n3    → negative margin-top (-8px, -10px)
   └─ .gap-8/12/16      → gap in px

   TYPOGRAPHY
   ├─ .text-center      → text-align: center
   ├─ .text-muted       → color: var(--muted)
   ├─ .text-teal        → color: var(--teal)
   ├─ .text-capitalize  → text-transform: capitalize
   └─ .font-extrabold   → font-weight: 800

   ANIMATION
   ├─ .delay-1/2/3/4    → animation-delay: 0.1s-0.4s
   └─ .fade-in-up       → fadeInUp animation class

   VISIBILITY
   ├─ .visually-hidden  → screen reader only
   ├─ .hidden           → display: none
   ├─ .hide-mobile      → hidden on mobile
   └─ .hide-desktop     → hidden on desktop

   FORMS
   ├─ .form-control     → styled input/select
   ├─ .form-label-block → standalone label above control
   └─ .input-group      → input with inline button

   LINKS
   └─ .link-reset       → no decoration, inherit color

   COMPONENTS
   ├─ .card.glass       → glassmorphic card
   ├─ .chip-toggle      → filter chip button
   ├─ .skeleton         → loading skeleton base
   ├─ .skeleton-card    → card-shaped skeleton
   └─ .btn-primary/outline/ghost → button variants

   ─────────────────────────────────────────────
*/
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Layout Utilities */
.relative { position: relative !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-screen-md { max-width: 768px; }
.max-w-screen-lg { max-width: 1024px; }
.max-w-screen-xl { max-width: var(--container-xl); }
.full-width { width: 100%; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.pb-20 { padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-safe { padding-top: env(safe-area-inset-top, 0px); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }

.text-center { text-align: center; }
.justify-center { justify-content: center; }
.text-muted { color: var(--muted); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.text-teal { color: var(--teal); }
.text-capitalize { text-transform: capitalize; }
.font-extrabold { font-weight: 800; }
.underline { text-decoration: underline !important; }

/* Negative margins */
.mt-n2 { margin-top: -8px; }
.mt-n3 { margin-top: -10px; }

/* Animation delays (staggered entrance) */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Link reset (for link wrappers) */
.link-reset { text-decoration: none; color: inherit; }

/* Flexbox alignment */
.self-end { align-self: flex-end; }
.self-center { align-self: center; }

/* Full width */
.full-width { width: 100%; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Hide on specific views */
.hide-mobile { display: block; }
.hide-desktop { display: none !important; }

.view-mobile .hide-mobile,
.device-mobile .hide-mobile { display: none !important; }

.view-mobile .hide-desktop,
.device-mobile .hide-desktop { display: flex !important; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: flex !important; }
}

.hidden { display: none !important; }
.block { display: block !important; }
.w-full { width: 100% !important; }
.max-w-full { max-width: 100% !important; }
.opacity-50 { opacity: 0.5 !important; }
.mt-3 { margin-top: 0.75rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-white-40 { color: rgba(255, 255, 255, 0.4) !important; }

/* Color Utilities for Studio */
.bg-red { background-color: #ff0000 !important; }
.bg-blue { background-color: #0000ff !important; }
.bg-white { background-color: #ffffff !important; }
.bg-black { background-color: #000000 !important; }
.bg-yellow { background-color: #ffff00 !important; }
.bg-green { background-color: #00ff00 !important; }
.bg-purple { background-color: #ff00ff !important; }
.bg-orange { background-color: #ffa500 !important; }

/* Additional Utilities */
.mb-4 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.p-5 { padding: 1.25rem !important; }
.border-t { border-top: 1px solid rgba(255, 255, 255, 0.1) !important; }
.text-teal-accent { color: var(--teal-accent) !important; }
.no-underline { text-decoration: none !important; }
.opacity-80 { opacity: 0.8 !important; }
.w-15 { width: 60px !important; }
.h-15 { height: 60px !important; }
.text-error-light { color: #ffb4a7 !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-4xl { font-size: 2rem !important; }
.my-6 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.w-fit { width: fit-content !important; }
.p-0 { padding: 0 !important; }
.bg-transparent { background: transparent !important; }
.border-none { border: none !important; }
.backdrop-none { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.items-start { align-items: flex-start !important; }
.text-base { font-size: 1rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-xs { font-size: 0.75rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.gap-2 { gap: 0.5rem !important; }
.col-span-full { grid-column: 1 / -1 !important; }
.p-4 { padding: 1rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.h-1 { height: 0.25rem !important; }
.left-15 { left: 15% !important; }
.left-45 { left: 45% !important; }
.left-85 { left: 85% !important; }
.top-15 { top: 15% !important; }
.top-25 { top: 25% !important; }
.top-75 { top: 75% !important; }
.delay-0 { animation-delay: 0s !important; }
.delay-neg-2 { animation-delay: -2s !important; }
.delay-neg-5 { animation-delay: -5s !important; }
.left-25 { left: 25% !important; }
.left-75 { left: 75% !important; }
.top-65 { top: 65% !important; }
.top-85 { top: 85% !important; }
.delay-neg-4 { animation-delay: -4s !important; }
.delay-neg-7 { animation-delay: -7s !important; }
.fixed { position: fixed !important; }
.opacity-0 { opacity: 0 !important; }
.opacity-100 { opacity: 1 !important; }
.overflow-hidden { overflow: hidden !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.inline-block { display: inline-block !important; }
.opacity-0 { opacity: 0 !important; }
.opacity-100 { opacity: 1 !important; }
.gp-toast {
  position: fixed;
  bottom: calc(80px + var(--safe-area-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--panel, #11161c);
  color: var(--text, #e9f3f6);
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid var(--line, #1b2330);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  z-index: 10000;
  font-size: 14px;
  transition: transform 0.3s ease;
}
.gp-toast--success { border-color: var(--good, #41d79e) !important; }
.gp-toast--error { border-color: var(--error, #ff6b6b) !important; }
.gp-toast-in { transform: translateX(-50%) translateY(0) !important; }
.gp-toast-out { transform: translateX(-50%) translateY(100px) !important; }
.opacity-60 { opacity: 0.6 !important; }
.qr-hoodie { width: 60px !important; height: 60px !important; bottom: 20px !important; right: 20px !important; top: auto !important; left: auto !important; transform: none !important; }
.qr-tag { width: 80px !important; height: 80px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; }
.qr-banner { width: 120px !important; height: 120px !important; bottom: 40px !important; right: 40px !important; top: auto !important; left: auto !important; transform: none !important; }
.qr-cling { width: 100px !important; height: 100px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; }
.rotate-180 { transform: rotate(180deg) !important; }

/* ============================================
   11. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bgPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Card Reveal - Flip/Scale entrance for new cards */
@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateY(-90deg) scale(0.8);
  }
  40% {
    opacity: 1;
    transform: perspective(1000px) rotateY(15deg) scale(1.05);
  }
  60% {
    transform: perspective(1000px) rotateY(-8deg) scale(1.02);
  }
  80% {
    transform: perspective(1000px) rotateY(4deg) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateY(0) scale(1);
  }
}

@keyframes cardRevealGlow {
  0% {
    box-shadow: 0 0 0 0 var(--cc-glow);
  }
  50% {
    box-shadow: 0 0 40px 8px var(--cc-glow), 0 0 80px 16px var(--cc-glow);
  }
  100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 0 var(--cc-glow);
  }
}

@keyframes cardRevealShine {
  0% {
    opacity: 0;
    transform: translateX(-150%) rotate(15deg);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(150%) rotate(15deg);
  }
}

/* Apply reveal animation to cards */
.car-card.reveal {
  animation: cardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             cardRevealGlow 1.2s ease-out forwards;
  transform-style: preserve-3d;
}

.car-card.reveal .thumb::after {
  animation: cardRevealShine 0.8s 0.3s ease-out forwards;
}

/* Staggered reveal for multiple cards */
.car-card.reveal.delay-1 { animation-delay: 0.1s, 0.1s; }
.car-card.reveal.delay-2 { animation-delay: 0.2s, 0.2s; }
.car-card.reveal.delay-3 { animation-delay: 0.3s, 0.3s; }
.car-card.reveal.delay-4 { animation-delay: 0.4s, 0.4s; }
.car-card.reveal.delay-5 { animation-delay: 0.5s, 0.5s; }

/* Pack opening - dramatic multi-card reveal */
@keyframes packReveal {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateX(90deg) translateY(-50px) scale(0.6);
  }
  30% {
    opacity: 1;
  }
  50% {
    transform: perspective(1200px) rotateX(-15deg) translateY(0) scale(1.1);
  }
  70% {
    transform: perspective(1200px) rotateX(8deg) scale(1.02);
  }
  100% {
    transform: perspective(1200px) rotateX(0) scale(1);
  }
}

.car-card.pack-reveal {
  animation: packReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             cardRevealGlow 1.4s ease-out forwards;
  transform-style: preserve-3d;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .car-card.reveal,
  .car-card.pack-reveal {
    animation: fadeIn 0.3s ease forwards;
  }
  .car-card.reveal .thumb::after {
    animation: none;
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--teal) 70%, var(--accent) 100%);
  box-shadow: 0 0 10px var(--teal);
  z-index: 9999;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, rgba(255,255,255,0.05) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   12. PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  header, footer, .bottom-nav, .view-toggle, .view-preference, #gp-view-toggle {
    display: none !important;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Hero Lite - For inner pages */
.hero-lite {
  position: relative;
  padding: var(--space-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 160px;
}

.hero-lite .hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-lite .tagline {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: var(--space-sm);
  background: linear-gradient(to right, #fff, #9db2bf);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lite .hero-decoration {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background:
    radial-gradient(circle at 70% 50%, rgba(24, 225, 255, 0.1) 0%, transparent 60%),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.03) 10px, rgba(255, 255, 255, 0.03) 20px);
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent, black);
  mask-image: linear-gradient(to right, transparent, black);
}


/* ============================================
   13. BROWSE PAGE ENHANCEMENTS
   ============================================ */

/* Hero Lite - Browse Header */

/* Fix Header Z-Index */
.site-header { z-index: 1000 !important; }

/* Improve View Toggle on Mobile */
@media (max-width: 640px) {
  .view-preference__controls .view-chip {
    padding: 12px;
    font-size: 14px;
  }
}
.hero-lite {
  position: relative;
  overflow: hidden;
  padding: 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(17, 22, 28, 0.9) 0%, rgba(11, 15, 18, 0.95) 100%);
}

/* Background Image for Header */
.hero-lite::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  background-image: url('../Pictures/C6Z.JPG'); /* Using the C6Z image found in Pictures */
  background-size: cover;
  background-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60%);
  mask-image: linear-gradient(to right, transparent 0%, black 60%);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-lite .tagline {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #9db2bf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Filter Box Styling */
.filters-sidebar .card.glass {
  background: rgba(17, 22, 28, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 24px;
}

.filters-sidebar .section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px !important;
  letter-spacing: 1px;
  color: var(--teal);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(24, 225, 255, 0.2);
  padding-bottom: 12px;
  margin-bottom: 20px !important;
}

.filters-form .field-group {
  margin-bottom: 24px;
  width: 100%; /* Ensure groups take full width */
}

.filters-form .field {
  width: 100%; /* Ensure field containers take full width */
}

.filters-form .field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}

.filters-form .field input,
.filters-form .field select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s ease;
  width: 100%; /* Ensure inputs take full width */
}

.filters-form .field input:focus,
.filters-form .field select:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(24, 225, 255, 0.1);
}

/* Quick Filter Chips (Horizontal Scroll) */
.chip-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 4px 12px 4px; /* Even top/bottom padding */
  margin-bottom: 24px; /* Increased space below */
  scrollbar-width: none; /* Firefox */
}

.chip-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.chip-scroll-container .chip-toggle {
  flex-shrink: 0;
  white-space: nowrap;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.chip-scroll-container .chip-toggle.is-active {
  background: rgba(24, 225, 255, 0.15);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 12px rgba(24, 225, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────
   Car Card – Consistent Media + Spacing
   ───────────────────────────────────────────────────────── */
.car-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  --cc-border: rgba(255, 255, 255, 0.14);
  --cc-glow: rgba(24, 225, 255, 0.14);
  --cc-tier-bg: rgba(0, 0, 0, 0.55);
  --cc-tier-fg: rgba(255, 255, 255, 0.92);
  --cc-tier-border: rgba(255, 255, 255, 0.14);
  --cc-foil: rgba(255, 255, 255, 0.18);
}

.car-card[data-tier="STREET"] {
  --cc-border: rgba(255, 255, 255, 0.12);
  --cc-glow: rgba(255, 255, 255, 0.06);
  --cc-foil: rgba(255, 255, 255, 0.12);
}

.car-card[data-tier="NEON"] {
  --cc-border: rgba(24, 225, 255, 0.35);
  --cc-glow: rgba(24, 225, 255, 0.18);
  --cc-tier-fg: var(--teal);
  --cc-tier-border: rgba(24, 225, 255, 0.34);
  --cc-foil: rgba(24, 225, 255, 0.22);
}

.car-card[data-tier="SKYE"] {
  --cc-border: rgba(59, 130, 246, 0.35);
  --cc-glow: rgba(59, 130, 246, 0.16);
  --cc-tier-fg: rgba(147, 197, 253, 0.95);
  --cc-tier-border: rgba(59, 130, 246, 0.38);
  --cc-foil: rgba(59, 130, 246, 0.22);
}

.car-card[data-tier="NOVA"] {
  --cc-border: rgba(255, 193, 7, 0.35);
  --cc-glow: rgba(255, 193, 7, 0.16);
  --cc-tier-fg: rgba(255, 193, 7, 0.95);
  --cc-tier-border: rgba(255, 193, 7, 0.4);
  --cc-foil: rgba(255, 106, 32, 0.22);
}

.car-card[data-tier="APEX"] {
  --cc-border: rgba(255, 193, 7, 0.35);
  --cc-glow: rgba(255, 193, 7, 0.16);
  --cc-tier-fg: rgba(255, 193, 7, 0.95);
  --cc-tier-border: rgba(255, 193, 7, 0.4);
  --cc-foil: rgba(255, 106, 32, 0.22);
}

.car-card[data-tier="COSMIC"] {
  --cc-border: rgba(188, 19, 254, 0.38);
  --cc-glow: rgba(188, 19, 254, 0.18);
  --cc-tier-fg: rgba(255, 255, 255, 0.95);
  --cc-tier-border: rgba(188, 19, 254, 0.44);
  --cc-foil: rgba(188, 19, 254, 0.22);
}

/* COSMIC Shimmer - Animated aurora effect for legendary tier */
@keyframes cosmicAurora {
  0%, 100% {
    background-position: 0% 50%, 100% 50%;
    filter: hue-rotate(0deg);
  }
  25% {
    background-position: 100% 50%, 0% 50%;
  }
  50% {
    background-position: 100% 100%, 0% 0%;
    filter: hue-rotate(30deg);
  }
  75% {
    background-position: 0% 100%, 100% 0%;
  }
}

@keyframes cosmicPulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(188, 19, 254, 0.3),
      0 0 40px rgba(188, 19, 254, 0.15),
      inset 0 0 30px rgba(188, 19, 254, 0.05);
  }
  50% {
    box-shadow:
      0 0 30px rgba(188, 19, 254, 0.5),
      0 0 60px rgba(188, 19, 254, 0.25),
      0 0 100px rgba(147, 51, 234, 0.15),
      inset 0 0 40px rgba(188, 19, 254, 0.08);
  }
}

@keyframes cosmicParticle {
  0% {
    transform: translateY(100%) translateX(-50%) scale(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100%) translateX(50%) scale(1);
    opacity: 0;
  }
}

@keyframes cosmicStarTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.car-card[data-tier="COSMIC"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background:
    linear-gradient(135deg,
      rgba(188, 19, 254, 0.6) 0%,
      rgba(147, 51, 234, 0.4) 25%,
      rgba(79, 70, 229, 0.5) 50%,
      rgba(147, 51, 234, 0.4) 75%,
      rgba(188, 19, 254, 0.6) 100%),
    linear-gradient(45deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(255, 255, 255, 0.1) 100%);
  background-size: 200% 200%, 200% 200%;
  animation: cosmicAurora 8s ease infinite;
  z-index: -1;
  opacity: 0.8;
}

.car-card[data-tier="COSMIC"] {
  animation: cosmicPulse 3s ease-in-out infinite;
}

/* Cosmic particles overlay */
.car-card[data-tier="COSMIC"] .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(188, 19, 254, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 80% 50%, rgba(147, 51, 234, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 90% 85%, rgba(188, 19, 254, 0.7), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 30% 90%, rgba(79, 70, 229, 0.8), transparent);
  animation: cosmicStarTwinkle 2s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Enhanced foil sweep for COSMIC */
.car-card[data-tier="COSMIC"] .thumb::after {
  background: linear-gradient(
    120deg,
    transparent 25%,
    rgba(188, 19, 254, 0.3) 40%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(147, 51, 234, 0.3) 60%,
    transparent 75%
  );
  filter: blur(0.5px);
}

.car-card[data-tier="COSMIC"]:hover .thumb::after {
  opacity: 1;
}

/* Cosmic tier badge glow */
.car-card[data-tier="COSMIC"] .card-tier {
  background: linear-gradient(135deg, rgba(188, 19, 254, 0.4), rgba(79, 70, 229, 0.4));
  border-color: rgba(188, 19, 254, 0.6);
  box-shadow:
    0 0 15px rgba(188, 19, 254, 0.4),
    0 10px 22px rgba(0, 0, 0, 0.38);
  text-shadow: 0 0 10px rgba(188, 19, 254, 0.8);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .car-card[data-tier="COSMIC"]::before,
  .car-card[data-tier="COSMIC"],
  .car-card[data-tier="COSMIC"] .thumb::before {
    animation: none;
  }
}

.car-card .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(0, 0, 0, 0.25);
}

.car-card .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 20% 0%, rgba(255, 255, 255, 0.12), transparent 62%),
    radial-gradient(80% 70% at 90% 100%, rgba(24, 225, 255, 0.1), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}

.car-card .thumb::after {
  content: "";
  position: absolute;
  inset: -60% -40%;
  background: linear-gradient(120deg, transparent 35%, var(--cc-foil) 48%, transparent 60%);
  transform: translateX(-18%) rotate(10deg);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(0.25px);
  transition: opacity 0.25s ease, transform 0.65s ease;
  z-index: 1;
}

.car-card:hover .thumb::after {
  opacity: 0.92;
  transform: translateX(18%) rotate(10deg);
}

.car-card .thumb img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-bottom: none;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.car-card .thumb .badge {
  z-index: 2;
}

/* ─── VERIFIED OWNER BADGE ─── */
/* Shield icon shown for verified owners */
.verified-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #14b8a6; /* Teal to match brand */
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.4));
  transition: transform 0.15s ease, filter 0.15s ease;
}

.verified-owner-badge:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.6));
}

.verified-owner-badge svg {
  width: 16px;
  height: 16px;
}

/* Verified badge in card grid - positioned in thumb overlay */
.car-card .verified-owner-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.car-card .verified-owner-badge svg {
  width: 14px;
  height: 14px;
}

.car-card .card-tier {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cc-tier-bg);
  border: 1px solid var(--cc-tier-border);
  color: var(--cc-tier-fg);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.car-card .card-tier-stars {
  font-size: 10px;
  opacity: 0.9;
  letter-spacing: 0.14em;
}

/* ─── RARITY TOOLTIP ─── */
/* Shows tier calculation breakdown on hover/tap */
.card-tier[data-breakdown] {
  cursor: help;
  position: relative;
}

.card-tier[data-breakdown]::after {
  content: attr(data-breakdown);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  min-width: 160px;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: pre-line;
  line-height: 1.6;
  text-align: left;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Tooltip arrow */
.card-tier[data-breakdown]::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(15, 15, 20, 0.95);
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

/* Show tooltip on hover (desktop) */
.card-tier[data-breakdown]:hover::after,
.card-tier[data-breakdown]:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.card-tier[data-breakdown]:hover::before,
.card-tier[data-breakdown]:focus::before {
  opacity: 1;
  visibility: visible;
}

/* Focusable for tap/keyboard (mobile + a11y) */
.card-tier[data-breakdown][tabindex] {
  outline: none;
}

.card-tier[data-breakdown][tabindex]:focus {
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 0 2px var(--cc-glow, rgba(255, 255, 255, 0.3));
}

/* Keep tooltip on left when near right edge */
.card-tier[data-breakdown].tooltip-left::after {
  left: 0;
  transform: translateX(0) scale(1);
}

.card-tier[data-breakdown].tooltip-left::before {
  left: 20px;
  transform: translateX(0);
}

/* Reduce motion: instant show/hide */
@media (prefers-reduced-motion: reduce) {
  .card-tier[data-breakdown]::after,
  .card-tier[data-breakdown]::before {
    transition: none;
  }
}
/* ─── END RARITY TOOLTIP ─── */

.car-card .card-serial {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  z-index: 2;
}

.car-card .body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.car-card .body > h3 {
  margin: 0;
  padding: 0;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.car-card .body > .meta {
  margin: 0;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-card .body > .meta .owner {
  color: var(--teal);
  font-weight: 500;
}

.car-card .actions {
  margin-top: auto;
}

.full-width {
  width: 100%;
}

.car-card:hover .thumb img {
  transform: scale(1.08);
}

.card.car-card:hover {
  border-color: var(--cc-border) !important;
  box-shadow: 0 10px 30px -10px var(--cc-glow), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.card.car-card:focus-within {
  border-color: var(--cc-border) !important;
  box-shadow: 0 0 0 2px rgba(24, 225, 255, 0.14), 0 10px 30px -10px var(--cc-glow);
}

@media (prefers-reduced-motion: reduce) {
  .car-card .thumb::after {
    transition: none;
  }
  .car-card:hover .thumb::after {
    opacity: 0.25;
    transform: none;
  }
}

/* ─────────────────────────────────────────────────────────
   Card Reveal Animation - The Dopamine Moment
   ───────────────────────────────────────────────────────── */
.car-card.reveal {
  opacity: 0;
  transform: scale(0.92) rotateX(8deg);
  transform-origin: center bottom;
  transition: opacity 0.4s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.car-card.reveal.is-visible {
  opacity: 1;
  transform: scale(1) rotateX(0deg);
}

/* Staggered reveal for grid items */
.car-card.reveal:nth-child(1) { transition-delay: 0ms; }
.car-card.reveal:nth-child(2) { transition-delay: 60ms; }
.car-card.reveal:nth-child(3) { transition-delay: 120ms; }
.car-card.reveal:nth-child(4) { transition-delay: 180ms; }
.car-card.reveal:nth-child(5) { transition-delay: 240ms; }
.car-card.reveal:nth-child(6) { transition-delay: 300ms; }
.car-card.reveal:nth-child(n+7) { transition-delay: 350ms; }

/* First-time reveal flash effect */
.car-card.reveal.is-visible::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.25), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  animation: card-reveal-flash 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes card-reveal-flash {
  0% { opacity: 0.8; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* ─────────────────────────────────────────────────────────
   COSMIC Tier - Animated Shimmer & Particles
   ───────────────────────────────────────────────────────── */
.car-card[data-tier="COSMIC"] {
  --cosmic-shimmer-1: rgba(188, 19, 254, 0.4);
  --cosmic-shimmer-2: rgba(99, 102, 241, 0.3);
  --cosmic-shimmer-3: rgba(236, 72, 153, 0.35);
}

/* Aurora border glow */
.car-card[data-tier="COSMIC"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    var(--cosmic-shimmer-1),
    var(--cosmic-shimmer-2),
    var(--cosmic-shimmer-3),
    var(--cosmic-shimmer-1)
  );
  background-size: 300% 300%;
  animation: cosmic-aurora 4s ease infinite;
  z-index: -1;
  opacity: 0.7;
  filter: blur(8px);
}

@keyframes cosmic-aurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Particle shimmer overlay */
.car-card[data-tier="COSMIC"] .thumb::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(188, 19, 254, 0.4) 1px, transparent 1px),
    radial-gradient(circle at 70% 20%, rgba(99, 102, 241, 0.35) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.3) 1.5px, transparent 1.5px),
    radial-gradient(70% 60% at 20% 0%, rgba(255, 255, 255, 0.15), transparent 62%),
    radial-gradient(80% 70% at 90% 100%, rgba(188, 19, 254, 0.15), transparent 55%);
  background-size: 100px 100px, 120px 120px, 80px 80px, 90px 90px, 70px 70px, 100% 100%, 100% 100%;
  animation: cosmic-particles 8s linear infinite;
  opacity: 0.6;
}

@keyframes cosmic-particles {
  0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 100px 100px, -120px 120px, 80px -80px, -90px 90px, 70px 70px, 0 0, 0 0; }
}

/* COSMIC tier badge pulse */
.car-card[data-tier="COSMIC"] .card-tier {
  animation: cosmic-badge-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.5), 0 10px 22px rgba(0, 0, 0, 0.38);
}

@keyframes cosmic-badge-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(188, 19, 254, 0.5), 0 10px 22px rgba(0, 0, 0, 0.38); }
  50% { box-shadow: 0 0 30px rgba(188, 19, 254, 0.7), 0 0 40px rgba(99, 102, 241, 0.3), 0 10px 22px rgba(0, 0, 0, 0.38); }
}

/* Reduced motion: disable animations */
@media (prefers-reduced-motion: reduce) {
  .car-card.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .car-card.reveal::before {
    animation: none;
  }
  .car-card[data-tier="COSMIC"]::before,
  .car-card[data-tier="COSMIC"] .thumb::before,
  .car-card[data-tier="COSMIC"] .card-tier {
    animation: none;
  }
}

/* ─────────────────────────────────────────────────────────
   Share Button - Card Actions
   ───────────────────────────────────────────────────────── */
.card-share {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.card-share:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.1);
  color: var(--teal);
  border-color: rgba(24, 225, 255, 0.3);
}

.card-share:active {
  transform: scale(0.95);
}

.card-share svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.card-share.copied {
  background: rgba(24, 225, 255, 0.2);
  border-color: rgba(24, 225, 255, 0.4);
  color: var(--teal);
}

/* Heart Icon Overlay */
.card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.card-heart:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.card-heart.active {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.15);
  border-color: rgba(255, 71, 87, 0.3);
}

.card-heart svg {
  width: 18px;
  height: 18px;
  fill: currentColor; /* Allows solid fill when active if using fill-rule */
}

/* Exhaust Audio Button */
.card-exhaust {
  position: absolute;
  top: 10px;
  right: 50px; /* Next to heart button */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.card-exhaust:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.card-exhaust.playing {
  color: var(--primary);
  background: rgba(0, 200, 170, 0.15);
  border-color: rgba(0, 200, 170, 0.3);
  animation: exhaust-pulse 1s ease infinite;
}

@keyframes exhaust-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.card-exhaust svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Card Stats Row */
.card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.car-card:hover .card-stats {
  opacity: 1;
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-stat svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Link-styled buttons for accessibility */
.link-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.link-btn:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* ============================================
   14. EVENTS PAGE ENHANCEMENTS
   ============================================ */

/* Events Filters Section - Match Browse Sidebar Style */
.filters-section.card.glass {
  background: rgba(17, 22, 28, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
}

.filters-section .section-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  color: var(--teal);
  text-transform: uppercase;
}

/* Events Filters Grid Layout */
.events-filters-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 1.2fr auto;
  gap: 16px;
  align-items: end;
}

.events-filters-grid .field-group {
  margin-bottom: 0;
}

.events-filters-grid .field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
  font-weight: 600;
}

/* Events filter inputs - match browse styling */
.events-filters-grid .field input,
.events-filters-grid .field select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s ease;
}

.events-filters-grid .field input:focus,
.events-filters-grid .field select:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(24, 225, 255, 0.1);
}

/* Date range fields side by side */
.date-range-fields {
  display: flex;
  gap: 8px;
  align-items: center;
}

.date-range-fields .field {
  flex: 1;
}

.date-separator {
  color: var(--muted);
  font-size: 12px;
}

/* Filter options row */
.filter-options-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-options-row .chip-toggle {
  white-space: nowrap;
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-icon-text svg {
  flex-shrink: 0;
}

/* Events filters actions */
.events-filters-grid .filters-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
}

/* Events layout */
.events-layout {
  display: block;
}

/* Events list styling */
/* --- Events Page Redesign --- */
.events-hero {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  margin-top: -64px; /* Pull up under transparent header if applicable */
  padding-top: 64px;
}

.events-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) saturate(1.2);
  transform: scale(1.05);
  transition: transform 10s ease-out;
}

.events-hero:hover .events-hero-bg {
  transform: scale(1);
}

.events-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.hero-search-wrap {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-search-wrap .field.float input {
  border: none;
  background: transparent;
  height: 50px;
  font-size: 1.1rem;
}

.featured-carousel-container {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}

.featured-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 10px;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-event-card {
  flex: 0 0 300px;
  height: 400px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-event-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.featured-event-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-event-card:hover .featured-event-img {
  transform: scale(1.1);
}

.featured-event-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  color: #fff;
}

.featured-event-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--teal);
  color: #000;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 8px;
}

.view-toggle .btn.active {
  background: var(--teal);
  color: #000;
}

#eventsMap {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Leaflet Overrides */
.leaflet-container {
  background: var(--bg) !important;
  font-family: inherit;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--panel) !important;
  backdrop-filter: blur(10px);
  color: var(--text) !important;
  border: 1px solid var(--glass-border);
}

.leaflet-control-zoom a {
  background: var(--panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--glass-border) !important;
}

/* --- End Events Page Redesign --- */

/* --- Existing Styles --- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.events-list .event-item {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.events-list .event-item:hover {
  background: rgba(24, 225, 255, 0.05);
  border-color: rgba(24, 225, 255, 0.2);
}

/* Events section title override */
.events-layout .section-title {
  color: var(--teal);
  border-bottom: 1px solid rgba(24, 225, 255, 0.2);
  padding-bottom: 12px;
}

/* Responsive events filters */
@media (max-width: 1200px) {
  .events-filters-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 12px;
  }

  .events-filters-grid .filter-search {
    grid-column: span 3;
  }

  .events-filters-grid .filter-dates {
    grid-column: span 2;
  }

  .events-filters-grid .filters-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .events-filters-grid {
    grid-template-columns: 1fr;
  }

  .events-filters-grid .filter-search,
  .events-filters-grid .filter-dates {
    grid-column: span 1;
  }

  .date-range-fields {
    flex-direction: column;
    gap: 8px;
  }

  .date-separator {
    display: none;
  }

  .filter-options-row {
    flex-direction: column;
    align-items: stretch;
  }

  .events-filters-grid .filters-actions {
    flex-direction: column;
  }

  .events-filters-grid .filters-actions .btn {
    width: 100%;
  }
}

/* Filters section styling to match Browse */
.filters-section {
  background: rgba(17, 22, 28, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
}

.filters-section .section-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  color: var(--teal);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(24, 225, 255, 0.2);
  padding-bottom: 12px;
}

.filters-form .field input,
.filters-form .field select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s ease;
  width: 100%;
  padding: 12px 14px;
}

.filters-form .field input:focus,
.filters-form .field select:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(24, 225, 255, 0.1);
}

/* Results bar alignment fix */
.results-bar {
  margin-top: 16px;
}

.results-bar .view-toggle {
  display: flex;
  gap: 4px;
}

.view-toggle .btn-icon {
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-toggle .btn-icon.active {
  background: rgba(24, 225, 255, 0.1);
  border-color: rgba(24, 225, 255, 0.3);
  color: var(--teal);
}

/* ============================================
   15. BROWSE PAGE LAYOUT
   ============================================ */

/* Browse Layout - Sidebar + Content */
.browse-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-top: 16px;
}

/* Filters Sidebar */
.filters-sidebar {
  position: relative;
}

.sticky-filters {
  position: sticky;
  top: 100px;
}

/* Results Section */
.results-section {
  min-width: 0; /* Prevent overflow */
}

@media (max-width: 1024px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    display: none; /* Use mobile bottom sheet instead */
  }

  /* Events page keeps the desktop-style filters visible on tablet, since it
     doesn't use the Browse bottom-sheet filter UX. */
  .page-events .filters-sidebar {
    display: block;
  }

  .page-events .sticky-filters {
    position: relative;
    top: auto;
  }
}

@media (min-width: 1025px) {
  .filters-sidebar .card.glass {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
}

/* ============================================
   16. PROFILE EDIT PAGE
   ============================================ */

.page-profile {
  padding-bottom: 100px;
}

.profile-edit-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.profile-card {
  margin-bottom: 20px;
}

.card-body {
  padding: 20px;
}

.card-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px 0;
}

/* Profile Photo Section */
.profile-photo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--panel);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--muted);
  background: var(--panel);
}

.photo-controls {
  flex: 1;
}

.photo-controls-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.photo-control-block {
  flex: 1;
  min-width: 220px;
}

.photo-preset-block {
  flex: 1;
  min-width: 220px;
}

.button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Preset Avatar Selection */
.preset-avatars-section {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.preset-avatars-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .profile-photo-section {
    align-items: flex-start;
  }
  .photo-controls-row {
    flex-direction: column;
  }
}

.preset-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.preset-avatar:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.preset-avatar.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3);
}

.preset-avatar-icon {
  font-size: 1.75rem;
}

/* Form Stack */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.input-with-prefix .input {
  padding-left: 32px;
}

/* Settings List */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-label {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.setting-desc {
  font-size: 0.875rem;
  color: var(--muted);
}

.input-select {
  width: auto;
  min-width: 120px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--line);
  transition: var(--transition-fast);
  border-radius: 26px;
}

.switch .slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text);
  transition: var(--transition-fast);
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--teal);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

/* QR Section */
.qr-section {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.qr-info {
  flex: 1;
}

.qr-info .setting-desc {
  margin-bottom: 12px;
}

.qr-placeholder {
  width: 96px;
  height: 96px;
  background: var(--panel);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.action-buttons .btn-primary {
  flex: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .profile-photo-section {
    flex-direction: column;
    text-align: center;
  }

  .photo-controls {
    width: 100%;
  }

  .button-group {
    justify-content: center;
  }

  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .input-select {
    width: 100%;
  }

  .qr-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .qr-info .button-group {
    justify-content: center;
  }
}

/* Brand Styling */
.brand-card {
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(24, 225, 255, 0.4);
}

/* ============================================
   13. ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-fadeIn,
  .animate-fadeInUp,
  .animate-slideInUp,
  .animate-scaleIn,
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .skeleton,
  .skeleton-text {
    animation: none !important;
    background: var(--line) !important;
  }

  /* Disable parallax effects */
  .hero-images img {
    animation: none !important;
  }
}

/* ============================================
   15. TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

/* Disable hover effects on touch devices to prevent sticky hover states */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .btn:hover,
  button:hover,
  a:hover,
  .menu-item:hover,
  .drawer-item:hover,
  .nav-item:hover,
  .pill .btn:hover {
    /* Reset hover transforms to prevent sticky states */
    transform: none;
  }

  /* Use :active for touch feedback instead */
  .btn:active,
  button:active,
  .card:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  /* Faster transitions for snappy touch feedback */
  .btn,
  button,
  a,
  .card {
    transition-duration: 0.1s;
  }
}

/* Dynamic viewport height for mobile browsers (handles address bar) */
@supports (height: 100dvh) {
  .full-height,
  .modal-content,
  .bottom-sheet {
    max-height: 100dvh;
  }
}

/* Small viewport height for elements that should stay visible */
@supports (height: 100svh) {
  .mobile-bottom-nav,
  .site-header {
    /* These use fixed positioning, svh helps with visibility */
  }
}

/* ============================================
   BEFORE/AFTER IMAGE COMPARISON SLIDER
   ============================================ */
.ba-slider {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  -webkit-user-select: none;
  user-select: none;
}

.ba-slider::before {
  content: 'BEFORE';
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  color: #fff;
  z-index: 5;
  pointer-events: none;
}

.ba-slider::after {
  content: 'AFTER';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  color: #fff;
  z-index: 5;
  pointer-events: none;
}

.ba-slider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-slider .ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ba-slider .ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal, #18e1ff);
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 8px rgba(24, 225, 255, 0.5);
}

.ba-slider .ba-handle::before,
.ba-slider .ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  transform: translateY(-50%);
}

.ba-slider .ba-handle::before {
  left: -14px;
  border-right-color: var(--teal, #18e1ff);
}

.ba-slider .ba-handle::after {
  right: -14px;
  border-left-color: var(--teal, #18e1ff);
}

.ba-slider .ba-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: var(--teal, #18e1ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ba-slider .ba-handle-circle svg {
  width: 20px;
  height: 20px;
  fill: #000;
}

/* ============================================
   13. GLASS UI & COMPONENTS
   ============================================ */

/* Glass Panel */
.glass-panel {
  background: rgba(17, 22, 28, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Segmented Control (Toggle) */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-full);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 12px 16px; /* Larger touch target for mobile */
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s ease;
  border-radius: var(--radius-full);
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.segmented-control input[type="radio"]:checked + label {
  color: var(--bg);
  font-weight: 700;
}

/* Sliding Background */
.segmented-control .slider-bg {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--teal);
  border-radius: var(--radius-full);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(24, 225, 255, 0.3);
  pointer-events: none;
}

/* Logic to move slider - assumes 2 options */
.segmented-control input[value="business"]:checked ~ .slider-bg {
  transform: translateX(100%);
}

/* ============================================
   14. SKELETON LOADING STATES
   ============================================ */
@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

.skeleton {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  border-radius: 4px;
}

.skeleton-text.lg {
  height: 1.5em;
  width: 70%;
}

.skeleton-text.sm {
  height: 0.8em;
  width: 40%;
}

.skeleton-badge {
  height: 24px;
  width: 60px;
  border-radius: 12px;
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card .skeleton-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-card .skeleton-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.skeleton-card .skeleton-title {
  height: 24px;
  width: 80%;
}

.skeleton-card .skeleton-meta {
  height: 16px;
  width: 50%;
}


.skeleton-card .skeleton-btn {
  height: 36px;
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: auto;
}


/* Section titles inline - no margin, specific font size */
.section-title-compact {
  margin: 0;
  font-size: 20px;
}


/* Card inline overrides - contact page email card */
.card-inset {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  overflow: visible;
}

/* Utility margin helpers */
.mb-2 { margin-bottom: 6px; }
.mt-2 { margin-top: 8px; }
.mb-4 { margin-bottom: 16px; }

/* =========================================
   Modals (DaisyUI-like)
   ========================================= */
/* Modal (DaisyUI-like) */
.modal {
  pointer-events: none;
  position: fixed;
  inset: 0;
  margin: 0;
  display: grid;
  height: 100%;
  max-height: none;
  width: 100%;
  max-width: none;
  justify-items: center;
  padding: 0;
  opacity: 0;
  overscroll-behavior: contain;
  z-index: 999;
  background-color: transparent;
  color: inherit;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-property: transform, opacity, visibility;
  overflow-y: hidden;
}

.modal:not(dialog:not(.modal-open)),
.modal::backdrop {
  background-color: rgba(0, 0, 0, 0.3);
  animation: modal-pop 0.2s ease-out;
}

.modal-open,
.modal:target,
.modal[open] {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.modal-box {
  max-height: calc(100vh - 5em);
  grid-column-start: 1;
  grid-row-start: 1;
  width: 91.666667%;
  max-width: 32rem;
  --tw-scale-x: .9;
  --tw-scale-y: .9;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  --tw-bg-opacity: 1;
  background-color: var(--bg, #1a1a1a);
  padding: 1.5rem;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-open .modal-box,
.modal:target .modal-box,
.modal[open] .modal-box {
  --tw-translate-y: 0px;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.modal-action {
  display: flex;
  margin-top: 1.5rem;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-backdrop {
  z-index: -1;
  grid-column-start: 1;
  grid-row-start: 1;
  display: grid;
  align-self: stretch;
  justify-self: stretch;
  color: transparent;
}

.modal-backdrop button {
  cursor: pointer;
  appearance: none;
  background: transparent;
  border: none;
}

/* Utility Classes */
.hidden { display: none !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.fixed { position: fixed !important; }
.absolute { position: absolute !important; }
.relative { position: relative !important; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50 !important; }
.z-9999 { z-index: 9999 !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.p-4 { padding: 1rem !important; }
.m-0 { margin: 0 !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.overflow-hidden { overflow: hidden !important; }
.w-full { width: 100% !important; }
.max-w-md { max-width: 28rem !important; }
.max-w-500 { max-width: 500px !important; }
.bg-black-80 { background-color: rgba(0, 0, 0, 0.8) !important; }
.bg-slate-900-95 { background-color: rgba(26, 31, 36, 0.95) !important; }
.backdrop-blur-sm { -webkit-backdrop-filter: blur(4px) !important; backdrop-filter: blur(4px) !important; }
.backdrop-blur-md { -webkit-backdrop-filter: blur(8px) !important; backdrop-filter: blur(8px) !important; }
.border-white-10 { border: 1px solid rgba(255, 255, 255, 0.1) !important; }
.text-white { color: #ffffff !important; }
.text-muted { color: #a0a0a0 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-4xl { font-size: 2rem !important; }
.font-bebas { font-family: 'Bebas Neue', sans-serif !important; }
.cursor-pointer { cursor: pointer !important; }
.bg-none { background: none !important; }
.border-none { border: none !important; }
.block { display: block !important; }
.mt-4 { margin-top: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-col { flex-direction: column !important; }

.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-60 { opacity: 0.6 !important; }
.opacity-100 { opacity: 1 !important; }
.rotate-180 { transform: rotate(180deg) !important; }
.col-span-full { grid-column: 1 / -1 !important; }

/* Animated Backgrounds */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Use 100vh as fallback, then 100dvh for iOS Safari */
  bottom: 0;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Extend beyond safe areas for notch/rounded corners */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* Ensure gradient extends beyond viewport */
  min-height: 200vh;
  min-height: 200dvh;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(45, 212, 191, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 106, 32, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.04) 0%, transparent 40%);
  animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-2%, 2%) scale(1.05); opacity: 0.8; }
}

.particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(45, 212, 191, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
  25% { transform: translateY(-30px) translateX(10px); opacity: 0.6; }
  50% { transform: translateY(-15px) translateX(-10px); opacity: 0.4; }
  75% { transform: translateY(-25px) translateX(5px); opacity: 0.5; }
}

.delay-neg-2 { animation-delay: -2s; }
.delay-neg-4 { animation-delay: -4s; }
.delay-neg-5 { animation-delay: -5s; }
.delay-neg-7 { animation-delay: -7s; }

.delay-0 { animation-delay: 0s; }
.delay-3 { animation-delay: 3s; }
.delay-4 { animation-delay: 4s; }
.delay-6 { animation-delay: 6s; }
.delay-7 { animation-delay: 7s; }
.delay-9 { animation-delay: 9s; }
.delay-11 { animation-delay: 11s; }
.delay-12 { animation-delay: 12s; }

.left-15 { left: 15%; }
.left-25 { left: 25%; }
.left-45 { left: 45%; }
.left-75 { left: 75%; }
.left-85 { left: 85%; }
.top-15 { top: 15%; }
.top-25 { top: 25%; }
.top-65 { top: 65%; }
.top-75 { top: 75%; }
.top-85 { top: 85%; }

/* Polls & Voting */
.poll-card-premium {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.poll-card-premium:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(24, 225, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

.poll-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0;
  transition: var(--transition-medium);
}

.poll-card-premium:hover::before {
  opacity: 1;
}

.poll-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.poll-option:hover:not(.voted) {
  background: rgba(24, 225, 255, 0.1);
  border-color: rgba(24, 225, 255, 0.2);
}

.poll-option.voted {
  cursor: default;
}

.poll-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(24, 225, 255, 0.15);
  z-index: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poll-option-text {
  font-weight: 500;
}

.poll-option-votes {
  font-weight: 700;
  color: var(--teal);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(65, 215, 158, 0.1);
  color: var(--good);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--good);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(65, 215, 158, 0.4);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(65, 215, 158, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(65, 215, 158, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 215, 158, 0); }
}

/* Hero Poll Card (compact version for homepage) */
.poll-card--hero {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
}

.poll-card--hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--orange), var(--teal));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.poll-card--hero .poll-card__header {
  margin-bottom: var(--space-sm);
}

.poll-card--hero .poll-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
}

.poll-card--hero .poll-card__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
}

.poll-card--hero .poll-card__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.poll-card--hero .poll-option {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  min-height: 36px;
}

.poll-card--hero .poll-option__bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(24, 225, 255, 0.15), rgba(24, 225, 255, 0.08));
  z-index: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
}

.poll-card--hero .poll-option__content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poll-card--hero .poll-option__text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.poll-card--hero .poll-option__percent {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.8rem;
}

.poll-card--hero .poll-option:not(.poll-option--voted):hover {
  background: rgba(24, 225, 255, 0.12);
  border-color: rgba(24, 225, 255, 0.25);
  transform: translateX(2px);
}

/* Hero Poll Placeholder (when no polls are active) */
.poll-card--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

.poll-card--placeholder::before {
  display: none;
}

.poll-placeholder {
  text-align: center;
  padding: var(--space-md);
}

.poll-placeholder__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  opacity: 0.6;
}

.poll-placeholder__text {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-2xs);
  font-size: 0.9rem;
}

.poll-placeholder__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Leaderboard Specific */
.beta-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.btn-share-rank {
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.icon-share {
  width: 14px;
  height: 14px;
  margin-right: 6px;
}

/* Animations */
@keyframes bgPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-bg-pulse {
  animation: bgPulse 15s ease-in-out infinite;
}

.animate-float {
  animation: float 20s infinite ease-in-out;
}

.animate-card-float {
  animation: cardFloat 4s ease-in-out infinite;
}

/* ===========================================
   MODERN PAGE HERO SYSTEM
   Reusable hero patterns matching binders/leaderboard
   =========================================== */

/* Page Hero Container */
.page-hero {
  position: relative;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 2rem;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(255, 106, 32, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Hero Kicker (pill badge above title) */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 999px;
  color: var(--teal, #18e1ff);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.6s ease-out;
}

.hero-kicker svg {
  width: 16px;
  height: 16px;
}

/* Hero Title */
.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-title .accent,
.hero-title .highlight {
  background: linear-gradient(135deg, var(--teal, #18e1ff) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .accent-ember {
  background: linear-gradient(135deg, #ff7a2f 0%, #ff5722 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .accent-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted, #9ca3af);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Hero Stats Grid */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-stat {
  text-align: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  transition: all 0.3s ease;
  min-width: 100px;
}

.hero-stat:hover {
  border-color: rgba(45, 212, 191, 0.3);
  transform: translateY(-2px);
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--teal, #18e1ff);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: var(--muted, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* Hero Actions */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Hero with Icon */
.hero-icon-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hero-icon {
  font-size: 3.5rem;
  display: block;
  animation: iconBounce 3s ease-in-out infinite;
}

.hero-icon-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.4) 0%, transparent 70%);
  filter: blur(15px);
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ===========================================
   MODERN FORM PANELS
   Glass-panel form sections
   =========================================== */

.form-panel-modern {
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-panel-modern:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-panel-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal, #18e1ff), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-panel-modern:focus-within::before {
  opacity: 1;
}

.form-panel-header {
  margin-bottom: 1.5rem;
}

.form-panel-header h2,
.form-panel-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text, #e9f3f6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-panel-header p {
  font-size: 0.9rem;
  color: var(--muted, #9ca3af);
  margin: 0;
}

/* ===========================================
   MODERN SETTINGS/NAV CARDS
   =========================================== */

.settings-card-modern {
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

.settings-nav-modern {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  color: var(--muted, #9ca3af);
  font-weight: 500;
  font-size: 0.9rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}

.settings-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #e9f3f6);
}

.settings-nav-btn.active {
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal, #18e1ff);
}

.settings-nav-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile horizontal nav */
@media (max-width: 1023px) {
  .settings-nav-modern {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.5rem;
    scrollbar-width: none;
  }

  .settings-nav-modern::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    flex-shrink: 0;
  }
}

/* ===========================================
   SECTION DIVIDERS
   =========================================== */

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 2rem 0;
}

/* ===========================================
   MODERN INPUT ENHANCEMENTS
   =========================================== */

.input-modern {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--text, #e9f3f6);
  font-size: 1rem;
  width: 100%;
  transition: all 0.2s ease;
}

.input-modern:focus {
  outline: none;
  border-color: var(--teal, #18e1ff);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.input-modern::placeholder {
  color: var(--muted, #6b7280);
}

/* Textarea modern */
.textarea-modern {
  min-height: 120px;
  resize: vertical;
}

/* Select modern */
.select-modern {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ===========================================
   BUILD SHEET EDITOR
   =========================================== */

/* Build Sheet Display */
.build-sheet-empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}

.build-sheet-empty h3 {
  margin-bottom: 0.5rem;
}

.build-sheet-empty p {
  color: var(--muted, #9ca3af);
  margin-bottom: 1rem;
}

.build-sheet-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
}

.build-sheet-panel .edit-build-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Performance Section */
.performance-section h4,
.modifications-section h4,
.timeline-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.perf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.perf-stat {
  background: rgba(24, 225, 255, 0.1);
  border: 1px solid rgba(24, 225, 255, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  min-width: 80px;
  text-align: center;
}

.perf-stat .value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--teal, #18e1ff);
}

.perf-stat .label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted, #9ca3af);
  text-transform: uppercase;
}

.dyno-link {
  color: var(--teal, #18e1ff);
  text-decoration: none;
  font-size: 0.9rem;
}

.dyno-link:hover {
  text-decoration: underline;
}

/* Modifications Section */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.mod-category h5 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.mod-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mod-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mod-item strong {
  flex: 1;
}

.mod-brand {
  color: var(--muted, #9ca3af);
  font-size: 0.85rem;
}

.mod-cost {
  color: var(--accent, #f59e0b);
  font-size: 0.85rem;
}

.proof-link {
  color: var(--teal, #18e1ff);
  text-decoration: none;
}

/* Timeline Section */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--teal, #18e1ff), transparent);
}

.timeline-entry {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal, #18e1ff);
  border: 2px solid var(--bg, #0b0f12);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--muted, #9ca3af);
  margin-bottom: 0.25rem;
}

.timeline-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-content p {
  margin: 0.25rem 0;
  color: var(--muted, #9ca3af);
  font-size: 0.9rem;
}

.timeline-img {
  max-width: 200px;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.timeline-cost {
  color: var(--accent, #f59e0b);
  font-size: 0.85rem;
}

/* Build Editor Modal */
.build-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
}

.build-editor-content {
  background: var(--card-bg, #1a1f24);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.build-editor-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.build-editor-content .modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.build-editor-content .modal-close {
  background: none;
  border: none;
  color: var(--muted, #9ca3af);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.build-editor-content .modal-close:hover {
  color: var(--text, #e9f3f6);
}

.build-editor-body {
  overflow-y: auto;
  padding: 1.5rem;
  flex: 1;
}

.build-editor-content .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Editor Sections */
.editor-section {
  margin-bottom: 2rem;
}

.editor-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.editor-section .form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted, #9ca3af);
}

.editor-section .form-group input,
.editor-section .form-group select,
.editor-section .form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  color: var(--text, #e9f3f6);
  font-size: 0.9rem;
}

.editor-section .form-group input:focus,
.editor-section .form-group select:focus,
.editor-section .form-group textarea:focus {
  outline: none;
  border-color: var(--teal, #18e1ff);
}

/* Mod Tabs */
.mod-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mod-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--muted, #9ca3af);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mod-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mod-tab.active {
  background: rgba(24, 225, 255, 0.15);
  border-color: var(--teal, #18e1ff);
  color: var(--teal, #18e1ff);
}

.mod-panels {
  min-height: 200px;
}

.mod-panel {
  display: none;
}

.mod-panel.active {
  display: block;
}

.mod-list-editor {
  margin-bottom: 1rem;
}

/* Mod Row */
.mod-row {
  display: grid;
  grid-template-columns: 1fr 100px 80px 1fr 32px;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.mod-row input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  padding: 0.5rem;
  color: var(--text, #e9f3f6);
  font-size: 0.85rem;
}

.mod-row input:focus {
  outline: none;
  border-color: var(--teal, #18e1ff);
}

.mod-row .remove-mod-btn {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  border-radius: 0.4rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.mod-row .remove-mod-btn:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Timeline Row */
.timeline-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.timeline-row-header {
  display: grid;
  grid-template-columns: 130px 1fr 32px;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-row-body {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 0.5rem;
}

.timeline-row input,
.timeline-row textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  padding: 0.5rem;
  color: var(--text, #e9f3f6);
  font-size: 0.85rem;
}

.timeline-row textarea {
  min-height: 60px;
  resize: vertical;
}

.timeline-row input:focus,
.timeline-row textarea:focus {
  outline: none;
  border-color: var(--teal, #18e1ff);
}

.timeline-row .remove-tl-btn {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  border-radius: 0.4rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.timeline-row .remove-tl-btn:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Icon buttons */
.btn-icon {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--muted, #9ca3af);
  font-size: 1rem;
}

.btn-icon:hover {
  color: var(--text, #e9f3f6);
}

/* Responsive */
@media (max-width: 768px) {
  .mod-row {
    grid-template-columns: 1fr 1fr;
  }

  .mod-row .mod-name {
    grid-column: span 2;
  }

  .mod-row .mod-proof {
    grid-column: span 1;
  }

  .mod-row .remove-mod-btn {
    grid-column: span 1;
    justify-self: end;
  }

  .timeline-row-header {
    grid-template-columns: 1fr 32px;
  }

  .timeline-row-header input[type="date"] {
    grid-column: span 2;
    order: 2;
  }

  .timeline-row-body {
    grid-template-columns: 1fr;
  }

  .editor-grid {
    grid-template-columns: 1fr 1fr;
  }
}
