/**
 * Garage Pass - Unified Responsive Stylesheet
 * 
 * This consolidates mobile.css, enhanced-ui.css, and desktop-enhancements.css
 * into a single mobile-first responsive stylesheet.
 * 
 * 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;
  --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;
}

/* ============================================
   2. BASE/RESET STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

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;
}

/* 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 {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: var(--space-md);
}

/* Larger container on desktop */
@media (min-width: 1024px) {
  .wrap {
    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-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,
header:not(.mobile-header) {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 18, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-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);
}

header.scrolled {
  background: rgba(11, 15, 18, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.bar {
  display: flex;
  align-items: center;
  /* Remove justify-content: space-between to allow custom spacing */
  gap: var(--space-lg);
  padding: 10px var(--space-xl);
  max-width: var(--container-xl);
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  --brand-icon-h: 68px;
  --brand-wordmark-scale: 1.25;
  flex-shrink: 0;
}

.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 {
  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: flex-end;
  gap: 4px;
}

.pill #navAuth: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);
  backdrop-filter: blur(12px);
  -webkit-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 header:not(.mobile-header) {
  display: block;
}

/* If a dedicated mobile header exists, prefer it */
.has-mobile-header.view-mobile header:not(.mobile-header) {
  display: none;
}

.has-mobile-header.view-mobile .mobile-header {
  display: flex;
}

/* Hide mobile header on desktop view */
.view-desktop .mobile-header {
  display: none;
}

/* Desktop sizing */
@media (min-width: 1024px) {
  .bar {
    padding: 12px var(--space-xl);
  }
  
  .logo {
    --brand-icon-h: 70px;
    --brand-wordmark-scale: 1.3;
  }
  
  .pill .btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Large desktop */
@media (min-width: 1440px) {
  .logo {
    --brand-icon-h: 75px;
  }
  
  .bar {
    max-width: 1600px;
  }
  
  .pill .btn {
    padding: 9px 18px;
  }
}

/* Mobile sizing */
@media (max-width: 640px) {
  .site-header {
    padding: 4px 10px;
    height: auto;
    min-height: 58px;
  }

  .site-header .bar {
    padding: 0 8px;
    gap: 10px;
  }

  .site-header .logo {
    --brand-icon-h: 64px;
    --brand-wordmark-scale: 0.95;
    gap: 10px;
  }
  
  .site-header .logo img {
    max-height: none;
    height: var(--brand-icon-h);
  }
  
  .site-header .logo img.brand-wordmark {
    display: block !important;
    height: calc(var(--brand-icon-h) * 0.62);
    max-width: 180px;
    object-fit: contain;
  }

  /* Hide desktop pill nav on mobile - use bottom nav instead */
  .site-header .pill,
  .site-header .auth-stack {
    display: none !important;
  }

  .site-header .mobile-menu-btn {
    width: 44px;
    height: 44px;
  }
}

/* Tablet sizing */
@media (min-width: 641px) and (max-width: 1023px) {
  .bar {
    padding: 10px var(--space-md);
  }
  
  .logo {
    --brand-icon-h: 57px;
    --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.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);
}

/* === 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;
  border-bottom: 1px solid var(--line);
}

.drawer-logo {
  height: 48px;
}

.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;
}

/* ============================================
   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);
  backdrop-filter: var(--glass-blur);
  -webkit-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);
}

.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);
}

/* 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);
}

/* 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;
}

/* ============================================
   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);
}

.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);
}

/* 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
   ============================================ */

/* 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);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-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);
}

/* Add bottom padding when nav is visible */
@media (max-width: 768px) {
  main, .wrap {
    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,
.view-mobile .wrap {
  padding-bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 16px) !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;
  -webkit-overflow-scrolling: touch;
  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 MOBILE FILTER CHIPS (Horizontal Scroll)
   ============================================ */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 10px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-chip.active {
  background: rgba(24, 225, 255, 0.1);
  border-color: var(--teal);
  color: var(--teal);
}

.filter-chip:active {
  transform: scale(0.97);
}

/* ============================================
   9.8 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;
  -webkit-overflow-scrolling: touch;
}

.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;
  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 .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
   ============================================ */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-teal { color: var(--teal); }

.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; }

.view-mobile .hide-mobile,
.device-mobile .hide-mobile { display: none !important; }

.view-mobile .hide-desktop,
.device-mobile .hide-desktop { display: block !important; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: block !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 spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.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;
  -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;
  mask-image: linear-gradient(to right, transparent, black);
  -webkit-mask-image: linear-gradient(to right, transparent, black);
}


/* ============================================
   13. BROWSE PAGE ENHANCEMENTS
   ============================================ */

/* Hero Lite - Browse Header */
.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;
  mask-image: linear-gradient(to right, transparent 0%, black 60%);
  -webkit-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;
  -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);
  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 */
  -webkit-overflow-scrolling: touch;
  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);
  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);
}

/* Modern Card Enhancements */
.car-card .thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.car-card .thumb img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-card:hover .thumb img {
  transform: scale(1.08);
}

/* 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);
  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 */
}

/* Card Stats Row */
.card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--muted);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-stat svg {
  width: 14px;
  height: 14px;
  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 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;
}

/* 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-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);
  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 */
  }
}

@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;
}

.button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 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;
  }
}
