/* ================================================================
   PS3 Rental Dashboard — themes.css v2.0
   DEPTH-ENHANCED: 3D Bevels, Metallic Textures, Layered Glass, CRT Bezel
   ================================================================ */

/* ═════════════════════════════════════════════════════════════════
   PS3 THEME — True 3D Chrome & Metallic
   ════════════════════════════════════════════════════════════════ */

:root,
[data-theme="ps3"] {
  /* 3D Depth Scale */
  --depth-1: 
    0 1px 2px rgba(0,0,0,0.9),
    0 2px 4px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  --depth-2:
    0 2px 4px rgba(0,0,0,0.9),
    0 4px 8px rgba(0,0,0,0.7),
    0 8px 16px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.4);
  --depth-3:
    0 4px 8px rgba(0,0,0,0.9),
    0 8px 16px rgba(0,0,0,0.7),
    0 16px 32px rgba(0,0,0,0.5),
    0 32px 64px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -2px 0 rgba(0,0,0,0.5);
  --depth-glow:
    0 0 10px rgba(230,0,18,0.3),
    0 0 30px rgba(230,0,18,0.2),
    0 0 60px rgba(230,0,18,0.1),
    0 4px 20px rgba(230,0,18,0.15);
  --depth-pressed:
    inset 0 2px 4px rgba(0,0,0,0.9),
    inset 0 4px 8px rgba(0,0,0,0.7),
    inset 0 8px 16px rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.05);
  
  /* Chrome Metallic Colors */
  --chrome-h1: #ffffff;
  --chrome-h2: #d0d0d0;
  --chrome-h3: #a0a0a0;
  --chrome-m1: #707070;
  --chrome-m2: #505050;
  --chrome-d1: #303030;
  --chrome-d2: #1a1a1a;
  --chrome-shadow: #0a0a0a;
  
  /* Brushed Metal Pattern */
  --metal-texture: repeating-linear-gradient(
    90deg,
    transparent 0px,
    rgba(255,255,255,0.01) 1px,
    transparent 2px
  );
  
  /* Carbon Fiber Pattern */
  --carbon-pattern: 
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
    repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
  
  /* Base Colors */
  --bg-primary:   #070707;
  --bg-secondary: #0f0f0f;
  --bg-tertiary:  #151515;
  --bg-panel:     #1a1a1a;
  --bg-card:      #121212;
  --bg-input:     #0a0a0a;
  
  --text-primary:   #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-muted:     #606060;
  --text-disabled:  #404040;
  
  --accent-primary:   #e60012;
  --accent-secondary: #ff1a2e;
  --accent-tertiary:  #b3000e;
  
  --border-color: #252525;
  --border-hover: #404040;
  --border-accent: #e60012;
  
  --radius: 10px;
  --radius-lg: 16px;
  
  --glow-color: rgba(230,0,18,0.5);
}

/* PS3 — XMB Wave Rings Background */
[data-theme="ps3"] body {
  background-color: var(--bg-primary);
  background-image: 
    /* XMB-style wave rings - outer */
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0,
      transparent 80px,
      rgba(230,0,18,0.03) 80px,
      rgba(230,0,18,0.03) 82px,
      transparent 82px,
      transparent 160px,
      rgba(0,48,135,0.04) 160px,
      rgba(0,48,135,0.04) 162px,
      transparent 162px,
      transparent 240px,
      rgba(230,0,18,0.02) 240px,
      rgba(230,0,18,0.02) 242px,
      transparent 242px
    ),
    /* Blue glow from top center */
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(0,48,135,0.25) 0%, transparent 55%),
    /* Red accent glow from corners */
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(230,0,18,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(230,0,18,0.08) 0%, transparent 50%),
    /* Vignette depth */
    radial-gradient(ellipse 140% 140% at 50% 50%, transparent 30%, rgba(0,0,0,0.6) 100%),
    /* Horizontal brushed metal lines */
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      rgba(255,255,255,0.008) 1px,
      transparent 2px,
      transparent 4px
    ),
    /* Subtle noise texture */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 4px,
    200px 200px;
  background-blend-mode: 
    screen,
    normal,
    normal,
    normal,
    multiply,
    normal,
    overlay;
  position: relative;
  overflow-x: hidden;
}

/* PS3 — Animated Wave Rings */
[data-theme="ps3"] body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0,
      transparent 60px,
      rgba(230,0,18,0.015) 60px,
      rgba(230,0,18,0.015) 61px,
      transparent 61px,
      transparent 120px,
      rgba(0,48,135,0.02) 120px,
      rgba(0,48,135,0.02) 121px,
      transparent 121px
    );
  animation: xmbWave 30s linear infinite;
  pointer-events: none;
  z-index: -2;
}

@keyframes xmbWave {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* PS3 — Floating PlayStation Symbols */
[data-theme="ps3"] body::after {
  content: '○ ✕ △ ☐';
  position: fixed;
  font-size: 200px;
  color: rgba(230,0,18,0.02);
  top: 10%;
  right: -5%;
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: -1;
  text-shadow: 
    100px 100px 0 rgba(0,48,135,0.015),
    -50px 150px 0 rgba(230,0,18,0.015);
  animation: symbolFloat 25s ease-in-out infinite;
}

@keyframes symbolFloat {
  0%, 100% { 
    transform: rotate(-15deg) translate(0, 0);
    opacity: 0.6;
  }
  50% { 
    transform: rotate(-10deg) translate(-30px, 20px);
    opacity: 1;
  }
}

/* PS3 — 3D Chrome Cards with Bevel */
[data-theme="ps3"] .unit-card,
[data-theme="ps3"] .sched-card,
[data-theme="ps3"] .summary-card,
[data-theme="ps3"] .expense-form {
  background: 
    /* Chrome highlight */
    linear-gradient(165deg, 
      rgba(255,255,255,0.08) 0%, 
      rgba(255,255,255,0.02) 20%,
      transparent 40%
    ),
    /* Base metallic */
    linear-gradient(145deg, 
      var(--bg-card) 0%, 
      var(--chrome-d2) 50%,
      var(--bg-card) 100%
    ),
    /* Brushed texture */
    var(--metal-texture);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.5);
  box-shadow: var(--depth-2);
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chrome rim light */
[data-theme="ps3"] .unit-card::before,
[data-theme="ps3"] .sched-card::before,
[data-theme="ps3"] .summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(165deg,
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.05) 30%,
    transparent 50%,
    rgba(0,0,0,0.2) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Chrome shine sweep animation */
[data-theme="ps3"] .unit-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.03) 45%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 55%,
    transparent 60%
  );
  animation: chromeShine 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes chromeShine {
  0%, 100% { transform: translateX(-100%) rotate(0deg); }
  50% { transform: translateX(100%) rotate(0deg); }
}

