/**
 * Video Transform Portal - Design System
 * Version: 2.0
 * Philosophy: Clean, professional, spacious, focused
 * 
 * Import this file FIRST in base.html
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
  /* === BACKGROUNDS === */
  --bg-base: #0a0a0b;
  --bg-elevated: #111113;
  --bg-elevated-2: #18181b;
  --bg-elevated-3: #1f1f23;
  
  /* === BORDERS === */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  /* === TEXT === */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #8a8a92;  /* WCAG AA compliant: 5.8:1 */
  --text-disabled: #52525b;
  
  /* === ACCENT (Brand) === */
  --accent-primary: #818cf8;  /* WCAG AA compliant: 6.2:1 */
  --accent-primary-hover: #4f46e5;
  --accent-primary-active: #4338ca;
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  /* === SEMANTIC COLORS === */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.2);
  
  --warning: #eab308;
  --warning-bg: rgba(234, 179, 8, 0.1);
  --warning-border: rgba(234, 179, 8, 0.2);
  
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.2);
  
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.2);
  
  /* === SPECIAL === */
  --credits-gold: #fbbf24;
  --credits-bg: rgba(251, 191, 36, 0.1);
  
  /* === TYPOGRAPHY === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  
  /* Type Scale (1.25 ratio - Major Third) */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* === SPACING (4px base grid) === */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* Semantic Spacing */
  --padding-xs: var(--space-2);
  --padding-sm: var(--space-3);
  --padding-md: var(--space-4);
  --padding-lg: var(--space-6);
  --padding-xl: var(--space-8);
  
  --gap-xs: var(--space-2);
  --gap-sm: var(--space-3);
  --gap-md: var(--space-4);
  --gap-lg: var(--space-6);
  --gap-xl: var(--space-8);
  
  --section-gap: var(--space-12);
  --page-padding: var(--space-6);
  
  /* === BORDER RADIUS === */
  --radius-sm: 0.375rem;    /* 6px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-full: 9999px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px var(--accent-glow);
  
  /* === ANIMATIONS === */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  --duration-instant: 50ms;
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  
  /* === BREAKPOINTS === */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* === Z-INDEX === */
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-toast: 60;
}

/* ============================================
   BASE RESET & DEFAULTS
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY CLASSES
   ============================================ */

