/* ==========================================================================
   《別碰這個網頁》v2.0 Director's Cut
   Aesthetic: Flagship Silicon Valley SaaS (Linear x Stripe) -> Exposed CAD & PCB Blueprint
   ========================================================================== */

:root {
  --saas-bg: #F8FAFC;
  --saas-surface: #FFFFFF;
  --saas-surface-2: #F1F5F9;
  --saas-border: rgba(15, 23, 42, 0.09);
  --saas-border-strong: rgba(15, 23, 42, 0.18);
  --saas-text: #0F172A;
  --saas-muted: #64748B;
  --saas-accent: #2563EB;
  --saas-accent-hover: #1D4ED8;
  --saas-indigo: #4F46E5;
  --saas-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 40px -10px rgba(15, 23, 42, 0.09),
    0 0 0 1px rgba(15, 23, 42, 0.05);

  --bp-bg: #050E1D;
  --bp-cyan: #38BDF8;
  --bp-amber: #F59E0B;
  --bp-red: #F43F5E;
  --bp-green: #10B981;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Noto Sans TC", "PingFang TC", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--saas-text);
  background: var(--bp-bg);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYER 0: Engineering Blueprint & Recycle Bin
   ========================================================================== */
#blueprint-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.recycle-bin {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(5, 14, 29, 0.82);
  backdrop-filter: blur(8px);
  border: 1.5px dashed rgba(56, 189, 248, 0.5);
  color: #E0F2FE;
  font-family: var(--font-mono);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s ease, transform 0.25s ease, border-color 0.2s ease, background 0.2s ease;
  pointer-events: none;
}

.recycle-bin.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 32;
}

.recycle-bin.drag-over {
  transform: scale(1.16);
  border-color: #F43F5E;
  background: rgba(244, 63, 94, 0.28);
  box-shadow: 0 0 36px rgba(244, 63, 94, 0.5);
}

.recycle-bin-label { font-size: 12px; font-weight: 700; }
.recycle-bin-hint { font-size: 10px; color: #7DD3FC; opacity: 0.88; }

/* ==========================================================================
   LAYER 0.5: Upgraded 3-Column Backend Server Room
   ========================================================================== */
.server-room {
  position: fixed;
  inset: 0;
  z-index: 5;
  background:
    radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.08), transparent 40%),
    radial-gradient(circle at 82% 78%, rgba(56, 189, 248, 0.1), transparent 45%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 4px),
    #040A14;
  color: #E2E8F0;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}

.server-room.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 48;
}

.server-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}

.sr-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: 0.06em;
}

.sr-controls { display: flex; align-items: center; gap: 12px; }

.sr-status {
  font-size: 11px;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 10px;
  border-radius: 6px;
}

.sr-return-btn {
  background: #F8FAFC;
  color: #0F172A;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.sr-return-btn:hover { background: #E2E8F0; transform: translateY(-1px); }

.server-room-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.95fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.sr-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 14px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 40px rgba(0,0,0,0.45);
  overflow: hidden;
}

.sr-panel-title {
  font-size: 11.5px;
  color: #7DD3FC;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.2);
  padding-bottom: 7px;
}

.sr-racks { display: flex; flex-direction: column; gap: 8px; }

.rack-unit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #0B1324;
  border: 1px solid #1E293B;
  border-radius: 10px;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.rack-unit.unplugged { border-color: rgba(244, 63, 94, 0.45); opacity: 0.72; }
.rack-leds { display: flex; gap: 5px; }