/* PS3 — 3D Push Button Effect */
[data-theme="ps3"] button,
[data-theme="ps3"] .btn,
[data-theme="ps3"] .unit-actions button {
  background: linear-gradient(180deg,
    var(--chrome-h3) 0%,
    var(--chrome-m1) 5%,
    var(--chrome-m2) 50%,
    var(--chrome-d1) 95%,
    var(--chrome-d2) 100%
  );
  border: none;
  border-top: 1px solid rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(0,0,0,0.6);
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.5),
    0 6px 12px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  color: var(--text-primary);
  text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
  transform: translateY(0);
  transition: all 0.15s ease;
}

[data-theme="ps3"] button:hover,
[data-theme="ps3"] .btn:hover {
  background: linear-gradient(180deg,
    var(--chrome-h2) 0%,
    var(--chrome-m1) 5%,
    var(--chrome-m2) 50%,
    var(--chrome-d1) 95%,
    var(--chrome-d2) 100%
  );
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.5),
    0 8px 16px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

[data-theme="ps3"] button:active,
[data-theme="ps3"] .btn:active {
  background: linear-gradient(180deg,
    var(--chrome-d1) 0%,
    var(--chrome-m2) 50%,
    var(--chrome-m1) 100%
  );
  box-shadow: var(--depth-pressed);
  transform: translateY(2px);
  border-top: 1px solid rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* PS3 — Red Power Button Style */
[data-theme="ps3"] .btn-danger,
[data-theme="ps3"] button[style*="background: #e60012"],
[data-theme="ps3"] .btn[style*="background: #e60012"] {
  background: linear-gradient(180deg,
    #ff3355 0%,
    #e60012 5%,
    #b3000e 50%,
    #80000a 95%,
    #5c0007 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.3) !important;
  border-bottom: 1px solid rgba(0,0,0,0.5) !important;
  box-shadow: 
    0 3px 6px rgba(230,0,18,0.3),
    0 6px 12px rgba(230,0,18,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

[data-theme="ps3"] .btn-danger:hover {
  background: linear-gradient(180deg,
    #ff5577 0%,
    #ff1a2e 5%,
    #e60012 50%,
    #99000f 95%,
    #70000a 100%
  ) !important;
  box-shadow: 
    0 4px 8px rgba(230,0,18,0.4),
    0 8px 16px rgba(230,0,18,0.3),
    var(--depth-glow) !important;
}

/* PS3 — Active Unit with Power Ring */
[data-theme="ps3"] .unit-card.active {
  background: 
    linear-gradient(165deg, 
      rgba(230,0,18,0.05) 0%,
      rgba(255,255,255,0.03) 20%,
      transparent 40%
    ),
    linear-gradient(145deg, 
      var(--bg-card) 0%,
      var(--chrome-d2) 100%
    );
  border-color: rgba(230,0,18,0.4);
  box-shadow: 
    var(--depth-2),
    var(--depth-glow),
    inset 0 0 30px rgba(230,0,18,0.05);
}

[data-theme="ps3"] .unit-card.active::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff5577 0%, #e60012 50%, #80000a 100%);
  box-shadow: 
    0 0 10px #e60012,
    0 0 20px rgba(230,0,18,0.5),
    0 0 40px rgba(230,0,18,0.3);
  animation: powerPulse 2s ease-in-out infinite;
}

@keyframes powerPulse {
  0%, 100% { 
    box-shadow: 
      0 0 10px #e60012,
      0 0 20px rgba(230,0,18,0.5),
      0 0 40px rgba(230,0,18,0.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 
      0 0 15px #ff3355,
      0 0 30px rgba(230,0,18,0.6),
      0 0 60px rgba(230,0,18,0.4);
    transform: scale(1.1);
  }
}

/* PS3 — Chrome Sidebar */
[data-theme="ps3"] .sidebar {
  background: 
    linear-gradient(180deg,
      rgba(255,255,255,0.03) 0%,
      transparent 10%
    ),
    linear-gradient(90deg,
      var(--chrome-d2) 0%,
      var(--bg-secondary) 5%,
      var(--bg-secondary) 95%,
      var(--chrome-d2) 100%
    ),
    var(--metal-texture);
  border-right: 1px solid var(--border-color);
  border-left: 1px solid rgba(255,255,255,0.03);
  box-shadow: 
    4px 0 8px rgba(0,0,0,0.5),
    8px 0 16px rgba(0,0,0,0.3),
    inset -1px 0 0 rgba(255,255,255,0.05);
}

/* XMB-style vertical red bar */
[data-theme="ps3"] .sidebar-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg,
    transparent,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-primary),
    transparent
  );
  transition: height 0.3s ease;
  box-shadow: 0 0 8px var(--accent-primary);
}

[data-theme="ps3"] .sidebar-menu a:hover::before,
[data-theme="ps3"] .sidebar-menu a.active::before {
  height: 70%;
}

/* PS3 — Sparkle Particles on Summary Cards */
[data-theme="ps3"] .summary-card {
  position: relative;
  overflow: hidden;
}

[data-theme="ps3"] .summary-card .sparkle {
  position: absolute;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
  animation: sparkle 3s ease-in-out infinite;
}

[data-theme="ps3"] .summary-card .sparkle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
[data-theme="ps3"] .summary-card .sparkle:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.5s; }
[data-theme="ps3"] .summary-card .sparkle:nth-child(3) { bottom: 15%; left: 20%; animation-delay: 1s; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* PS3 — Chrome Text Effect on Brand */
[data-theme="ps3"] .sidebar-brand {
  background: linear-gradient(180deg,
    var(--chrome-h1) 0%,
    var(--chrome-h2) 30%,
    var(--chrome-h3) 50%,
    var(--chrome-m1) 70%,
    var(--chrome-d1) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* PS3 — 3D Input Fields */
[data-theme="ps3"] input,
[data-theme="ps3"] select,
[data-theme="ps3"] textarea {
  background: 
    linear-gradient(180deg,
      var(--chrome-d2) 0%,
      var(--bg-input) 15%,
      var(--bg-input) 85%,
      var(--chrome-d2) 100%
    );
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.5),
    inset 0 4px 8px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.05);
}

[data-theme="ps3"] input:focus,
[data-theme="ps3"] select:focus {
  border-color: rgba(230,0,18,0.5);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.5),
    0 0 15px rgba(230,0,18,0.2),
    0 0 30px rgba(230,0,18,0.1);
}