.heading-display {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.heading-page {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-section {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.heading-card {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.heading-small {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.text-body {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.text-body-sm {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.text-small {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

.text-caption {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-mono {
  font-family: var(--font-mono);
}

/* Text colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.page-container {
  max-width: var(--page-max, 1400px);
  margin: 0 auto;
  padding: var(--space-6) var(--page-padding);
}

.page-narrow {
  max-width: 768px;
}

.page-wide {
  max-width: 1536px;
}

.section {
  margin-bottom: var(--section-gap);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.section-actions {
  display: flex;
  gap: var(--space-3);
}

/* ============================================
   GRID SYSTEMS
   ============================================ */

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap-lg);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap-lg);
}

.grid-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap-md);
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap-md);
}

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */

.layout-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .layout-split {
    grid-template-columns: 1fr 380px;
  }
  
  .layout-split--reverse {
    grid-template-columns: 380px 1fr;
  }
}

.layout-split-main {
  min-width: 0;
}

.layout-split-aside {
  position: sticky;
  top: var(--space-6);
  align-self: start;
}

/* ============================================
   FLEX UTILITIES
   ============================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font family */
.font-mono { font-family: var(--font-mono); }

/* Gap utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================
   SPACING UTILITIES
   ============================================ */

/* Margin */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Padding */
.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* ============================================
   TRANSITIONS
   ============================================ */

.transition-interactive {
  transition: 
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.transition-transform {
  transition: transform var(--duration-normal) var(--ease-spring);
}

.transition-opacity {
  transition: opacity var(--duration-normal) var(--ease-out);
}

/* ============================================
   VISIBILITY & DISPLAY
   ============================================ */

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.invisible { visibility: hidden; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-elevated);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from { 
    opacity: 0;
    transform: translateY(-10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

.animate-slide-up {
  animation: slideUp var(--duration-normal) var(--ease-out);
}

/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   Mobile-First Approach
   ============================================ */

/* === BASE MOBILE (320px+) - Default styles === */
:root {
  --page-padding-mobile: var(--space-4);
  --section-gap-mobile: var(--space-8);
}

/* Container responsive */
.page-container {
  padding: var(--page-padding-mobile);
  max-width: 100%;
}

/* === LARGE MOBILE (375px+) === */
@media (min-width: 375px) {
  .page-container {
    padding: var(--space-4);
  }
  
  .heading-display {
    font-size: var(--text-3xl);
  }
  
  .heading-page {
    font-size: var(--text-2xl);
  }
}

/* === SMALL TABLET (640px+) === */
@media (min-width: 640px) {
  :root {
    --page-padding: var(--space-5);
  }
  
  .page-container {
    padding: var(--space-5);
    max-width: 640px;
    margin: 0 auto;
  }
  
  .heading-display {
    font-size: var(--text-4xl);
  }
  
  .heading-page {
    font-size: var(--text-3xl);
  }
  
  /* Grid systems scale up */
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Flex adjustments */
  .sm\:flex-row {
    flex-direction: row;
  }
  
  .sm\:items-center {
    align-items: center;
  }
}

/* === TABLET (768px+) === */
@media (min-width: 768px) {
  :root {
    --page-padding: var(--space-6);
    --section-gap: var(--space-10);
  }
  
  .page-container {
    padding: var(--space-6);
    max-width: 768px;
  }
  
  .page-narrow {
    max-width: 640px;
  }
  
  /* Grid systems */
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-models {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Section header adjustments */
  .section-header {
    flex-direction: row;
    align-items: center;
  }
  
  /* Tablet flex utilities */
  .md\:flex-row {
    flex-direction: row;
  }
  
  .md\:items-center {
    align-items: center;
  }
  
  .md\:justify-between {
    justify-content: space-between;
  }
}

/* === DESKTOP (1024px+) === */
@media (min-width: 1024px) {
  :root {
    --page-padding: var(--space-6);
    --section-gap: var(--space-12);
  }
  
  .page-container {
    padding: var(--space-6) var(--page-padding);
    max-width: 1024px;
  }
  
  .page-narrow {
    max-width: 768px;
  }
  
  .page-wide {
    max-width: var(--page-max, 1400px);
  }
  
  /* Grid systems - full desktop */
  .grid-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-models {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Layout split enabled */
  .layout-split {
    grid-template-columns: 1fr 380px;
  }
  
  .layout-split--reverse {
    grid-template-columns: 380px 1fr;
  }
  
  /* Desktop utilities */
  .lg\:flex-row {
    flex-direction: row;
  }
  
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === LARGE DESKTOP (1280px+) === */
@media (min-width: 1280px) {
  .page-container {
    max-width: var(--page-max, 1400px);
  }
  
  .page-wide {
    max-width: 1536px;
  }
  
  /* Grid systems - larger */
  .grid-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-cards {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-models {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-gallery {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* XL utilities */
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .xl\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* === EXTRA LARGE DESKTOP (1536px+) === */
@media (min-width: 1536px) {
  .page-container {
    max-width: 1536px;
  }
  
  .page-wide {
    max-width: 1920px;
  }
  
  /* Grid systems - max */
  .grid-gallery {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* 2XL utilities */
  .\\32xl\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

/* Mobile-first typography scaling */
.heading-display {
  font-size: var(--text-2xl);
}

.heading-page {
  font-size: var(--text-xl);
}

.heading-section {
  font-size: var(--text-lg);
}

@media (min-width: 640px) {
  .heading-display {
    font-size: var(--text-3xl);
  }
  
  .heading-page {
    font-size: var(--text-2xl);
  }
  
  .heading-section {
    font-size: var(--text-xl);
  }
}

@media (min-width: 1024px) {
  .heading-display {
    font-size: var(--text-4xl);
  }
  
  .heading-page {
    font-size: var(--text-3xl);
  }
  
  .heading-section {
    font-size: var(--text-xl);
  }
}

/* ============================================
   RESPONSIVE SPACING UTILITIES
   ============================================ */

/* Stack elements vertically on mobile */
.stack-mobile {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .stack-mobile {
    flex-direction: row;
    align-items: center;
  }
}

/* Full width on mobile */
.full-mobile {
  width: 100%;
}

@media (min-width: 768px) {
  .full-mobile {
    width: auto;
  }
}

/* Hide/show utilities for all breakpoints */
.hide-until-sm { display: none !important; }
.hide-until-md { display: none !important; }
.hide-until-lg { display: none !important; }
.hide-until-xl { display: none !important; }

@media (min-width: 640px) {
  .hide-until-sm { display: block !important; }
  .hide-from-sm { display: none !important; }
}

@media (min-width: 768px) {
  .hide-until-md { display: block !important; }
  .hide-from-md { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-until-lg { display: block !important; }
  .hide-from-lg { display: none !important; }
}

@media (min-width: 1280px) {
  .hide-until-xl { display: block !important; }
  .hide-from-xl { display: none !important; }
}

/* ============================================
   RESPONSIVE PADDING/MARGIN ADJUSTMENTS
   ============================================ */

/* Sections - tighter on mobile */
.section {
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .section {
    margin-bottom: var(--space-10);
  }
}

@media (min-width: 1024px) {
  .section {
    margin-bottom: var(--space-12);
  }
}

/* Section header - stack on mobile */
.section-header {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Section actions - full width on mobile */
.section-actions {
  width: 100%;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .section-actions {
    width: auto;
    flex-wrap: nowrap;
  }
}

/* ================================
   Mobile Navigation (Global)
   ================================ */

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex !important;
  }
  
  .nav-right {
    display: none !important;
  }
  
  .nav-links {
    display: none !important; /* Hidden by default on mobile */
    position: fixed;
    top: 60px;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - 60px);
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-links[data-open="true"],
  .nav-links.active {
    display: flex !important;
    transform: translateX(0) !important;
  }
  
  .nav-link,
  .nav-dropdown > .nav-link {
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(100, 100, 150, 0.2);
  }
  
  .nav-dropdown {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static !important;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border-left: 2px solid rgba(96, 165, 250, 0.3);
    margin-left: 16px;
    padding-left: 0;
    background: transparent !important;
  }
  
  .dropdown-item {
    padding: 10px 16px;
  }
  
  .nav-user-menu {
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(100, 100, 150, 0.2);
  }
  
  .nav-user-menu .nav-dropdown {
    width: 100%;
  }
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99; /* BELOW menu, ABOVE page content */
}

.nav-overlay.active {
  display: block;
}

/* ============================================================
   ZOOM PROTECTION & RESPONSIVE HARDENING (added zoomfix)
   Prevents pinch-zoom, double-tap zoom, iOS input zoom,
   and horizontal overflow that breaks responsive layouts.
   ============================================================ */

/* Prevent zoom-breaking horizontal overflow */
html {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative !important;
}

/* Disable touch zoom gestures (iOS Safari ignores user-scalable=no without this) */
html, body {
  touch-action: manipulation !important;
  -ms-touch-action: manipulation !important;
}

/* Prevent double-tap zoom across all elements */
* {
  touch-action: manipulation !important;
}

/* Prevent inputs from zooming on focus (iOS zooms when font-size < 16px) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-size: 16px !important;
}