.led { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.led-green { background: #10B981; box-shadow: 0 0 8px #10B981; }
.led-cyan { background: #38BDF8; box-shadow: 0 0 8px #38BDF8; }
.led-amber { background: #F59E0B; box-shadow: 0 0 8px #F59E0B; }
.led-red { background: #F43F5E; box-shadow: 0 0 8px #F43F5E; }
.blink { animation: ledBlink 0.9s steps(2) infinite; }
.blink-slow { animation: ledBlink 2.2s steps(2) infinite; }

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

.rack-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rack-info strong { font-size: 12.5px; color: #F1F5F9; }
.rack-info small { font-size: 11px; color: #94A3B8; font-family: var(--font-sans); }

.cable-jack {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.14);
  color: #E0F2FE;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cable-jack:hover { background: rgba(56, 189, 248, 0.26); transform: scale(1.03); }
.cable-jack.unplugged { border-color: #F43F5E; background: rgba(244, 63, 94, 0.18); color: #FDA4AF; }
.jack-port { width: 9px; height: 9px; border-radius: 50%; background: #38BDF8; border: 2px solid #0F172A; }
.cable-jack.unplugged .jack-port { background: #1E293B; border-color: #F43F5E; }

.kill-switch-btn {
  width: 56px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid #FB7185;
  background: linear-gradient(180deg, #F43F5E, #BE123C);
  color: #FFF;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.45);
}

#cables-canvas {
  width: 100%;
  height: 92px;
  margin-top: auto;
  border-radius: 8px;
  background: rgba(4, 10, 20, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.14);
}

.hamster-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hamster-cage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(56,189,248,0.08), rgba(4,10,20,0.72));
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.hamster-speech {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: #FDE68A;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.free-hamster-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
  color: #FEF3C7;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.free-hamster-btn:hover { background: rgba(245, 158, 11, 0.3); transform: translateY(-1px); }

/* Right Hazard Panel: Cooling Fan & Coffee Mug */
.hazard-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.fan-unit, .coffee-unit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #0B1324;
  border: 1px solid #1E293B;
}

.fan-meta, .coffee-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.fan-meta strong, .coffee-meta strong {
  font-size: 13px;
  color: #F8FAFC;
  font-family: var(--font-sans);
}

.fan-temp { font-size: 11.5px; color: #38BDF8; }
.fan-temp.hot { color: #F97316; font-weight: 700; }
.fan-temp.melt { color: #F43F5E; font-weight: 800; }

.coffee-meta small { font-size: 11px; color: #94A3B8; font-family: var(--font-sans); }

.coffee-visual {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.35s ease;
}

.coffee-visual.spilled { transform: rotate(88deg) translate(8px, 6px); }
.coffee-steam { font-size: 14px; color: #CBD5E1; animation: steamRise 1.4s ease-in-out infinite alternate; }
.coffee-mug-icon { font-size: 32px; line-height: 1; }

@keyframes steamRise {
  from { opacity: 0.35; transform: translateY(2px); }
  to { opacity: 0.95; transform: translateY(-4px); }
}

.sr-mini-btn {
  align-self: flex-start;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.14);
  color: #E0F2FE;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sr-mini-btn:hover { background: rgba(56, 189, 248, 0.28); }

.sr-mini-warn {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
  color: #FDE68A;
}

.sr-mini-warn:hover { background: rgba(245, 158, 11, 0.3); }

.sr-terminal {
  height: 76px;
  overflow-y: auto;
  background: #020612;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #34D399;
}

/* ==========================================================================
   LAYER 1: Full-Page Silicon Valley SaaS Stage
   ========================================================================== */
.saas-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--saas-bg);
  display: flex;
  flex-direction: column;
  transition: background-color 0.35s ease, opacity 0.35s ease;
}

.saas-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 15% 15%, rgba(37, 99, 235, 0.08), transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 80%, rgba(99, 102, 241, 0.08), transparent 65%),
    radial-gradient(rgba(15, 23, 42, 0.065) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  transition: opacity 0.4s ease;
}

body.chaos-tier-1 .saas-stage { background: rgba(248, 250, 252, 0.86); }
body.chaos-tier-2 .saas-stage { background: rgba(248, 250, 252, 0.46); }
body.chaos-tier-2 .saas-ambient { opacity: 0.35; }
body.chaos-tier-3 .saas-stage { background: rgba(248, 250, 252, 0.06); }
body.chaos-tier-3 .saas-ambient { opacity: 0; }

/* Theme Dark */
body.theme-dark {
  --saas-bg: #090F1E;
  --saas-surface: #111827;
  --saas-surface-2: #1E293B;
  --saas-border: rgba(255, 255, 255, 0.09);
  --saas-border-strong: rgba(255, 255, 255, 0.18);
  --saas-text: #F8FAFC;
  --saas-muted: #94A3B8;
  --saas-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.theme-dark .saas-ambient {
  background:
    radial-gradient(ellipse 60% 45% at 15% 15%, rgba(56, 189, 248, 0.1), transparent 65%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}

/* CSS Pipe Unplugged (1995 HTML) */
body.css-unplugged .saas-card,
body.css-unplugged .pricing-card,
body.css-unplugged .saas-navbar {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 3px dashed #F43F5E !important;
  font-family: "Times New Roman", serif !important;
}

/* Matrix Mode */
body.mode-matrix .saas-stage { background: rgba(2, 12, 6, 0.88) !important; }
body.mode-matrix .saas-card,
body.mode-matrix .pricing-card,
body.mode-matrix .mini-metric,
body.mode-matrix .saas-navbar {
  background: rgba(4, 22, 11, 0.92) !important;
  border: 1px solid #22C55E !important;
  color: #4ADE80 !important;
  font-family: var(--font-mono) !important;
  box-shadow: 0 0 36px rgba(34, 197, 94, 0.25) !important;
}
body.mode-matrix .form-input,
body.mode-matrix .terms-container,
body.mode-matrix .captcha-box,
body.mode-matrix .btn-secondary,
body.mode-matrix .btn-sso {
  background: #052E16 !important;
  border-color: #22C55E !important;
  color: #86EFAC !important;
}

/* Zalgo / Babel Chromatic Aberration Mode */
body.mode-zalgo .saas-workspace {
  text-shadow: -2px 0 rgba(244, 63, 94, 0.75), 2px 0 rgba(56, 189, 248, 0.75);
  animation: zalgoJitter 0.14s infinite;
}

@keyframes zalgoJitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5px, 1px); }
  50% { transform: translate(1.5px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

/* Earthquake Mode */
body.mode-quake .saas-stage {
  animation: violentQuake 0.11s infinite;
}

@keyframes violentQuake {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-9px, 5px) rotate(-0.8deg); }
  40% { transform: translate(8px, -6px) rotate(0.9deg); }
  60% { transform: translate(-7px, -4px) rotate(-0.6deg); }
  80% { transform: translate(9px, 6px) rotate(0.7deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Zen Halo */
body.mode-zen .saas-card {
  box-shadow: 0 0 0 2px #F59E0B, 0 0 80px rgba(245, 158, 11, 0.5) !important;
  transition: box-shadow 1.2s ease;
}

/* ==========================================================================
   Top Glassmorphic SaaS Navbar
   ========================================================================== */
.saas-navbar {
  position: relative;
  z-index: 30;
  height: 54px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--saas-border);
  flex-shrink: 0;
}

body.theme-dark .saas-navbar,
body.chaos-tier-3 .saas-navbar {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(56, 189, 248, 0.22);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -0.02em;
  margin-right: 4px;
}

.nav-version {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

/* Smashable 99.99% Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-pill:hover { transform: scale(1.03); border-color: #10B981; }

.status-pill.cracked {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #B45309;
}

.status-pill.shattered {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.18);
  color: #DC2626;
  animation: pulseFast 0.35s infinite alternate;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.status-pill.cracked .status-dot { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.status-pill.shattered .status-dot { background: #EF4444; box-shadow: 0 0 8px #EF4444; }

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--saas-surface);
  border: 1px solid var(--saas-border);
  font-size: 11.5px;
  color: var(--saas-muted);
}

.hud-pill strong { color: var(--saas-text); font-family: var(--font-mono); }

.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.hud-pill.warn .hud-dot { background: #F59E0B; }
.hud-pill.crit .hud-dot { background: #EF4444; box-shadow: 0 0 8px #EF4444; }
.hud-pill-chaos { border-color: rgba(245, 158, 11, 0.45); color: #D97706; }

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--saas-border);
  background: var(--saas-surface);
  color: var(--saas-text);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.hud-btn:hover { transform: translateY(-1px); border-color: #3B82F6; }
.hud-btn strong { color: #2563EB; }

/* ==========================================================================
   Main Two-Column Workspace
   ========================================================================== */
.saas-workspace {
  position: relative;
  z-index: 12;
  flex: 1;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 18px 24px 68px;
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: center;
  gap: 44px;
  min-height: 0;
}

/* Left Showcase Column */
.saas-showcase {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.showcase-pill {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 700;
}

body.theme-dark .showcase-pill {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7DD3FC;
}

.showcase-headline {
  font-size: 36px;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--saas-text);
}

.showcase-headline span {
  background: linear-gradient(120deg, #2563EB, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-copy {
  font-size: 14px;
  line-height: 1.65;
  color: var(--saas-muted);
  max-width: 440px;
}

/* Interactive Pricing Card (Ending #18) */
.pricing-card {
  background: var(--saas-surface);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--saas-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pricing-card.hyperinflated {
  box-shadow: 0 0 0 2px #10B981, 0 20px 50px rgba(16, 185, 129, 0.35);
}

.pricing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pricing-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--saas-muted);
}

.pricing-amount {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--saas-text);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.pricing-amount small {
  font-size: 13px;
  font-weight: 600;
  color: var(--saas-muted);
  font-family: var(--font-sans);
}

.seats-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--saas-surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--saas-text);
}

.pricing-slider {
  width: 100%;
  accent-color: #2563EB;
  cursor: pointer;
  height: 6px;
}

.pricing-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--saas-muted);
}

.overdrive-btn {
  padding: 5px 11px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #FFF;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.38);
  animation: pulseFast 0.55s infinite alternate;
}

/* Mini Metrics */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-metric {
  background: var(--saas-surface);
  border: 1px solid var(--saas-border);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mini-metric:hover { transform: translateY(-2px); border-color: #3B82F6; }
.mini-metric strong { font-family: var(--font-mono); font-size: 15px; color: var(--saas-text); }
.mini-metric span { font-size: 11px; color: var(--saas-muted); }

.trust-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--saas-muted);
  opacity: 0.75;
}

.trust-logos {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* ==========================================================================
   Right Column: The Core Registration Form Card
   ========================================================================== */
.saas-card {
  position: relative;
  width: 100%;
  background: var(--saas-surface);
  border-radius: 18px;
  padding: 22px 24px 20px;
  box-shadow: var(--saas-shadow);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  z-index: 14;
}

.saas-card.shaking { animation: cardShake 0.26s ease-in-out; }

@keyframes cardShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-5px, 2px) rotate(-0.8deg); }
  45% { transform: translate(5px, -2px) rotate(0.8deg); }
  70% { transform: translate(-3px, 1px) rotate(-0.4deg); }
}

.saas-card.dragging-page {
  cursor: grabbing;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38), 0 0 0 2px #38BDF8;
  transition: none;
  z-index: 44;
}

.saas-card.trashed {
  transform: scale(0.05) rotate(-540deg) !important;
  opacity: 0 !important;
  transition: transform 0.65s cubic-bezier(0.55, 0.05, 0.67, 0.19), opacity 0.55s ease !important;
}

.crack-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  border-radius: 18px;
}

.card-drag-handle {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: #0F172A;
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  font-size: 11px;
  font-weight: 700;
  cursor: grab;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 25;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

.card-drag-handle.unlocked { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.card-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 4px 8px;
  border-radius: 10px;
}

.screw {
  position: absolute;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: radial-gradient(circle at 35% 35%, #F8FAFC, #CBD5E1);
  cursor: pointer;
  opacity: 0.5;
  transition: transform 0.22s ease, opacity 0.2s ease;
  padding: 0;
}

.screw::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 1.5px;
  right: 1.5px;
  height: 1.5px;
  background: #64748B;
  transform: rotate(35deg);
}

.screw:hover { opacity: 1; border-color: #64748B; }
.screw-left { left: -6px; }
.screw-right { right: -6px; }

.brand-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-title { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--saas-muted); margin-top: 2px; }

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--saas-border);
  background: var(--saas-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.15s ease;
}

.theme-toggle:hover { transform: rotate(14deg); }

.boring-form { display: flex; flex-direction: column; gap: 11px; }
.form-group { display: flex; flex-direction: column; gap: 4px; position: relative; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.form-label { font-size: 12px; font-weight: 600; color: var(--saas-text); cursor: pointer; }
.pass-weight-label { font-size: 10.5px; color: var(--saas-muted); font-family: var(--font-mono); }
.input-wrap { position: relative; display: flex; align-items: center; }

.form-input {
  width: 100%;
  height: 37px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--saas-border);
  background: var(--saas-surface);
  color: var(--saas-text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus { border-color: var(--saas-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.at-badge {
  position: absolute;
  right: 7px;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: var(--saas-surface-2);
  border: 1px solid var(--saas-border);
  color: var(--saas-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.eye-btn {
  position: absolute;
  right: 5px;
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.eye-btn.irritated .eye-outline { fill: #FEE2E2; stroke: #EF4444; }
.eye-btn.furious .eye-outline { fill: #FCA5A5; stroke: #DC2626; }

.strength-track {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--saas-surface-2);
  overflow: hidden;
  margin-top: 2px;
  transform-origin: left center;
  transition: transform 0.25s ease, height 0.25s ease;
}

.strength-fill { height: 100%; width: 0%; border-radius: 99px; background: #94A3B8; transition: width 0.2s ease, background-color 0.2s ease; }

.scroll-heat-tag { font-size: 10.5px; font-weight: 700; color: #EA580C; animation: pulseFast 0.45s infinite alternate; }

@keyframes pulseFast { from { opacity: 0.65; } to { opacity: 1; } }

.terms-container {
  position: relative;
  height: 76px;
  border-radius: 9px;
  border: 1px solid var(--saas-border);
  background: var(--saas-bg);
  display: flex;
  overflow: hidden;
}

.terms-scroll-area {
  flex: 1;
  overflow-y: scroll;
  padding: 8px 11px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--saas-muted);
  scrollbar-width: none;
}

.terms-scroll-area::-webkit-scrollbar { display: none; }
.terms-text p { margin-bottom: 7px; }
.terms-text.crumbling { opacity: 0.35; filter: blur(0.6px); transition: opacity 0.6s ease; }
.terms-text.crumbled { opacity: 0; transition: opacity 0.4s ease; }

.custom-scrollbar-track {
  width: 12px;
  background: rgba(148, 163, 184, 0.14);
  border-left: 1px solid var(--saas-border);
  position: relative;
  flex-shrink: 0;
}

.custom-scrollbar-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 7px;
  height: 26px;
  border-radius: 99px;
  background: #94A3B8;
  cursor: ns-resize;
}

.custom-scrollbar-thumb.hot { background: #F97316; box-shadow: 0 0 10px rgba(249, 115, 22, 0.75); }
.custom-scrollbar-thumb.critical { background: #EF4444; box-shadow: 0 0 14px rgba(239, 68, 68, 0.95); }

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; cursor: pointer; font-size: 12px; }
.checkbox-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.custom-check {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--saas-border-strong);
  background: var(--saas-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.checkbox-row input:checked + .custom-check { background: var(--saas-accent); border-color: var(--saas-accent); }
.checkbox-row input:checked + .custom-check::after { content: "✓"; color: #FFF; font-size: 10px; font-weight: 800; }

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--saas-border);
  background: var(--saas-bg);
}

.captcha-left { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px; font-weight: 500; }
.captcha-left input { position: absolute; opacity: 0; width: 0; height: 0; }
.captcha-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #94A3B8;
  background: var(--saas-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.captcha-check.bot-fail { border-color: #EF4444; background: #EF4444; color: #FFF; }
.captcha-brand { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 8.5px; color: var(--saas-muted); font-weight: 700; }

.actions-row { display: grid; grid-template-columns: 1fr 1.55fr; gap: 9px; }
.submit-slot { position: relative; height: 39px; }

.btn {
  height: 39px;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  width: 100%;
  border: none;
  background: linear-gradient(180deg, #2563EB, #1D4ED8);
  color: #FFF;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.32);
}

.btn-primary.fleeing { position: fixed; width: 170px; z-index: 35; }
.btn-primary.exhausted { background: #EA580C; animation: pant 0.35s infinite alternate; }

@keyframes pant { from { transform: scale(1, 1); } to { transform: scale(1.06, 0.94); } }

.btn-secondary { border: 1px solid var(--saas-border); background: var(--saas-surface); color: var(--saas-text); }
.btn-secondary:hover { background: var(--saas-surface-2); }

.sso-divider { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--saas-muted); }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; height: 1px; background: var(--saas-border); }
.sso-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn-sso { height: 34px; font-size: 12px; border: 1px solid var(--saas-border); background: var(--saas-surface); color: var(--saas-text); }
.btn-sso:hover { background: var(--saas-surface-2); }

/* ==========================================================================
   Cookie Consent Banner (Ending #16)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--saas-border);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  color: var(--saas-text);
  max-width: calc(100vw - 260px);
}

body.theme-dark .cookie-banner { background: rgba(15, 23, 42, 0.92); }
.cookie-copy { display: flex; align-items: center; gap: 8px; }
.cookie-icon { font-size: 18px; }
.cookie-actions { display: flex; gap: 7px; flex-shrink: 0; }
.cookie-btn {
  padding: 6px 11px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.cookie-reject { border: 1px solid var(--saas-border-strong); background: transparent; color: var(--saas-muted); }
.cookie-accept { border: none; background: #0F172A; color: #FFF; }
body.theme-dark .cookie-accept { background: #38BDF8; color: #0F172A; }

/* Cookie Tsunami Popups */
.popup-chaos-layer { position: fixed; inset: 0; z-index: 39; pointer-events: none; }
.cookie-popup-clone {
  position: fixed;
  width: 280px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #FFFFFF;
  color: #0F172A;
  border: 2px solid #F59E0B;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  font-size: 12.5px;
  pointer-events: auto;
  animation: bubblePop 0.2s ease;
}
.cookie-popup-clone strong { display: block; margin-bottom: 6px; color: #B45309; }
.cookie-popup-clone button {
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 7px;
  border: none;
  background: #EF4444;
  color: #FFF;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   AI Support Chat Widget (Ending #17)
   ========================================================================== */
.support-widget {
  position: fixed;
  right: 92px;
  bottom: 16px;
  z-index: 34;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.support-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFF;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
  position: relative;
  transition: transform 0.16s ease;
}

.support-fab:hover { transform: scale(1.08); }

.fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #EF4444;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFF;
}

.support-chat-box {
  width: 310px;
  background: var(--saas-surface);
  border: 1px solid var(--saas-border-strong);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.support-chat-box[hidden] { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #0F172A;
  color: #F8FAFC;
}

.chat-agent { display: flex; align-items: center; gap: 9px; }
.chat-avatar { font-size: 20px; }
.chat-agent strong { display: block; font-size: 12.5px; }
.chat-agent small { font-size: 10.5px; color: #38BDF8; }
.chat-close-btn { background: none; border: none; color: #94A3B8; cursor: pointer; font-size: 14px; }

.chat-messages {
  height: 170px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--saas-bg);
}

.chat-msg {
  max-width: 86%;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.45;
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--saas-surface);
  border: 1px solid var(--saas-border);
  color: var(--saas-text);
}

.chat-msg.user {
  align-self: flex-end;
  background: #2563EB;
  color: #FFF;
}

.chat-msg.rage {
  align-self: flex-start;
  background: #FEE2E2;
  border: 1px solid #EF4444;
  color: #991B1B;
  font-weight: 700;
}

.chat-quick-replies {
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 1px solid var(--saas-border);
  background: var(--saas-surface);
}

.quick-reply-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--saas-border);
  background: var(--saas-bg);
  color: var(--saas-text);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.quick-reply-btn:hover { border-color: #2563EB; background: rgba(37, 99, 235, 0.08); }

/* ==========================================================================
   Physics Detached Elements, Picket Signs, Page Peel & Overlays
   ========================================================================== */
.physics-detached {
  position: fixed !important;
  margin: 0 !important;
  z-index: 27 !important;
  cursor: grab !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3), 0 0 0 1.5px rgba(56, 189, 248, 0.65) !important;
  user-select: none !important;
  touch-action: none !important;
  will-change: transform;
}

.placeholder-ghost {
  border: 1.5px dashed rgba(56, 189, 248, 0.55);
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(56, 189, 248, 0.85);
  pointer-events: none;
}

.picket-sign {
  position: fixed;
  z-index: 38;
  padding: 5px 10px;
  border-radius: 6px;
  background: #FEF08A;
  color: #0F172A;
  border: 2px solid #0F172A;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  animation: picketBounce 0.5s ease-in-out infinite alternate;
  pointer-events: none;
}

.picket-sign::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 3px;
  height: 18px;
  background: #78350F;
  transform: translateX(-50%);
}

@keyframes picketBounce {
  from { transform: translate(-50%, 0) rotate(-3deg); }
  to { transform: translate(-50%, -8px) rotate(3deg); }
}

.page-peel {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 70px;
  height: 70px;
  z-index: 34;
  cursor: grab;
  transition: width 0.25s ease, height 0.25s ease;
}

.page-peel:hover { width: 100px; height: 100px; }

.peel-under {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #040A14 48%, #0F172A 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 9px 11px;
  color: #38BDF8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.peel-flap {
  position: absolute;
  inset: 0;
  background: linear-gradient(315deg, #CBD5E1 0%, #F1F5F9 45%, #FFFFFF 100%);
  clip-path: polygon(0 100%, 100% 0, 0 0);
  box-shadow: -4px -4px 14px rgba(15, 23, 42, 0.22);
}

.peel-hint-badge {
  position: absolute;
  right: 12px;
  bottom: 84px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.page-peel:hover .peel-hint-badge { opacity: 1; transform: translateY(0); }

#fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 28; pointer-events: none; }
.speech-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

.speech-bubble {
  position: fixed;
  max-width: 248px;
  padding: 7px 12px;
  border-radius: 11px;
  background: #0F172A;
  color: #F8FAFC;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.35);
  transform: translate(-50%, -100%);
  animation: bubblePop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.speech-bubble.zen { background: #FFFBEB; color: #92400E; border-color: #F59E0B; }
.speech-bubble.panic { background: #7F1D1D; color: #FEE2E2; border-color: #F87171; }

@keyframes bubblePop {
  from { opacity: 0; transform: translate(-50%, -82%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

.blackout-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  pointer-events: none;
  background: radial-gradient(circle 150px at var(--mx, 50%) var(--my, 50%), transparent 0%, rgba(2, 6, 23, 0.96) 100%);
}

.blackout-caption {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #FDE047;
  border: 1px solid rgba(253, 224, 71, 0.4);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
}

.blackout-eyes { position: fixed; inset: 0; }
.scared-eyes { position: absolute; font-size: 22px; animation: shiver 0.2s infinite alternate; }
@keyframes shiver { from { transform: translate(-1px, 0); } to { transform: translate(1px, 1px); } }

/* BSOD Coffee Crash Overlay */
.bsod-overlay {
  position: fixed;
  inset: 0;
  z-index: 52;
  background: #0066CC;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.bsod-overlay[hidden] { display: none; }
.bsod-inner { max-width: 620px; display: flex; flex-direction: column; gap: 14px; }
.bsod-sad { font-size: 92px; font-weight: 300; line-height: 1; }
.bsod-inner h3 { font-size: 24px; font-weight: 600; }
.bsod-inner p { font-family: var(--font-mono); font-size: 14px; opacity: 0.9; }
.bsod-sub { opacity: 0.75; }

/* Thermal Meltdown Overlay */
.meltdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 52;
  pointer-events: none;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.72));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseFast 0.35s infinite alternate;
}

.meltdown-overlay[hidden] { display: none; }
.meltdown-banner {
  padding: 16px 32px;
  background: #450A0A;
  color: #FEF08A;
  border: 3px solid #F97316;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 0 50px rgba(249, 115, 22, 0.7);
}

.bot-stamp {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 46;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 16px 34px;
  border: 6px solid #EF4444;
  border-radius: 14px;
  color: #EF4444;
  background: rgba(255, 255, 255, 0.94);
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 900;
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.35);
  animation: stampSlam 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

@keyframes stampSlam {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.4); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

/* ==========================================================================
   Modals: Ending Report Card & 24-Endings Archive
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] { display: none; }

.ending-modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0B1324;
  color: #F8FAFC;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ending-modal-top { display: flex; align-items: center; justify-content: space-between; }
.ending-kicker { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.ending-number { color: #38BDF8; font-weight: 700; }
.ending-tier {
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.16);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.7);
  color: #CBD5E1;
  font-size: 14px;
  cursor: pointer;
}

.ending-hero { display: flex; align-items: center; gap: 15px; }
.ending-badge-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 31px;
  flex-shrink: 0;
}
.ending-title-block h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.ending-rarity { margin-top: 3px; font-size: 13px; color: #38BDF8; font-weight: 600; }
.ending-desc { font-size: 13.5px; line-height: 1.65; color: #CBD5E1; }

.ending-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.stat-box { background: rgba(15, 23, 42, 0.9); border: 1px solid #1E293B; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 10.5px; color: #94A3B8; }
.stat-box strong { font-family: var(--font-mono); font-size: 15px; color: #F8FAFC; }

.report-preview-wrap { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(56, 189, 248, 0.25); background: #040A14; }
#report-card-canvas { width: 100%; height: auto; display: block; }

.ending-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.action-btn {
  padding: 10px 13px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.action-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.action-primary { background: #2563EB; color: #FFF; }
.action-secondary { background: #1E293B; color: #E2E8F0; border: 1px solid #334155; }
.action-ghost { background: rgba(56, 189, 248, 0.16); color: #7DD3FC; border: 1px solid rgba(56, 189, 248, 0.38); }
.action-dark { background: #F8FAFC; color: #0F172A; }

/* Archive Modal */
.archive-modal-card {
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  background: #0B1324;
  color: #F8FAFC;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}

.archive-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.archive-header h2 { font-size: 19px; font-weight: 800; }
.archive-sub { font-size: 12.5px; color: #94A3B8; margin-top: 3px; }
.archive-header-right { display: flex; align-items: center; gap: 10px; }
.archive-progress-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 12px;
  border-radius: 99px;
}

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; overflow-y: auto; padding-right: 4px; }
.archive-item {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1E293B;
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.14s ease;
}
.archive-item:hover { border-color: rgba(56, 189, 248, 0.45); transform: translateY(-2px); }
.archive-item.unlocked { border-color: rgba(56, 189, 248, 0.45); background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.28)); }
.archive-item-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: #64748B; }
.archive-item.unlocked .archive-item-top { color: #38BDF8; }
.archive-item-title { font-size: 13px; font-weight: 700; color: #E2E8F0; }
.archive-item-hint { font-size: 11px; line-height: 1.45; color: #94A3B8; }
.archive-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid #1E293B; }
.text-danger-btn { background: transparent; border: none; color: #F87171; font-size: 12px; cursor: pointer; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid #38BDF8;
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* Responsive Layout for Laptops & Narrower Desktop Windows */
@media (max-width: 960px) {
  .saas-workspace { grid-template-columns: 1fr; max-width: 480px; gap: 18px; overflow-y: auto; }
  .saas-showcase { display: none; }
  .server-room-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-height: 760px) {
  .saas-workspace { padding: 10px 22px 58px; gap: 32px; }
  .showcase-headline { font-size: 30px; }
  .saas-card { padding: 16px 20px 15px; }
  .card-header { margin-bottom: 10px; }
  .boring-form { gap: 8px; }
  .form-input { height: 34px; }
  .terms-container { height: 64px; }
  .btn { height: 35px; }
  .btn-sso { height: 31px; }
  .cookie-banner { bottom: 10px; padding: 7px 13px; }
}