/* ═════════════════════════════════════════════════════════════════
   PS5 THEME — Deep Glass & Holographic
   ════════════════════════════════════════════════════════════════ */

[data-theme="ps5"] {
  /* 3D Elevation System */
  --elev-1: 
    0 1px 2px rgba(0,0,0,0.04),
    0 2px 4px rgba(0,0,0,0.04),
    0 4px 8px rgba(0,0,0,0.04);
  --elev-2:
    0 2px 4px rgba(0,0,0,0.05),
    0 4px 8px rgba(0,0,0,0.05),
    0 8px 16px rgba(0,0,0,0.05),
    0 16px 32px rgba(0,0,0,0.05);
  --elev-3:
    0 4px 8px rgba(0,0,0,0.06),
    0 8px 16px rgba(0,0,0,0.06),
    0 16px 32px rgba(0,0,0,0.06),
    0 32px 64px rgba(0,0,0,0.06),
    0 64px 128px rgba(0,0,0,0.04);
  --elev-glow:
    0 0 20px rgba(0,114,206,0.2),
    0 0 40px rgba(0,114,206,0.1),
    0 0 80px rgba(0,114,206,0.05);
  --elev-inner:
    inset 0 2px 4px rgba(255,255,255,0.1),
    inset 0 -2px 4px rgba(0,0,0,0.05);
  
  /* Glass System */
  --glass-1: rgba(255,255,255,0.7);
  --glass-2: rgba(255,255,255,0.5);
  --glass-3: rgba(255,255,255,0.3);
  --glass-border: rgba(255,255,255,0.4);
  --glass-highlight: rgba(255,255,255,0.9);
  
  /* Colors */
  --bg-primary:   #f5f7fa;
  --bg-secondary: #eef2f7;
  --bg-tertiary:  #e8edf3;
  --bg-panel:     rgba(255,255,255,0.8);
  --bg-card:      rgba(255,255,255,0.9);
  --bg-input:     rgba(255,255,255,0.95);
  
  --text-primary:   #0d1b2a;
  --text-secondary: #415a77;
  --text-muted:     #778da9;
  --text-disabled:  #a8b5c4;
  
  --accent-primary:   #0072ce;
  --accent-secondary: #00a8ff;
  --accent-tertiary:  #005bb5;
  
  --border-color: rgba(0,0,0,0.08);
  --border-hover: rgba(0,114,206,0.3);
  --border-accent: #0072ce;
  
  --radius: 16px;
  --radius-lg: 24px;
}

/* PS5 — Living Mesh Gradient Background */
[data-theme="ps5"] body {
  background: 
    /* Light leak from corners */
    radial-gradient(ellipse 100% 100% at 0% 0%, rgba(0,168,255,0.12) 0%, transparent 40%),
    radial-gradient(ellipse 100% 100% at 100% 0%, rgba(0,114,206,0.10) 0%, transparent 35%),
    radial-gradient(ellipse 100% 100% at 100% 100%, rgba(0,200,255,0.08) 0%, transparent 45%),
    radial-gradient(ellipse 100% 100% at 0% 100%, rgba(0,114,206,0.10) 0%, transparent 35%),
    /* Ambient glow spots */
    radial-gradient(ellipse 80% 50% at 30% 70%, rgba(0,114,206,0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(0,200,255,0.12) 0%, transparent 45%),
    /* Base gradient */
    linear-gradient(160deg, #f8fafc 0%, #f0f4f8 30%, #e8eef5 60%, #f0f5fa 100%);
  position: relative;
  overflow-x: hidden;
}

/* PS5 — Animated Gradient Orbs */
[data-theme="ps5"] body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    /* Large slow orb */
    radial-gradient(circle at 20% 30%, rgba(0,114,206,0.08) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(0,200,255,0.06) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(0,168,255,0.05) 0%, transparent 40%),
    /* Smaller faster orbs */
    radial-gradient(circle at 70% 20%, rgba(0,114,206,0.10) 0%, transparent 25%),
    radial-gradient(circle at 30% 80%, rgba(0,200,255,0.08) 0%, transparent 20%);
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -2;
  filter: blur(40px);
}

[data-theme="ps5"] body::after {
  content: '';
  position: fixed;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background:
    radial-gradient(circle at 60% 40%, rgba(0,168,255,0.06) 0%, transparent 35%),
    radial-gradient(circle at 40% 60%, rgba(0,114,206,0.04) 0%, transparent 30%);
  animation: orbFloatReverse 15s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

@keyframes orbFloat {
  0%, 100% { 
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% { 
    transform: translate(3%, 5%) scale(1.05) rotate(5deg);
  }
  50% { 
    transform: translate(-2%, 8%) scale(1) rotate(0deg);
  }
  75% { 
    transform: translate(5%, -3%) scale(1.08) rotate(-3deg);
  }
}

@keyframes orbFloatReverse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-5%, 5%) scale(1.1); }
  66% { transform: translate(5%, -5%) scale(0.95); }
}

/* PS5 — Geometric Grid Pattern */
[data-theme="ps5"] #app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* Subtle hexagonal grid */
    linear-gradient(30deg, rgba(0,114,206,0.015) 12%, transparent 12.5%, transparent 87%, rgba(0,114,206,0.015) 87.5%, rgba(0,114,206,0.015)),
    linear-gradient(150deg, rgba(0,114,206,0.015) 12%, transparent 12.5%, transparent 87%, rgba(0,114,206,0.015) 87.5%, rgba(0,114,206,0.015)),
    linear-gradient(30deg, rgba(0,114,206,0.015) 12%, transparent 12.5%, transparent 87%, rgba(0,114,206,0.015) 87.5%, rgba(0,114,206,0.015)),
    linear-gradient(150deg, rgba(0,114,206,0.015) 12%, transparent 12.5%, transparent 87%, rgba(0,114,206,0.015) 87.5%, rgba(0,114,206,0.015)),
    linear-gradient(60deg, rgba(0,200,255,0.01) 25%, transparent 25.5%, transparent 75%, rgba(0,200,255,0.01) 75%, rgba(0,200,255,0.01)),
    linear-gradient(60deg, rgba(0,200,255,0.01) 25%, transparent 25.5%, transparent 75%, rgba(0,200,255,0.01) 75%, rgba(0,200,255,0.01));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

/* PS5 — Deep Glass Cards */
[data-theme="ps5"] .unit-card,
[data-theme="ps5"] .sched-card,
[data-theme="ps5"] .summary-card {
  background: 
    /* Glass highlight */
    linear-gradient(135deg,
      var(--glass-highlight) 0%,
      var(--glass-1) 20%,
      var(--glass-2) 60%,
      var(--glass-3) 100%
    );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 
    var(--elev-2),
    inset 0 1px 1px rgba(255,255,255,0.6);
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Glass refraction edge */
[data-theme="ps5"] .unit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.4) 0%,
    rgba(255,255,255,0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* PS5 — 3D Card Lift Hover */
[data-theme="ps5"] .unit-card:hover,
[data-theme="ps5"] .sched-card:hover,
[data-theme="ps5"] .summary-card:hover {
  transform: 
    translateY(-12px) 
    translateZ(20px) 
    rotateX(2deg);
  box-shadow: 
    var(--elev-3),
    var(--elev-glow),
    0 20px 40px rgba(0,114,206,0.15);
}

[data-theme="ps5"] .unit-card:hover::after,
[data-theme="ps5"] .sched-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.2) 50%,
    transparent 100%
  );
  animation: glassShine 0.6s ease-out;
  pointer-events: none;
}

@keyframes glassShine {
  from { left: -100%; }
  to { left: 100%; }
}

/* PS5 — Holographic Edge on Active Units */
[data-theme="ps5"] .unit-card.active {
  border: 1px solid transparent;
  background: 
    linear-gradient(135deg,
      var(--glass-highlight) 0%,
      var(--glass-1) 20%,
      var(--glass-2) 60%,
      var(--glass-3) 100%
    ),
    linear-gradient(90deg,
      #0072ce 0%,
      #00a8ff 25%,
      #0072ce 50%,
      #00d4ff 75%,
      #0072ce 100%
    );
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  box-shadow: 
    var(--elev-2),
    var(--elev-glow),
    0 0 60px rgba(0,114,206,0.2);
  position: relative;
}

[data-theme="ps5"] .unit-card.active::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  padding: 2px;
  background: linear-gradient(90deg,
    #0072ce 0%,
    #00a8ff 25%,
    #00d4ff 50%,
    #00a8ff 75%,
    #0072ce 100%
  );
  background-size: 200% 100%;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: holoEdge 3s linear infinite;
  pointer-events: none;
}

@keyframes holoEdge {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* PS5 — Neon Pulse Indicator */
[data-theme="ps5"] .unit-card.active .unit-status::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #00d4ff, #0072ce);
  box-shadow: 
    0 0 10px #00a8ff,
    0 0 20px rgba(0,168,255,0.5),
    0 0 40px rgba(0,114,206,0.3);
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% { 
    box-shadow: 
      0 0 10px #00a8ff,
      0 0 20px rgba(0,168,255,0.5),
      0 0 40px rgba(0,114,206,0.3);
  }
  50% { 
    box-shadow: 
      0 0 20px #00d4ff,
      0 0 40px rgba(0,212,255,0.6),
      0 0 80px rgba(0,114,206,0.4);
  }
}

/* PS5 — Frosted Glass Sidebar */
[data-theme="ps5"] .sidebar {
  background: 
    linear-gradient(180deg,
      rgba(255,255,255,0.9) 0%,
      rgba(255,255,255,0.7) 100%
    );
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-right: 1px solid rgba(255,255,255,0.5);
  box-shadow: 
    8px 0 32px rgba(0,0,0,0.08),
    16px 0 64px rgba(0,0,0,0.04);
}

/* PS5 — Light Strip on Summary Cards */
[data-theme="ps5"] .summary-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,114,206,0.3) 20%,
    rgba(0,168,255,0.6) 50%,
    rgba(0,114,206,0.3) 80%,
    transparent 100%
  );
  animation: lightStrip 4s ease-in-out infinite;
}

@keyframes lightStrip {
  0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1.2); }
}

/* PS5 — Holographic Brand Text */
[data-theme="ps5"] .sidebar-brand {
  background: linear-gradient(90deg,
    #0072ce 0%,
    #00a8ff 25%,
    #00d4ff 50%,
    #00a8ff 75%,
    #0072ce 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: holoText 5s linear infinite;
  filter: drop-shadow(0 2px 8px rgba(0,114,206,0.3));
}

@keyframes holoText {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* PS5 — 3D Button with Inner Glow */
[data-theme="ps5"] button,
[data-theme="ps5"] .btn {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.9) 0%,
    rgba(255,255,255,0.7) 10%,
    rgba(0,114,206,0.9) 90%,
    rgba(0,114,206,1) 100%
  );
  border: none;
  box-shadow: 
    var(--elev-1),
    inset 0 1px 1px rgba(255,255,255,0.4),
    inset 0 -1px 1px rgba(0,0,0,0.1);
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transform: translateY(0);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="ps5"] button:hover {
  transform: translateY(-2px);
  box-shadow: 
    var(--elev-2),
    var(--elev-glow),
    inset 0 1px 1px rgba(255,255,255,0.5);
}

[data-theme="ps5"] button:active {
  transform: translateY(1px);
  box-shadow: 
    var(--elev-inner),
    inset 0 2px 4px rgba(0,0,0,0.1);
}

/* PS5 — Floating Particles */
[data-theme="ps5"] body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(0,114,206,0.03) 0%, transparent 3px),
    radial-gradient(circle at 80% 20%, rgba(0,168,255,0.02) 0%, transparent 2px),
    radial-gradient(circle at 40% 70%, rgba(0,200,255,0.02) 0%, transparent 4px),
    radial-gradient(circle at 70% 60%, rgba(0,114,206,0.02) 0%, transparent 2px);
  animation: floatParticles 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes floatParticles {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -20px); }
  66% { transform: translate(-10px, 10px); }
}


/* ═════════════════════════════════════════════════════════════════
   RETRO CRT THEME — Authentic Monitor with Bezel & Depth
   ════════════════════════════════════════════════════════════════ */

[data-theme="retro"] {
  /* CRT Display System */
  --crt-bg: #0a0f0a;
  --crt-phosphor: #33ff33;
  --crt-phosphor-dim: #1a801a;
  --crt-amber: #ffb000;
  --crt-amber-dim: #805500;
  --crt-scanline: rgba(0,0,0,0.4);
  --crt-scanline-light: rgba(0,0,0,0.2);
  --crt-glow: rgba(51,255,51,0.3);
  --crt-glow-strong: rgba(51,255,51,0.6);
  
  /* Bezel Colors */
  --bezel-dark: #1a1a1a;
  --bezel-light: #3a3a3a;
  --bezel-shadow: #0d0d0d;
  
  /* Depth for CRT */
  --crt-depth:
    inset 0 0 100px rgba(0,0,0,0.9),
    inset 0 0 200px rgba(0,0,0,0.7),
    0 0 0 20px var(--bezel-dark),
    0 0 0 22px var(--bezel-light),
    0 0 0 40px var(--bezel-shadow),
    0 20px 60px rgba(0,0,0,0.8);
  
  /* Base */
  --bg-primary:   #0a0f0a;
  --bg-secondary: #0d140d;
  --bg-tertiary:  #111811;
  --bg-panel:     #0d120d;
  --bg-card:      #0a0f0a;
  --bg-input:     #050805;
  
  --text-primary:   #33ff33;
  --text-secondary: #28cc28;
  --text-muted:     #1a801a;
  --text-disabled:  #0d400d;
  
  --accent-primary:   #33ff33;
  --accent-secondary: #66ff66;
  --accent-tertiary:  #00cc00;
  
  --border-color: #1a401a;
  --border-hover: #2a602a;
  --border-accent: #33ff33;
  
  --radius: 4px;
  --radius-lg: 8px;
  
  font-family: 'VT323', 'Courier New', monospace;
}

/* Import VT323 Font */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* CRT — Authentic Monitor with Multiple Layers */
[data-theme="retro"] body {
  background: 
    /* Heavy vignette - CRT tube curvature */
    radial-gradient(ellipse 90% 85% at 50% 50%, transparent 40%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0.9) 100%),
    /* Phosphor glow ambient */
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(51,255,51,0.03) 0%, transparent 60%),
    /* Scanlines - coarse */
    repeating-linear-gradient(
      0deg,
      var(--crt-scanline) 0px,
      var(--crt-scanline) 2px,
      transparent 2px,
      transparent 4px
    ),
    /* Fine scanlines overlay */
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.3) 0px,
      rgba(0,0,0,0.3) 1px,
      transparent 1px,
      transparent 3px
    ),
    /* Moire pattern - CRT characteristic */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(51,255,51,0.01) 1px,
      transparent 2px
    ),
    /* Phosphor shadow mask pattern (RGB dots simulation) */
    radial-gradient(circle at 25% 25%, rgba(51,255,51,0.05) 0%, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(51,255,51,0.05) 0%, transparent 2px),
    /* Grid pattern */
    linear-gradient(90deg, rgba(51,255,51,0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(51,255,51,0.03) 1px, transparent 1px),
    /* Deep base */
    radial-gradient(circle at 50% 50%, #0d140d 0%, #050805 50%, #020402 100%);
  background-size: 
    100% 100%,
    100% 100%,
    100% 4px,
    100% 3px,
    100% 100%,
    8px 8px,
    8px 8px,
    40px 40px,
    40px 40px,
    100% 100%;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT — Monitor Bezel Border */
[data-theme="retro"] body::before {
  content: '';
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 30px solid var(--bezel-dark);
  border-radius: 40px;
  box-shadow: 
    /* Inner bevel shadow */
    inset 0 0 30px rgba(0,0,0,0.9),
    inset 0 0 60px rgba(0,0,0,0.7),
    /* Bevel highlight */
    inset 2px 2px 5px rgba(255,255,255,0.1),
    /* Outer drop shadow */
    0 30px 80px rgba(0,0,0,0.9),
    0 60px 120px rgba(0,0,0,0.6);
  pointer-events: none;
  z-index: 9998;
}

/* Screen Reflection/Glare */
[data-theme="retro"] body::after {
  content: '';
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: 
    /* Corner glare */
    radial-gradient(ellipse 40% 30% at 20% 20%, rgba(255,255,255,0.03) 0%, transparent 60%),
    /* Curvature reflection */
    linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border-radius: 40px;
  pointer-events: none;
  z-index: 9999;
}

/* CRT — Enhanced Random Screen Effects */
[data-theme="retro"] body {
  animation: subtleHum 0.1s infinite;
}

/* Subtle brightness flicker - CRT power hum */
@keyframes subtleHum {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.998); }
}

/* CRT — Random Glitch Lines */
[data-theme="retro"] #app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(
      0deg,
      transparent 0%,
      rgba(51,255,51,0.03) 50%,
      transparent 100%
    );
  opacity: 0;
  animation: glitchLines 8s infinite;
  pointer-events: none;
  z-index: 9997;
}

@keyframes glitchLines {
  0%, 90%, 100% { 
    opacity: 0; 
    transform: translateY(-100%);
  }
  91% { 
    opacity: 0.5; 
    transform: translateY(30%);
  }
  92% { 
    opacity: 0.3; 
    transform: translateY(60%);
  }
  93% { 
    opacity: 0; 
    transform: translateY(100%);
  }
  95% {
    opacity: 0.2;
    transform: translateY(45%);
  }
  96% {
    opacity: 0;
  }
}

/* CRT — Occasional Full Screen Flicker */
[data-theme="retro"] #app::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.02);
  opacity: 0;
  animation: screenFlicker 6s infinite;
  pointer-events: none;
  z-index: 9996;
}

@keyframes screenFlicker {
  0%, 100% { opacity: 0; }
  97% { opacity: 0; }
  98% { opacity: 0.03; }
  99% { opacity: 0; }
}

/* CRT — Cards with Screen Curvature */
[data-theme="retro"] .unit-card,
[data-theme="retro"] .sched-card,
[data-theme="retro"] .summary-card {
  background: rgba(10,15,10,0.95);
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--border-hover);
  box-shadow: 
    0 0 10px rgba(51,255,51,0.1),
    inset 0 0 20px rgba(51,255,51,0.02);
  transform: perspective(1000px) rotateX(0.5deg);
  position: relative;
  overflow: hidden;
}

/* Inner scanlines on cards */
[data-theme="retro"] .unit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 1;
}

/* CRT — Phosphor Glow Text */
[data-theme="retro"] .unit-card *,
[data-theme="retro"] .sched-card *,
[data-theme="retro"] .summary-card * {
  text-shadow: 
    0 0 2px var(--crt-glow),
    0 0 5px var(--crt-glow),
    0 0 10px var(--crt-glow-strong);
}

[data-theme="retro"] h1, [data-theme="retro"] h2, [data-theme="retro"] h3 {
  text-shadow: 
    0 0 5px var(--crt-glow),
    0 0 10px var(--crt-glow),
    0 0 20px var(--crt-glow-strong),
    0 0 40px rgba(51,255,51,0.2);
}

/* CRT — Screen Refresh Line Effect */
[data-theme="retro"] .unit-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg,
    transparent,
    rgba(51,255,51,0.1),
    rgba(51,255,51,0.2),
    rgba(51,255,51,0.1),
    transparent
  );
  animation: screenRefresh 8s linear infinite;
  pointer-events: none;
}

@keyframes screenRefresh {
  0% { top: -100%; }
  100% { top: 200%; }
}

/* CRT — Active Unit with Power LED */
[data-theme="retro"] .unit-card.active {
  border-color: var(--accent-primary);
  box-shadow: 
    0 0 15px var(--crt-glow),
    0 0 30px var(--crt-glow),
    inset 0 0 20px rgba(51,255,51,0.1);
  animation: activePulse 3s ease-in-out infinite;
}

[data-theme="retro"] .unit-card.active::after {
  content: '● PWR';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: var(--crt-phosphor);
  text-shadow: 
    0 0 5px var(--crt-glow),
    0 0 10px var(--crt-glow-strong);
  animation: ledBlink 1s steps(1) infinite;
}

@keyframes ledBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes activePulse {
  0%, 100% { 
    box-shadow: 
      0 0 15px var(--crt-glow),
      0 0 30px var(--crt-glow);
  }
  50% { 
    box-shadow: 
      0 0 20px var(--crt-glow-strong),
      0 0 40px var(--crt-glow-strong),
      0 0 60px rgba(51,255,51,0.2);
  }
}

/* CRT — Phosphor Trail on Buttons */
[data-theme="retro"] button,
[data-theme="retro"] .btn {
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

[data-theme="retro"] button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(51,255,51,0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

[data-theme="retro"] button:active::before {
  width: 200%;
  height: 200%;
  animation: phosphorTrail 0.5s ease-out;
}

@keyframes phosphorTrail {
  0% { opacity: 0.5; }
  100% { opacity: 0; }
}

/* CRT — 3D Sidebar Bezel */
[data-theme="retro"] .sidebar {
  background: var(--bezel-dark);
  border-right: 4px solid var(--bezel-shadow);
  box-shadow: 
    inset -4px 0 8px rgba(0,0,0,0.8),
    inset 4px 0 8px rgba(255,255,255,0.05),
    4px 0 16px rgba(0,0,0,0.9);
  position: relative;
}

[data-theme="retro"] .sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: -4px;
  width: 4px;
  background: linear-gradient(180deg,
    var(--bezel-light) 0%,
    var(--bezel-dark) 50%,
    var(--bezel-shadow) 100%
  );
}

/* CRT — Terminal Inputs */
[data-theme="retro"] input,
[data-theme="retro"] select,
[data-theme="retro"] textarea {
  background: #050805;
  border: 2px solid var(--border-color);
  border-top: 2px solid #0a1a0a;
  border-left: 2px solid #0a1a0a;
  color: var(--text-primary);
  text-shadow: 0 0 5px var(--crt-glow);
  box-shadow: 
    inset 0 0 10px rgba(0,0,0,0.8),
    inset 0 0 20px rgba(0,0,0,0.5);
  caret-color: var(--accent-primary);
}

[data-theme="retro"] input:focus {
  border-color: var(--accent-primary);
  animation: inputGlow 1.5s ease-in-out infinite;
}

@keyframes inputGlow {
  0%, 100% { 
    box-shadow: 
      inset 0 0 10px rgba(0,0,0,0.8),
      0 0 10px rgba(51,255,51,0.2);
  }
  50% { 
    box-shadow: 
      inset 0 0 10px rgba(0,0,0,0.8),
      0 0 20px rgba(51,255,51,0.4),
      0 0 40px rgba(51,255,51,0.2);
  }
}

/* CRT — Blinking Cursor for Clock */
[data-theme="retro"] .clock::after {
  content: '_';
  animation: cursorBlink 1s steps(1) infinite;
}

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

/* CRT — Custom Scrollbar */
[data-theme="retro"] ::-webkit-scrollbar {
  width: 12px;
  background: var(--bezel-dark);
}

[data-theme="retro"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 2px solid var(--bezel-dark);
  box-shadow: inset 0 0 4px rgba(51,255,51,0.2);
}

[data-theme="retro"] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
  box-shadow: 
    inset 0 0 4px rgba(51,255,51,0.4),
    0 0 10px var(--crt-glow);
}

/* CRT — Phosphor Decay/Fade Effect */
[data-theme="retro"] .sched-card:hover,
[data-theme="retro"] .unit-card:hover {
  animation: phosphorDecay 0.3s ease-out;
}

@keyframes phosphorDecay {
  0% { text-shadow: 0 0 20px var(--crt-glow-strong), 0 0 40px var(--crt-glow); }
  100% { text-shadow: 0 0 2px var(--crt-glow), 0 0 5px var(--crt-glow); }
}


/* ═════════════════════════════════════════════════════════════════
   TOPBAR THEME SWITCHER
   ════════════════════════════════════════════════════════════════ */

.theme-switcher {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.2);
  padding: 4px;
  border-radius: 20px;
  margin-right: 12px;
}

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.theme-btn:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.theme-btn.active {
  opacity: 1;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* Theme-specific switcher styles */
[data-theme="ps3"] .theme-switcher {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
}

[data-theme="ps3"] .theme-btn.active {
  background: rgba(230,0,18,0.3);
  box-shadow: 0 0 10px rgba(230,0,18,0.4);
}

[data-theme="ps5"] .theme-switcher {
  background: rgba(0,114,206,0.1);
  border: 1px solid rgba(0,114,206,0.2);
}

[data-theme="ps5"] .theme-btn.active {
  background: rgba(0,114,206,0.2);
  box-shadow: 0 0 10px rgba(0,114,206,0.3);
}

[data-theme="retro"] .theme-switcher {
  background: rgba(51,255,51,0.1);
  border: 1px solid rgba(51,255,51,0.2);
  font-family: inherit;
}

[data-theme="retro"] .theme-btn.active {
  background: rgba(51,255,51,0.2);
  box-shadow: 0 0 10px rgba(51,255,51,0.4);
  text-shadow: 0 0 5px rgba(51,255,51,0.8);
}

/* ── Clock Colon Blink Animation ── */
.clock-colon {
  animation: colonBlink 1s steps(1) infinite;
}

@keyframes colonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

[data-theme="retro"] .clock-colon {
  animation: colonBlink 1s steps(1) infinite;
  text-shadow: 0 0 10px var(--crt-glow);
}


/* ═════════════════════════════════════════════════════════════════
   LIVE STATUS ANIMATIONS
   ════════════════════════════════════════════════════════════════ */

/* Flash animation for new bookings */
@keyframes newBookingFlash {
  0% { 
    box-shadow: 0 0 0 0 rgba(230,0,18,0.8);
    border-color: rgba(230,0,18,0.8);
  }
  50% { 
    box-shadow: 0 0 30px 10px rgba(230,0,18,0.4);
    border-color: rgba(230,0,18,1);
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(230,0,18,0);
    border-color: var(--border-color);
  }
}

.unit-card.new-booking {
  animation: newBookingFlash 2s ease-out;
}

/* Warning pulse for ending soon (≤30 min) */
@keyframes endingWarning {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(255,170,0,0.3);
    border-color: rgba(255,170,0,0.5);
  }
  50% { 
    box-shadow: 0 0 20px rgba(255,170,0,0.6);
    border-color: rgba(255,170,0,0.9);
  }
}

.unit-card.ending-soon {
  animation: endingWarning 1.5s ease-in-out infinite;
}

/* Available settle animation */
@keyframes availableSettle {
  0% { 
    box-shadow: 0 0 20px rgba(0,204,102,0.6);
    transform: scale(0.98);
  }
  100% { 
    box-shadow: var(--shadow-sm);
    transform: scale(1);
  }
}

.unit-card.just-available {
  animation: availableSettle 0.8s ease-out;
}

/* PS3 variations */
[data-theme="ps3"] .unit-card.new-booking {
  animation: newBookingFlash 2s ease-out, powerPulse 2s ease-in-out infinite;
}

[data-theme="ps3"] .unit-card.ending-soon {
  animation: endingWarning 1.5s ease-in-out infinite;
  border-color: rgba(255,170,0,0.6) !important;
}

/* PS5 variations */
[data-theme="ps5"] .unit-card.new-booking {
  animation: newBookingFlash 2s ease-out;
}

[data-theme="ps5"] .unit-card.ending-soon {
  border: 1px solid rgba(255,170,0,0.6) !important;
  box-shadow: 
    var(--elev-2),
    0 0 20px rgba(255,170,0,0.3) !important;
}

/* Retro variations */
[data-theme="retro"] .unit-card.new-booking::after {
  content: 'NEW!';
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 10px;
  color: var(--crt-phosphor);
  animation: ledBlink 0.5s steps(1) infinite;
}

[data-theme="retro"] .unit-card.ending-soon {
  border-color: rgba(255,170,0,0.8) !important;
  box-shadow: 0 0 15px rgba(255,170,0,0.3) !important;
}


/* ═════════════════════════════════════════════════════════════════
   QUICK PREVIEW TOOLTIP
   ════════════════════════════════════════════════════════════════ */

.unit-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 200px;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.unit-card:hover .unit-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

.unit-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-panel);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.tooltip-row:last-child {
  border-bottom: none;
}

.tooltip-label {
  color: var(--text-muted);
}

.tooltip-value {
  color: var(--text-primary);
  font-weight: 500;
}

.tooltip-value.warning {
  color: #ffaa00;
}

.tooltip-value.danger {
  color: #e60012;
}


/* ═════════════════════════════════════════════════════════════════
   PARTICLE EFFECTS SYSTEM
   ════════════════════════════════════════════════════════════════ */

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 20px;
  pointer-events: none;
  animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(0.5) rotate(360deg);
  }
}

/* PS3 Particles */
[data-theme="ps3"] .particle {
  text-shadow: 0 0 10px rgba(230,0,18,0.8);
}

/* PS5 Particles */
[data-theme="ps5"] .particle {
  text-shadow: 0 0 10px rgba(0,114,206,0.8);
  filter: drop-shadow(0 0 5px rgba(0,168,255,0.6));
}

/* Retro Particles */
[data-theme="retro"] .particle {
  color: var(--crt-phosphor);
  text-shadow: 0 0 10px var(--crt-glow);
}

/* Income particle burst target */
@keyframes incomeBurst {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
    text-shadow: 0 0 20px currentColor;
  }
  100% {
    transform: scale(1);
  }
}

.summary-card.income-boost .s-val {
  animation: incomeBurst 0.5s ease-out;
}


/* ═════════════════════════════════════════════════════════════════
   MINI SPARKLINE CHART
   ════════════════════════════════════════════════════════════════ */

.sparkline-container {
  position: absolute;
  bottom: 8px;
  right: 12px;
  width: 60px;
  height: 24px;
  opacity: 0.6;
}

.sparkline {
  width: 100%;
  height: 100%;
}

.sparkline path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline .line-up {
  stroke: #00cc66;
}

.sparkline .line-down {
  stroke: #e60012;
}

.sparkline .area {
  fill-opacity: 0.2;
}

.sparkline .area-up {
  fill: #00cc66;
}

.sparkline .area-down {
  fill: #e60012;
}

/* Theme variations */
[data-theme="ps3"] .sparkline path {
  filter: drop-shadow(0 0 2px currentColor);
}

[data-theme="ps5"] .sparkline-container {
  opacity: 0.8;
}

[data-theme="retro"] .sparkline path {
  stroke-width: 1.5;
  filter: drop-shadow(0 0 3px currentColor);
}


/* ═════════════════════════════════════════════════════════════════
   DEMO MODE SCREENSAVER
   ════════════════════════════════════════════════════════════════ */

.screensaver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: screensaverFadeIn 1s ease;
}

.screensaver.active {
  display: flex;
}

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

.screensaver-slides {
  position: relative;
  width: 80%;
  max-width: 600px;
  height: 400px;
}

.screensaver-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
  text-align: center;
}

.screensaver-slide.active {
  opacity: 1;
}

.screensaver-unit {
  font-size: 64px;
  margin-bottom: 20px;
}

.screensaver-status {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
}

.screensaver-price {
  font-size: 18px;
  opacity: 0.8;
}

.screensaver-hint {
  position: absolute;
  bottom: 40px;
  font-size: 14px;
  opacity: 0.5;
  animation: screensaverHintPulse 2s ease-in-out infinite;
}

@keyframes screensaverHintPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* PS3 Screensaver */
[data-theme="ps3"] .screensaver {
  background: 
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(0,48,135,0.3) 0%, transparent 70%),
    var(--bg-primary);
}

[data-theme="ps3"] .screensaver-unit {
  text-shadow: 0 0 40px rgba(230,0,18,0.5);
}

/* PS5 Screensaver */
[data-theme="ps5"] .screensaver {
  background: 
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,114,206,0.15) 0%, transparent 70%),
    var(--bg-primary);
}

[data-theme="ps5"] .screensaver-slide {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Retro Screensaver */
[data-theme="retro"] .screensaver {
  animation: screensaverFadeIn 1s ease, subtleHum 0.1s infinite;
}

[data-theme="retro"] .screensaver-unit {
  text-shadow: 0 0 20px var(--crt-glow);
}

[data-theme="retro"] .screensaver-hint::after {
  content: '_';
  animation: cursorBlink 1s steps(1) infinite;
}


/* ═════════════════════════════════════════════════════════════════
   KEYBOARD SHORTCUTS HUD
   ════════════════════════════════════════════════════════════════ */

.keyboard-hud {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  display: none;
  gap: 24px;
}

.keyboard-hud.active {
  display: flex;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hud-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hud-key {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.hud-key span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
}

[data-theme="retro"] .hud-key span {
  font-family: 'VT323', monospace;
  font-size: 14px;
}


/* ═════════════════════════════════════════════════════════════════
   SYSTEM PREFERENCE AUTO (PS5 Only)
   ════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  [data-theme="ps5"] {
    --bg-primary:   #0d1b2a;
    --bg-secondary: #1b263b;
    --bg-tertiary:  #415a77;
    --bg-panel:     rgba(26,35,50,0.8);
    --bg-card:      rgba(30,40,55,0.9);
    --bg-input:     rgba(20,30,45,0.95);
    
    --text-primary:   #e0e1dd;
    --text-secondary: #778da9;
    --text-muted:     #4a5c6a;
  }
  
  [data-theme="ps5"] body {
    background: 
      radial-gradient(ellipse 100% 100% at 0% 0%, rgba(0,80,150,0.15) 0%, transparent 40%),
      radial-gradient(ellipse 100% 100% at 100% 100%, rgba(0,100,180,0.1) 0%, transparent 45%),
      linear-gradient(160deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 100%);
  }
}


/* ═════════════════════════════════════════════════════════════════
   THEME SELECTOR UI (Settings Page)
   ════════════════════════════════════════════════════════════════ */

.theme-selector {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.theme-option {
  flex: 1;
  min-width: 120px;
  padding: 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-option:hover {
  transform: translateY(-4px);
}

.theme-option.active {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 20px var(--glow-color);
}

.theme-preview {
  font-size: 32px;
  margin-bottom: 8px;
}

.theme-option[data-theme="ps3"] {
  background: linear-gradient(145deg, #111 0%, #1a1a1a 100%);
  border: 1px solid #333;
}

.theme-option[data-theme="ps3"] .theme-name {
  color: #e60012;
  font-weight: bold;
}

.theme-option[data-theme="ps5"] {
  background: linear-gradient(145deg, #f5f7fa 0%, #eef2f7 100%);
  border: 1px solid #ddd;
}

.theme-option[data-theme="ps5"] .theme-name {
  color: #0072ce;
  font-weight: bold;
}

.theme-option[data-theme="retro"] {
  background: #0a0f0a;
  border: 1px solid #1a401a;
  font-family: 'VT323', monospace;
}

.theme-option[data-theme="retro"] .theme-name {
  color: #33ff33;
}

.theme-option[data-theme="retro"] .theme-preview {
  text-shadow: 0 0 10px #33ff33;
}

.theme-name {
  font-size: 14px;
  margin-top: 8px;
}

.theme-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}


/* ═════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
  [data-theme="ps3"] .unit-card::after,
  [data-theme="ps5"] body::after,
  [data-theme="retro"] body::before,
  [data-theme="retro"] body::after {
    display: none;
  }
  
  [data-theme="retro"] {
    font-size: 14px;
  }
  
  .theme-selector {
    flex-direction: column;
  }
  
  .theme-option {
    min-width: auto;
  }
}

/* Disable complex effects on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
