/* ==========================================================================
   RICK AND MORTY (DIMENSION C-137) DESIGN SYSTEM - NISFAL FILSA
   Interdimensional Sci-Fi, Toxic Portal Glow, Citadel Telemetry & Cable TV
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Default: Dimension C-137 (Portal Fluid Green) */
  --portal-green: #97ce4c;
  --portal-bright: #39ff14;
  --portal-glow: rgba(151, 206, 76, 0.45);
  --portal-subtle: rgba(151, 206, 76, 0.12);
  --portal-border: rgba(151, 206, 76, 0.3);
  
  --portal-cyan: #42b4ca;
  --portal-yellow: #fbee35;
  --portal-purple: #a855f7;
  --portal-red: #ef4444;
  
  --void-bg: #07080c;
  --void-card: rgba(15, 18, 28, 0.78);
  --void-card-hover: rgba(22, 28, 44, 0.88);
  --void-elevated: #111420;
  
  --text-white: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-sci-fi: 'Space Grotesk', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --font-body: 'Geist', sans-serif;

  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   DIMENSION THEMES (Interactive Portal Gun Shifter)
   ========================================================================== */
body.dim-cronenberg {
  --portal-green: #f59e0b;
  --portal-bright: #fbbf24;
  --portal-glow: rgba(245, 158, 11, 0.5);
  --portal-subtle: rgba(245, 158, 11, 0.14);
  --portal-border: rgba(245, 158, 11, 0.35);
  --portal-cyan: #ec4899;
}

body.dim-purge {
  --portal-green: #ef4444;
  --portal-bright: #f87171;
  --portal-glow: rgba(239, 68, 68, 0.55);
  --portal-subtle: rgba(239, 68, 68, 0.15);
  --portal-border: rgba(239, 68, 68, 0.4);
  --portal-cyan: #f97316;
}

body.dim-citadel {
  --portal-green: #06b6d4;
  --portal-bright: #22d3ee;
  --portal-glow: rgba(6, 182, 212, 0.5);
  --portal-subtle: rgba(6, 182, 212, 0.14);
  --portal-border: rgba(6, 182, 212, 0.35);
  --portal-cyan: #3b82f6;
}

/* Base Resets */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Rick and Morty Sci-Fi Cursors (Only for devices with mouse/pointer) */
@media (hover: hover) and (pointer: fine) {
  *, *::before, *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='2.5' fill='%2339ff14'/%3E%3Ccircle cx='14' cy='14' r='7.5' fill='none' stroke='%2397ce4c' stroke-width='1.2' stroke-dasharray='3 2' opacity='0.8'/%3E%3Cline x1='14' y1='1' x2='14' y2='6' stroke='%2397ce4c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%2397ce4c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='14' x2='6' y2='14' stroke='%2397ce4c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='22' y1='14' x2='27' y2='14' stroke='%2397ce4c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, crosshair;
  }

  a, button, [role="button"], input, select, textarea, .btn-dimension, .btn-tv-knob, .btn-meeseeks, .btn-flip-card, .butter-robot-btn, .footer-portal-button, .btn-channel-inspect {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='3.5' fill='%2339ff14'/%3E%3Cpath d='M6 11V6H11' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M21 6H26V11' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M6 21V26H11' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M21 26H26V21' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%2339ff14' stroke-width='1' opacity='0.6'/%3E%3C/svg%3E") 16 16, pointer !important;
  }

  body.dim-cronenberg *, body.dim-cronenberg *::before, body.dim-cronenberg *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='2.5' fill='%23fbbf24'/%3E%3Ccircle cx='14' cy='14' r='7.5' fill='none' stroke='%23f59e0b' stroke-width='1.2' stroke-dasharray='3 2' opacity='0.8'/%3E%3Cline x1='14' y1='1' x2='14' y2='6' stroke='%23f59e0b' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%23f59e0b' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='14' x2='6' y2='14' stroke='%23f59e0b' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='22' y1='14' x2='27' y2='14' stroke='%23f59e0b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, crosshair;
  }

  body.dim-purge *, body.dim-purge *::before, body.dim-purge *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='2.5' fill='%23ef4444'/%3E%3Ccircle cx='14' cy='14' r='7.5' fill='none' stroke='%23ef4444' stroke-width='1.2' stroke-dasharray='3 2' opacity='0.8'/%3E%3Cline x1='14' y1='1' x2='14' y2='6' stroke='%23ef4444' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%23ef4444' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='14' x2='6' y2='14' stroke='%23ef4444' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='22' y1='14' x2='27' y2='14' stroke='%23ef4444' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, crosshair;
  }

  body.dim-citadel *, body.dim-citadel *::before, body.dim-citadel *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='2.5' fill='%2322d3ee'/%3E%3Ccircle cx='14' cy='14' r='7.5' fill='none' stroke='%2306b6d4' stroke-width='1.2' stroke-dasharray='3 2' opacity='0.8'/%3E%3Cline x1='14' y1='1' x2='14' y2='6' stroke='%2306b6d4' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%2306b6d4' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='14' x2='6' y2='14' stroke='%2306b6d4' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='22' y1='14' x2='27' y2='14' stroke='%2306b6d4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, crosshair;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void-bg);
  color: var(--text-white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.6s ease;
}

/* Background Animated Canvas, Grids, and Scanlines (Hardware-Accelerated & Isolated) */
#portalCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  contain: strict;
  backface-visibility: hidden;
}

.cosmic-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  contain: strict;
  backface-visibility: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  transform: translate3d(0, 0, 0);
  contain: strict;
  backface-visibility: hidden;
}

/* Screen Glitch Overlay during Portal Shifts */
.glitch-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.1s ease;
}

body.portal-transition-glitch .glitch-overlay {
  opacity: 1;
  background: radial-gradient(circle, rgba(151, 206, 76, 0.18) 0%, rgba(239, 68, 68, 0.15) 50%, rgba(0, 0, 0, 0.8) 100%);
  animation: glitchFlicker 0.45s steps(3) infinite;
}

body.portal-transition-glitch {
  animation: screenWarp 0.45s ease;
}

@keyframes glitchFlicker {
  0% { transform: translate(0, 0) scale(1); filter: hue-rotate(0deg); }
  25% { transform: translate(-3px, 2px) scale(1.01); filter: hue-rotate(90deg); }
  50% { transform: translate(4px, -2px) scale(0.99); filter: hue-rotate(180deg); }
  75% { transform: translate(-2px, -3px) scale(1.02); filter: hue-rotate(270deg); }
  100% { transform: translate(0, 0) scale(1); filter: hue-rotate(360deg); }
}

@keyframes screenWarp {
  0% { transform: scale(1); filter: blur(0px); }
  40% { transform: scale(1.015) skewX(0.8deg); filter: blur(1.5px) contrast(150%); }
  70% { transform: scale(0.99) skewX(-0.5deg); filter: blur(0.8px); }
  100% { transform: scale(1) skewX(0deg); filter: blur(0px); }
}

/* Container */
.rm-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.rm-navbar {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin-bottom: 2.5rem;
}

.rm-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--portal-border);
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 20px var(--portal-subtle);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.rm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-white);
}

.rm-portal-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--portal-bright) 10%, var(--portal-green) 50%, transparent 85%);
  box-shadow: 0 0 12px var(--portal-green);
  animation: portalSpin 8s linear infinite;
  display: inline-block;
}

@keyframes portalSpin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  to { transform: rotate(360deg) scale(1); }
}

.rm-logo-text {
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.rm-logo-dim {
  color: var(--portal-green);
  font-size: 0.8rem;
  padding: 2px 6px;
  background: var(--portal-subtle);
  border-radius: 4px;
  border: 1px solid var(--portal-border);
  margin-left: 4px;
}

.rm-nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: visible;
}

.rm-nav-link {
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
}

.rm-nav-link .nav-num {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 700;
  transition: color 0.25s ease;
}

.rm-nav-link .nav-label {
  letter-spacing: 0.06em;
  font-weight: 600;
}

.rm-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.rm-nav-link:hover .nav-num {
  color: var(--portal-green);
}

.rm-nav-link.active {
  color: #ffffff;
  background: var(--portal-subtle);
  border-color: var(--portal-border);
  box-shadow: 0 0 12px var(--portal-glow);
}

.rm-nav-link.active .nav-num {
  color: var(--portal-bright);
}

/* 4-Pillar Grouping & Flyout Dropdowns */
.nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
}

.nav-chevron {
  font-size: 0.62rem;
  color: #64748b;
  margin-left: 2px;
  transition: transform 0.25s ease, color 0.2s ease;
  user-select: none;
}

.nav-group:hover .nav-chevron,
.nav-group.is-open .nav-chevron,
.nav-group:focus-within .nav-chevron {
  transform: rotate(180deg);
  color: var(--portal-green);
}

.nav-flyout {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 220px;
  background: rgba(10, 15, 25, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(151, 206, 76, 0.4);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 
    0 20px 45px -10px rgba(0, 0, 0, 0.9),
    0 0 25px rgba(151, 206, 76, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Invisible hover bridge to prevent mouse-leave when moving into dropdown */
.nav-flyout::after {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

.nav-flyout::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(10, 15, 25, 0.98);
  border-left: 1px solid rgba(151, 206, 76, 0.4);
  border-top: 1px solid rgba(151, 206, 76, 0.4);
}

.nav-group:hover .nav-flyout,
.nav-group.is-open .nav-flyout,
.nav-group:focus-within .nav-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-flyout-header {
  font-family: var(--font-code);
  font-size: 0.64rem;
  color: #64748b;
  padding: 4px 8px 6px;
  letter-spacing: 0.6px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.nav-flyout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-code);
  font-size: 0.74rem;
  color: #cbd5e1;
  transition: all 0.18s ease;
}

.nav-flyout-item:hover,
.nav-flyout-item.active {
  background: rgba(151, 206, 76, 0.12);
  color: #ffffff;
}

.flyout-num {
  font-size: 0.66rem;
  color: var(--portal-green);
  font-weight: 700;
}

.flyout-text {
  letter-spacing: 0.2px;
}

/* Quick Transmit CLI Nav Button */
.btn-nav-terminal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  background: rgba(151, 206, 76, 0.1);
  border: 1px solid rgba(151, 206, 76, 0.4);
  color: #97ce4c;
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all 0.22s var(--ease-smooth);
  box-shadow: 0 0 12px rgba(151, 206, 76, 0.15);
  white-space: nowrap;
}

.btn-nav-terminal:hover {
  background: rgba(151, 206, 76, 0.22);
  color: #ffffff;
  border-color: #97ce4c;
  box-shadow: 0 0 20px rgba(151, 206, 76, 0.35);
  transform: translateY(-1px);
}

.nav-cli-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #97ce4c;
  animation: beaconPulse 1.5s infinite ease-in-out;
}

.btn-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.audio-status-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39ff14;
  box-shadow: 0 0 6px #39ff14;
  transition: all 0.2s ease;
}

.btn-audio-toggle:hover {
  border-color: var(--portal-green);
  color: var(--text-white);
}

.btn-audio-toggle.audio-muted {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-audio-toggle.audio-muted .audio-status-led {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.btn-audio-toggle.audio-muted .nav-btn-icon {
  stroke: #64748b;
}

.btn-back-reality {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #ffffff;
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.18);
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
}

.reality-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  animation: realityPulse 1.8s ease-in-out infinite;
}

@keyframes realityPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px #38bdf8; }
}

.btn-back-reality:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(15, 23, 42, 0.8));
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.btn-back-reality:active {
  transform: translateY(1px);
}

.rm-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Rick & Morty Multiverse Subspace Language Switcher */
.rm-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid rgba(151, 206, 76, 0.35);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(151, 206, 76, 0.12);
  transition: all 0.22s var(--ease-smooth);
}

.rm-lang-switcher:hover {
  border-color: rgba(151, 206, 76, 0.6);
  box-shadow: 0 0 14px rgba(151, 206, 76, 0.25);
}

.rm-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 0.22rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-dim, #94a3b8);
  font-family: var(--font-code, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
  text-decoration: none;
}

.rm-lang-btn:hover {
  color: #ffffff;
  border-color: rgba(151, 206, 76, 0.35);
  background: rgba(151, 206, 76, 0.1);
}

.rm-lang-btn.active {
  color: #06090e;
  background: #97ce4c;
  border-color: #97ce4c;
  box-shadow: 0 0 12px rgba(151, 206, 76, 0.65);
  font-weight: 800;
}

.rm-lang-divider {
  font-size: 0.7rem;
  color: #475569;
  user-select: none;
  font-family: var(--font-code, monospace);
  opacity: 0.7;
}

/* Sci-Fi Portal Hamburger Toggle Button */
.rm-nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--portal-border);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4.5px;
  padding: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px var(--portal-subtle);
  transition: all 0.25s ease;
}

.rm-nav-toggle:hover {
  background: var(--portal-subtle);
  border-color: var(--portal-green);
  box-shadow: 0 0 14px var(--portal-glow);
}

.portal-bar {
  width: 18px;
  height: 2px;
  background: var(--portal-bright);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--portal-bright);
  transition: transform 0.3s ease, opacity 0.25s ease, background-color 0.3s ease;
}

.rm-nav-toggle.open .bar-1 {
  transform: translateY(6.5px) rotate(45deg);
}

.rm-nav-toggle.open .bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.rm-nav-toggle.open .bar-3 {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Fullscreen Reality Collapse VFX (Reverse Portal Out) --- */
.reality-collapse-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #07080c;
  pointer-events: none;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reality-collapse-fullscreen.active {
  pointer-events: auto;
  opacity: 1;
}

.collapse-line {
  width: 100%;
  height: 3px;
  background: #38bdf8;
  box-shadow: 0 0 30px #38bdf8, 0 0 60px #39ff14;
  opacity: 0;
}

.reality-collapse-fullscreen.active .collapse-line {
  animation: crtCollapseVfx 0.65s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@keyframes crtCollapseVfx {
  0% {
    opacity: 1;
    transform: scaleY(300);
    filter: brightness(2);
  }
  45% {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
    filter: brightness(2.5);
  }
  80% {
    opacity: 1;
    transform: scaleY(1) scaleX(0.05);
    filter: brightness(3);
  }
  100% {
    opacity: 0;
    transform: scaleY(0) scaleX(0);
  }
}

body.reality-collapsing {
  animation: bodyCollapseWarp 0.65s ease-in forwards;
  overflow: hidden;
}

@keyframes bodyCollapseWarp {
  0% { transform: scale(1); filter: blur(0); }
  50% { transform: scale(0.98) scaleY(0.7); filter: blur(2px) contrast(180%); }
  100% { transform: scale(0.95) scaleY(0.01); filter: blur(6px) brightness(3); }
}

/* --- Entrance Flash (When arriving from portal) --- */
body.portal-arrived {
  animation: arrivalFlash 0.6s ease-out forwards;
}

@keyframes arrivalFlash {
  0% { filter: brightness(2.5) contrast(150%) blur(4px); }
  100% { filter: brightness(1) contrast(100%) blur(0); }
}

/* ==========================================================================
   HERO: 3D FLIPPABLE CITADEL ID & GALACTIC WANTED POSTER
   ========================================================================== */
.rm-hero {
  margin-bottom: 3.5rem;
}

.citadel-flip-container {
  perspective: 1600px;
  position: relative;
  width: 100%;
}

.citadel-flipper {
  position: relative;
  display: grid;
  grid-template-areas: "card";
  width: 100%;
  perspective: 1600px;
}

.citadel-card-front {
  transition: opacity 0.4s ease, transform 0.85s cubic-bezier(0.34, 1.25, 0.64, 1);
  transform: rotateY(0deg);
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.citadel-card-back {
  transition: opacity 0.4s ease, transform 0.85s cubic-bezier(0.34, 1.25, 0.64, 1);
  transform: rotateY(180deg);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.citadel-flipper.flipped .citadel-card-front {
  transform: rotateY(-180deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.citadel-flipper.flipped .citadel-card-back {
  transform: rotateY(0deg) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}

.citadel-card {
  grid-area: card;
  background: var(--void-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--portal-border);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px var(--portal-subtle);
  position: relative;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  width: 100%;
}

.citadel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--portal-bright), var(--portal-cyan), transparent);
}

.citadel-header-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.citadel-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.citadel-seal {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--portal-green);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border: 1px solid var(--portal-border);
  border-radius: 4px;
  background: var(--portal-subtle);
}

.citadel-id-num {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.citadel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.citadel-threat-badge {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.threat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.btn-citadel-toggle {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f1f5f9;
  background: #0f131a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-citadel-toggle:hover {
  background: #181f2b;
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-citadel-toggle:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.btn-toggle-id:hover {
  border-color: var(--portal-green) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px var(--portal-glow) !important;
}

.toggle-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toggle-led.red {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.toggle-led.green {
  background: var(--portal-bright);
  box-shadow: 0 0 8px var(--portal-bright);
}

.toggle-arrow {
  color: var(--text-dim);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.btn-citadel-toggle:hover .toggle-arrow {
  transform: rotate(180deg);
  color: #ffffff;
}

/* Citadel Grid Inside */
.citadel-body-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.avatar-portal-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-portal-glow {
  position: absolute;
  inset: -12px;
  border-radius: 26px;
  background: radial-gradient(circle, var(--portal-bright) 0%, var(--portal-green) 40%, transparent 75%);
  filter: blur(14px);
  opacity: 0.7;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  from { opacity: 0.5; transform: scale(0.97); }
  to { opacity: 0.85; transform: scale(1.03); }
}

.avatar-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid var(--portal-green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.avatar-label {
  position: absolute;
  bottom: -10px;
  z-index: 3;
  background: var(--void-bg);
  border: 1px solid var(--portal-border);
  color: var(--portal-bright);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Citadel Bio Details */
.citadel-bio {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bio-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bio-eyebrow {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--portal-green);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.bio-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.bio-role {
  font-family: var(--font-sci-fi);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--portal-cyan);
}

.bio-quote-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--portal-green);
  padding: 0.9rem 1.2rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.6;
}

.bio-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.bio-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 0.75rem;
}

.bio-stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bio-stat-label {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bio-stat-value {
  font-family: var(--font-code);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--portal-bright);
}

/* ==========================================================================
   BACK OF CITADEL CARD: GALACTIC FEDERATION WANTED POSTER
   ========================================================================== */
.citadel-card-back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at top right, rgba(45, 12, 18, 0.94), rgba(16, 8, 12, 0.96));
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(239, 68, 68, 0.25);
}

.citadel-card-back::before {
  background: linear-gradient(90deg, transparent, #ef4444, #f97316, transparent);
}

.wanted-header-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(239, 68, 68, 0.35);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.wanted-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wanted-seal {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
}

.wanted-warrant {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: #fb7171;
}

/* Handled via .btn-citadel-toggle and .btn-toggle-id */

.wanted-body-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.wanted-mugshot-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #ef4444;
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.3);
}

.wanted-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: auto;
  z-index: 5;
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.9);
  border: 2px solid #ef4444;
  border-radius: 6px;
  padding: 3px 10px;
  transform: rotate(-6deg);
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
  pointer-events: none;
  white-space: nowrap;
}

.mugshot-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(rgba(239, 68, 68, 0.08) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.wanted-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: contrast(105%) saturate(110%);
}

.wanted-bounty-box {
  background: rgba(15, 6, 8, 0.95);
  border-top: 2px solid #ef4444;
  padding: 0.85rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bounty-currency {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: #fca5a5;
  letter-spacing: 0.12em;
}

.bounty-number {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 12px rgba(254, 240, 138, 0.6);
  letter-spacing: 0.05em;
}

.bounty-dead-alive {
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.15em;
}

.wanted-dossier {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.wanted-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.wanted-eyebrow {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: #ef4444;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.wanted-alias {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.wanted-crimes-label {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.wanted-crimes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wanted-crimes-list li {
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.55;
  padding-left: 1.4rem;
  position: relative;
}

.wanted-crimes-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-code);
  font-weight: 800;
  color: #ef4444;
  font-size: 0.85rem;
}

.wanted-crimes-list strong {
  color: #f87171;
}

.wanted-warning-alert {
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid #ef4444;
  padding: 0.85rem 1.1rem;
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem;
  color: #fca5a5;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-icon-svg {
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   PORTAL GUN DIMENSION SHIFTER WIDGET
   ========================================================================== */
.dimension-shifter-section {
  margin-bottom: 3.5rem;
}

.shifter-box {
  background: var(--void-card);
  border: 1px solid var(--portal-border);
  border-radius: 20px;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.shifter-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shifter-heading {
  font-family: var(--font-sci-fi);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shifter-title-icon {
  color: var(--portal-green);
  flex-shrink: 0;
}

.shifter-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.shifter-buttons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-dimension {
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0f131a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-dimension:hover {
  background: #181f2b;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-dimension:active {
  transform: translateY(1px);
}

.btn-dimension.active {
  background: rgba(151, 206, 76, 0.14);
  border-color: var(--portal-green);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 14px var(--portal-glow);
}

.dim-coord {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--portal-bright);
  letter-spacing: 0.06em;
}

.btn-dimension.active .dim-coord {
  background: var(--portal-green);
  color: #07080c;
}

/* ==========================================================================
   RICK'S TECH ARSENAL (Bento Grid)
   ========================================================================== */
.arsenal-section {
  margin-bottom: 4rem;
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--portal-green);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-main-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.arsenal-card {
  background: var(--void-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.arsenal-card:hover {
  border-color: var(--portal-border);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 25px var(--portal-subtle);
  transform: translateY(-3px);
  background: var(--void-card-hover);
}

.card-gadget-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #0d121c;
  border: 1px solid var(--portal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--portal-bright);
  box-shadow: 0 0 14px var(--portal-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-gadget-name {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--portal-green);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
  display: block;
}

.card-title {
  font-family: var(--font-sci-fi);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0.25rem 0 0.5rem;
}

.card-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-real-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.stack-tag {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.stack-tag.glow {
  background: var(--portal-subtle);
  border-color: var(--portal-border);
  color: var(--portal-bright);
}

/* ==========================================================================
   INTERDIMENSIONAL CABLE TV SECTION (PROJECT SHOWCASE)
   ========================================================================== */
.cable-tv-section {
  margin-bottom: 4.5rem;
}

.tv-retro-console {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

/* Antennas */
.tv-antennas {
  position: relative;
  height: 40px;
  display: flex;
  justify-content: center;
  gap: 60px;
  z-index: 1;
}

.antenna {
  width: 5px;
  height: 55px;
  background: linear-gradient(to top, #64748b, #cbd5e1);
  border-radius: 4px;
  position: relative;
}

.antenna::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 10px #ef4444;
}

.antenna-left {
  transform: rotate(-28deg);
  transform-origin: bottom center;
}

.antenna-right {
  transform: rotate(28deg);
  transform-origin: bottom center;
}

/* TV Housing */
.tv-housing {
  background: linear-gradient(145deg, #1e2230 0%, #0f131f 100%);
  border: 3px solid #334155;
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), inset 0 2px 5px rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  position: relative;
}

/* CRT Screen */
.tv-screen-wrapper {
  background: #05070a;
  border-radius: 18px;
  border: 4px solid #1e293b;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
}

.crt-glass {
  width: 100%;
  padding: 1.8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(14, 22, 35, 0.9) 0%, rgba(5, 8, 14, 0.98) 100%);
}

.crt-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 5;
}

.crt-noise {
  position: absolute;
  inset: 0;
  background: 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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 6;
  opacity: 0.18;
}

.crt-noise.channel-switch-burst {
  opacity: 0.85;
  animation: staticBurst 0.25s linear;
}

@keyframes staticBurst {
  0% { opacity: 0.9; transform: scale(1.05); filter: contrast(200%); }
  50% { opacity: 0.7; transform: scale(0.98); }
  100% { opacity: 0.18; transform: scale(1); }
}

.tv-channel-screen {
  position: relative;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.channel-tag-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.channel-tag {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--portal-cyan);
  background: rgba(66, 180, 202, 0.15);
  border: 1px solid rgba(66, 180, 202, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.channel-rating {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.channel-broadcast-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.channel-broadcast-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
}

.channel-highlights-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.channel-highlights-list li {
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ch-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--portal-green);
  box-shadow: 0 0 6px var(--portal-green);
  flex-shrink: 0;
}

.channel-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

.btn-channel-inspect {
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 700;
  color: #07080c;
  background: var(--portal-green);
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 15px var(--portal-glow);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-channel-inspect:hover {
  background: var(--portal-bright);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--portal-bright);
}

/* TV Control Panel */
.tv-control-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #111522;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.4rem;
  gap: 1.2rem;
}

.tv-dial-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dial-label {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: #64748b;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.channel-indicator {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--portal-bright);
  text-shadow: 0 0 12px var(--portal-bright);
  padding: 0.2rem 1rem;
  background: #090c14;
  border-radius: 8px;
  border: 1px solid var(--portal-border);
  letter-spacing: 0.05em;
}

.tv-rotary-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0.3rem 0;
}

.tv-rotary-dial {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #334155 0%, #1e293b 50%, #0f172a 100%);
  border: 3px solid #475569;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7), inset 0 2px 3px rgba(255, 255, 255, 0.25);
  position: relative;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-rotary-dial:hover {
  border-color: var(--portal-cyan);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.35);
}

.tv-rotary-dial:active {
  transform: scale(0.96);
}

.dial-marker {
  position: absolute;
  top: 6px;
  width: 4px;
  height: 12px;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 6px #38bdf8;
}

.dial-sub-label {
  font-family: var(--font-code);
  font-size: 0.62rem;
  color: #64748b;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.tv-channel-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.btn-channel-select {
  width: 100%;
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-radius: 6px;
  background: #090c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-channel-select:hover {
  background: #131826;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-channel-select.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: #38bdf8;
  color: #ffffff;
}

.ch-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-channel-select.active .ch-indicator-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.btn-tv-cycle {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tv-cycle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-tv-cycle:active {
  transform: translateY(1px);
}

.tv-telemetry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  background: #080b12;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  color: #64748b;
}

.telemetry-val {
  color: #e2e8f0;
}

.signal-ok {
  color: var(--portal-green);
  font-weight: 700;
}

.tv-speaker-grille {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 0.5rem;
}

.grille-line {
  height: 4px;
  background: #1e293b;
  border-radius: 2px;
}

/* ==========================================================================
   MR. MEESEEKS INTERACTIVE BOX (WITH RAGE ESCALATION)
   ========================================================================== */
.meeseeks-section {
  margin-bottom: 4rem;
}

.meeseeks-container {
  background: linear-gradient(135deg, rgba(66, 180, 202, 0.15) 0%, rgba(15, 22, 38, 0.85) 100%);
  border: 1px solid rgba(66, 180, 202, 0.35);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(66, 180, 202, 0.15);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
}

.meeseeks-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.meeseeks-badge {
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--portal-cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  background: rgba(66, 180, 202, 0.12);
  border: 1px solid rgba(66, 180, 202, 0.3);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.meeseeks-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
}

.meeseeks-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.meeseeks-warning-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #fbbf24;
  margin-top: 0.5rem;
  font-family: var(--font-code);
}

.warning-icon-svg {
  color: #fbbf24;
  flex-shrink: 0;
}

.meeseeks-actions-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-meeseeks-dome {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 12px;
  background: #0a101d;
  border: 2px solid #0284c7;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-meeseeks-dome:hover {
  border-color: #38bdf8;
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-meeseeks-dome:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.dome-bezel {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid #334155;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dome-core {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #38bdf8 0%, #0284c7 60%, #0369a1 100%);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.6);
  position: relative;
  transition: all 0.15s ease;
}

.btn-meeseeks-dome:active .dome-core {
  transform: scale(0.92);
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.6), inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.dome-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.dome-headline {
  font-family: var(--font-sci-fi);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.dome-subline {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--portal-cyan);
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Meeseeks angry / crisis mode for dome button */
.btn-meeseeks-dome.btn-meeseeks-angry,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome,
.meeseeks-angry .btn-meeseeks-dome {
  background: linear-gradient(145deg, #22060b 0%, #0d0205 100%) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.65), 0 0 20px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255, 120, 120, 0.3) !important;
  animation: domeButtonTremble 0.22s infinite alternate;
}

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

.btn-meeseeks-dome.btn-meeseeks-angry .dome-bezel,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome .dome-bezel,
.meeseeks-angry .dome-bezel {
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.7), inset 0 2px 5px rgba(0, 0, 0, 0.85) !important;
  background: linear-gradient(145deg, #3d0d14, #1c0509) !important;
}

.btn-meeseeks-dome.btn-meeseeks-angry .dome-core,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome .dome-core,
.meeseeks-angry .dome-core {
  background: radial-gradient(circle at 35% 30%, #ff9999 0%, #ef4444 55%, #7f1d1d 100%) !important;
  box-shadow: 0 0 24px #ef4444, inset 0 2px 4px rgba(255, 255, 255, 0.9) !important;
  animation: domeRagePulse 0.35s infinite alternate !important;
}

@keyframes domeRagePulse {
  from { filter: brightness(1); transform: scale(0.98); }
  to { filter: brightness(1.4); transform: scale(1.05); }
}

.btn-meeseeks-dome.btn-meeseeks-angry .dome-headline,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome .dome-headline {
  color: #ffffff !important;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.95);
}

.btn-meeseeks-dome.btn-meeseeks-angry .dome-subline,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome .dome-subline {
  color: #fca5a5 !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.btn-meeseeks-dome.btn-meeseeks-angry:hover,
.meeseeks-container.meeseeks-crisis .btn-meeseeks-dome:hover {
  border-color: #ff2a4b !important;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.85), 0 0 30px #ef4444, inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px) scale(1.02);
}

/* Dome Button Meltdown State */
.btn-meeseeks-dome.btn-meeseeks-meltdown {
  background: #35000a !important;
  border-color: #ff0033 !important;
  box-shadow: 0 0 60px rgba(255, 0, 51, 1), inset 0 0 25px rgba(255, 0, 51, 0.8) !important;
  animation: meeseeksMeltdownVibrate 0.08s infinite !important;
}

.btn-meeseeks-dome.btn-meeseeks-meltdown .dome-core {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ff0033 60%, #60000e 100%) !important;
  box-shadow: 0 0 40px #ff0033 !important;
}

.btn-calm-meeseeks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 8px;
  color: #fca5a5;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-calm-meeseeks:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.meeseeks-status-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--portal-cyan);
  box-shadow: 0 0 10px var(--portal-cyan);
  display: inline-block;
  animation: orbPulse 2s ease-in-out infinite;
}

.meeseeks-angry .meeseeks-status-orb {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: orbRage 0.25s infinite alternate;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.8; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes orbRage {
  from { transform: scale(0.9); }
  to { transform: scale(1.2); }
}

.meeseeks-display-card {
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid rgba(66, 180, 202, 0.3);
  border-radius: 18px;
  padding: 2rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.meeseeks-display-card::after {
  content: 'EXISTENCE IS PAIN';
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--font-code);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.08);
  letter-spacing: 0.2em;
}

.meeseeks-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.meeseeks-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(139, 225, 255, 0.16);
  border: 1.5px solid var(--portal-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 0 12px rgba(139, 225, 255, 0.45);
  flex-shrink: 0;
  transition: all 0.3s ease;
  overflow: hidden;
}

.meeseeks-svg-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.meeseeks-face {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #42b4ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 10px #42b4ca;
  transition: all 0.3s ease;
}

.meeseeks-name-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--portal-cyan);
  transition: color 0.3s ease;
}

.meeseeks-quote-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.meeseeks-stress-meter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.stress-bar {
  height: 100%;
  background: var(--portal-cyan);
  transition: width 0.3s ease, background 0.3s ease;
}

/* Angry Meeseeks Escalation State */
.meeseeks-display-card.meeseeks-angry {
  background: radial-gradient(circle at center, rgba(80, 16, 20, 0.95), rgba(20, 6, 8, 0.98));
  border-color: #ef4444;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.5);
  animation: meeseeksTremble 0.25s infinite alternate;
}

@keyframes meeseeksTremble {
  0% { transform: translate(-1px, -1px); }
  50% { transform: translate(2px, 1px); }
  100% { transform: translate(-1px, 2px); }
}

.meeseeks-display-card.meeseeks-angry .meeseeks-face {
  background: #ef4444;
  box-shadow: 0 0 16px #ef4444;
}

.meeseeks-display-card.meeseeks-angry .meeseeks-avatar-icon {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.85);
  animation: meeseeksIconRage 0.2s infinite alternate;
}

@keyframes meeseeksIconRage {
  from { transform: scale(0.96) rotate(-3deg); filter: hue-rotate(130deg); }
  to { transform: scale(1.08) rotate(3deg); filter: hue-rotate(150deg); }
}

.meeseeks-display-card.meeseeks-angry .meeseeks-name-tag {
  color: #f87171;
}

.meeseeks-display-card.meeseeks-angry .meeseeks-quote-text {
  color: #fef08a;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.meeseeks-display-card.meeseeks-angry .stress-bar {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

/* Catastrophic Meltdown State - Imminent Void-404 Fracture */
.meeseeks-display-card.meeseeks-meltdown {
  background: radial-gradient(circle at center, rgba(180, 10, 30, 0.98), rgba(40, 4, 8, 1)) !important;
  border-color: #ff0033 !important;
  box-shadow: 0 0 60px rgba(255, 0, 51, 0.95), inset 0 0 30px rgba(255, 0, 51, 0.6) !important;
  animation: meeseeksMeltdownVibrate 0.08s infinite !important;
}

@keyframes meeseeksMeltdownVibrate {
  0% { transform: translate(-3px, 2px) scale(1.02); filter: brightness(1.4) contrast(180%); }
  25% { transform: translate(3px, -3px) scale(1.03); filter: brightness(1.8) contrast(200%); }
  50% { transform: translate(-2px, -2px) scale(1.01); filter: brightness(1.3) contrast(190%); }
  75% { transform: translate(4px, 1px) scale(1.04); filter: brightness(2) contrast(220%); }
  100% { transform: translate(-3px, -1px) scale(1.02); filter: brightness(1.5) contrast(180%); }
}

/* Fullscreen Cataclysmic Reality Shake & Crimson Strobe */
body.meeseeks-cataclysmic-failure {
  animation: meeseeksScreenGlitchShake 0.12s infinite alternate !important;
  overflow: hidden !important;
}

@keyframes meeseeksScreenGlitchShake {
  0% { transform: translate(-4px, -2px); filter: contrast(160%) hue-rotate(-20deg); }
  33% { transform: translate(6px, 4px); filter: contrast(220%) hue-rotate(20deg); }
  66% { transform: translate(-5px, 6px); filter: contrast(180%) invert(15%); }
  100% { transform: translate(4px, -5px); filter: contrast(250%) saturate(200%); }
}

/* Fullscreen Meltdown Overlay with Glitch Scanlines & HUD Warning */
.meeseeks-void-meltdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(18, 2, 6, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

.meeseeks-void-meltdown-overlay.active {
  opacity: 1;
}

.meltdown-strobe {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 0, 50, 0.45) 0%, rgba(255, 0, 50, 0.15) 50%, rgba(10, 0, 2, 0.8) 100%);
  animation: meltdownStrobePulse 0.18s infinite alternate;
  pointer-events: none;
}

@keyframes meltdownStrobePulse {
  0% { opacity: 0.3; }
  100% { opacity: 0.9; }
}

.meltdown-crt-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 50, 0.15) 0px,
    rgba(255, 0, 50, 0.15) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
}

.meltdown-hud-card {
  position: relative;
  z-index: 10;
  max-width: 620px;
  width: 100%;
  background: rgba(15, 3, 6, 0.95);
  border: 2px solid #ff0033;
  box-shadow: 0 0 50px rgba(255, 0, 51, 0.8), inset 0 0 30px rgba(255, 0, 51, 0.35);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  animation: hudWarningPulse 0.4s infinite alternate;
}

@keyframes hudWarningPulse {
  0% { transform: scale(0.99); box-shadow: 0 0 30px rgba(255, 0, 51, 0.6); }
  100% { transform: scale(1.02); box-shadow: 0 0 70px rgba(255, 0, 51, 1); }
}

.meltdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 0, 51, 0.2);
  border: 1px solid #ff0033;
  color: #ff3366;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.meltdown-hud-title {
  color: #ffffff;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 0 25px #ff0033, -2px -2px 0 #00ffff, 2px 2px 0 #ff0033;
  font-family: 'Syne', sans-serif;
}

.meltdown-hud-desc {
  color: #fecaca;
  font-size: 0.96rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.meltdown-telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 0, 51, 0.4);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #ff4d6d;
}

.meltdown-spinner-warp {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #ff0033;
  border-top-color: #ffffff;
  margin: 18px auto 0;
  animation: spinPortal 0.4s linear infinite;
  box-shadow: 0 0 20px #ff0033;
}

/* ==========================================================================
   SANTAI & REAL TALK (Behind The Code)
   ========================================================================== */
.real-talk-section {
  margin-bottom: 4rem;
}

.real-talk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.real-talk-card {
  background: var(--void-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.real-talk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.real-talk-card:hover {
  transform: translateY(-4px);
}

.real-talk-card:hover::before {
  opacity: 1;
}

/* Specific Dimension Theming for Cards */
/* Card 1: Caffeine Nebula (C-716) */
.talk-card-coffee {
  border-color: rgba(245, 158, 11, 0.22);
  background: radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.07) 0%, var(--void-card) 65%);
}

.talk-card-coffee::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #d97706);
}

.talk-card-coffee:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 158, 11, 0.22);
}

/* Card 2: Heavy Sonic Spectrum - Metal & Rock (C-666) */
.talk-card-audio {
  border-color: rgba(239, 68, 68, 0.28);
  background: radial-gradient(circle at 15% 15%, rgba(239, 68, 68, 0.09) 0%, var(--void-card) 65%);
}

.talk-card-audio::before {
  background: linear-gradient(90deg, #ef4444, #f87171, #b91c1c);
}

.talk-card-audio:hover {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 28px rgba(239, 68, 68, 0.35);
}

/* Card 3: Quantum Sandbox (C-999) */
.talk-card-game {
  border-color: rgba(56, 189, 248, 0.22);
  background: radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.07) 0%, var(--void-card) 65%);
}

.talk-card-game::before {
  background: linear-gradient(90deg, #38bdf8, #818cf8, #06b6d4);
}

.talk-card-game:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.22);
}

/* Card Top Section (Badge + Icon) */
.talk-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.talk-dim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.dim-badge-coffee {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dim-badge-coffee .dim-pulse-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.dim-badge-audio {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.dim-badge-audio .dim-pulse-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.dim-badge-game {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.dim-badge-game .dim-pulse-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.dim-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: beaconPulse 1.6s infinite ease-in-out;
}

/* Talk Icons & Micro-Animations */
.talk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  color: var(--text-white);
  transition: all 0.25s ease;
}

.talk-icon-coffee {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.talk-icon-audio {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.talk-icon-game {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

/* Coffee Steam Micro-Animation */
.coffee-steam-anim {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}

.steam-line {
  width: 2px;
  height: 10px;
  background: linear-gradient(to top, rgba(251, 191, 36, 0.75), transparent);
  border-radius: 2px;
  animation: steamFloat 2s infinite ease-in-out;
}

.steam-line.steam1 { animation-delay: 0s; height: 9px; }
.steam-line.steam2 { animation-delay: 0.5s; height: 13px; }
.steam-line.steam3 { animation-delay: 1s; height: 10px; }

@keyframes steamFloat {
  0% { transform: translateY(3px) scaleY(0.6); opacity: 0; }
  50% { opacity: 0.85; }
  100% { transform: translateY(-7px) scaleY(1.2); opacity: 0; }
}

/* Audio Live Equalizer Spectrum Micro-Animation */
.audio-spectrum-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  margin-right: 4px;
}

.eq-bar {
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(to top, #ef4444, #f59e0b);
  animation: eqBounce 1s ease-in-out infinite alternate;
}

.eq-bar.bar1 { height: 6px; animation-duration: 0.7s; }
.eq-bar.bar2 { height: 14px; animation-duration: 0.45s; }
.eq-bar.bar3 { height: 18px; animation-duration: 0.9s; }
.eq-bar.bar4 { height: 10px; animation-duration: 0.6s; }
.eq-bar.bar5 { height: 15px; animation-duration: 0.8s; }

@keyframes eqBounce {
  0% { height: 3px; transform: scaleY(0.3); }
  100% { height: 18px; transform: scaleY(1); }
}

/* Typography & Content */
.talk-title {
  font-family: var(--font-sci-fi);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.talk-desc {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* Talk Card Footer (Telemetry + Tags) */
.talk-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.talk-stat-pill {
  font-family: var(--font-code);
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.talk-stat-metal {
  color: #fca5a5;
  font-weight: 800;
}

.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.talk-tag {
  font-family: var(--font-code);
  font-size: 0.67rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
}

.talk-tag.tag-metal {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  font-weight: 700;
}

.talk-tag.tag-rock {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

/* ==========================================================================
   FOOTER & RETURN PORTAL
   ========================================================================== */
.rm-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0;
  text-align: center;
  position: relative;
}

.footer-portal-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 2.2rem;
  background: radial-gradient(circle at center, var(--portal-bright) 0%, var(--portal-green) 50%, var(--portal-subtle) 100%);
  color: #07080c;
  font-family: var(--font-sci-fi);
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 0 25px var(--portal-glow);
  transition: all 0.3s var(--ease-smooth);
  margin-bottom: 2rem;
}

.footer-portal-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px var(--portal-bright);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-social-link {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-social-link:hover {
  color: var(--portal-green);
}

.footer-copyright {
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CITADEL UTILITY DOCK (FLOATING BOTTOM RIGHT HUD)
   Audio SFX Toggle + Reality Recall + The Butter Robot
   ========================================================================== */
.citadel-hud-dock {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.hud-capsule {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem;
  background: rgba(12, 17, 28, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(151, 206, 76, 0.35);
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(151, 206, 76, 0.15);
  transition: all 0.25s ease;
  margin-bottom: 2px;
}

.hud-capsule:hover {
  border-color: rgba(151, 206, 76, 0.6);
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.85), 0 0 28px rgba(151, 206, 76, 0.25);
}

.hud-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
  flex-shrink: 0;
}

/* Coordinate Matrix in Floating HUD */
.hud-matrix-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.matrix-hud-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.5rem;
  border-radius: 9999px;
  background: rgba(151, 206, 76, 0.12);
  border: 1px solid rgba(151, 206, 76, 0.32);
  color: var(--portal-green);
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  user-select: none;
}

.matrix-hud-svg {
  flex-shrink: 0;
  animation: matrixHudSpin 12s linear infinite;
}

@keyframes matrixHudSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.matrix-hud-buttons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.matrix-hud-buttons .btn-dimension {
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: none;
}

.matrix-hud-buttons .btn-dimension:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.matrix-hud-buttons .btn-dimension:active {
  transform: translateY(1px);
}

/* Active Dimension Styles */
.matrix-hud-buttons .btn-dimension.active[data-dim="c137"] {
  background: rgba(151, 206, 76, 0.22);
  border-color: var(--portal-green);
  color: #97ce4c;
  box-shadow: 0 0 10px rgba(151, 206, 76, 0.4);
}

.matrix-hud-buttons .btn-dimension.active[data-dim="cronenberg"] {
  background: rgba(234, 88, 12, 0.22);
  border-color: #ea580c;
  color: #fb923c;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.4);
}

.matrix-hud-buttons .btn-dimension.active[data-dim="purge"] {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.matrix-hud-buttons .btn-dimension.active[data-dim="citadel"] {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.butter-robot-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.butter-balloon {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  max-width: 250px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px var(--portal-subtle);
  transform-origin: bottom right;
  transition: all 0.3s var(--ease-elastic);
  position: relative;
}

.butter-balloon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 25px;
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--portal-border);
  border-bottom: 1px solid var(--portal-border);
  transform: rotate(45deg);
}

.butter-quote {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
  padding-right: 14px;
}

.butter-close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.butter-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
}

.butter-balloon.dismissed {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.8) !important;
}

.butter-tip-click {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--portal-green);
  display: block;
  margin-top: 4px;
}

.butter-robot-btn {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(10px);
  border: 2px solid #475569;
  border-radius: 18px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.25s var(--ease-elastic);
  outline: none;
}

.butter-robot-btn:hover {
  transform: translateY(-3px) scale(1.06);
  border-color: var(--portal-green);
  box-shadow: 0 10px 25px var(--portal-glow);
}

.robot-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 44px;
}

.robot-head {
  width: 26px;
  height: 18px;
  background: #64748b;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #94a3b8;
}

.robot-eye {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  transition: transform 0.1s ease;
}

.robot-chest {
  width: 38px;
  height: 22px;
  background: #475569;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #64748b;
}

.butter-cube-block {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #fef08a 0%, #eab308 60%, #ca8a04 100%);
  border: 1px solid #fde047;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.robot-treads {
  display: flex;
  gap: 18px;
}

.tread-l, .tread-r {
  width: 8px;
  height: 10px;
  background: #1e293b;
  border-radius: 3px;
  border: 1px solid #334155;
}

/* --- Sleek Single-Click Robot Cycle Switch Pill --- */
.robot-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(12, 17, 28, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(151, 206, 76, 0.4);
  border-radius: 9999px;
  padding: 4px 11px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(151, 206, 76, 0.12);
  cursor: pointer;
  outline: none;
  transition: all 0.25s var(--ease-elastic);
  user-select: none;
  margin-bottom: -2px;
}

.robot-switch-btn:hover {
  border-color: rgba(151, 206, 76, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75), 0 0 18px rgba(151, 206, 76, 0.25);
  transform: translateY(-1px);
}

.robot-switch-btn:active {
  transform: translateY(1px) scale(0.97);
}

.switch-cycle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--portal-green);
  transition: transform 0.35s ease;
}

.robot-switch-btn:hover .switch-cycle-icon {
  transform: rotate(180deg);
}

.switch-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.switch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.switch-dot.butter {
  background: #facc15;
  box-shadow: 0 0 8px #facc15;
}

.switch-dot.morty {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.switch-dot.rick {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.switch-name {
  font-family: var(--font-code);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #f8fafc;
  line-height: 1;
}

.switch-steps {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-left: 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 2px;
}

.step-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.step-dot.active {
  background: var(--portal-green);
  transform: scale(1.3);
  box-shadow: 0 0 6px var(--portal-green);
}

/* --- Robot Variants & Transition --- */
.robot-variant {
  transition: opacity 0.2s ease, transform 0.2s var(--ease-elastic);
}

.robot-variant.switching-out {
  opacity: 0;
  transform: scale(0.85);
}

.robot-variant.switching-in {
  opacity: 1;
  transform: scale(1);
}

/* --- Robot Morty (Morty-bot) Styling --- */
.morty-bot-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  gap: 1px;
  position: relative;
}

.morty-antenna {
  width: 2px;
  height: 6px;
  background: #64748b;
  position: relative;
  margin-bottom: -1px;
  z-index: 4;
}

.morty-antenna-tip {
  position: absolute;
  top: -4px;
  left: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: mortyAntennaPulse 1.4s infinite alternate ease-in-out;
}

@keyframes mortyAntennaPulse {
  0% { transform: scale(0.85); box-shadow: 0 0 4px #0284c7; }
  100% { transform: scale(1.15); box-shadow: 0 0 10px #38bdf8, 0 0 16px #38bdf8; }
}

.morty-head {
  width: 32px;
  height: 29px;
  background: #fed7aa;
  border-radius: 16px 16px 14px 14px;
  position: relative;
  border: 1.5px solid #ea580c;
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
  overflow: visible;
}

.morty-hair {
  position: absolute;
  top: -3px;
  left: -2px;
  right: -2px;
  height: 14px;
  background: #78350f;
  border-radius: 16px 16px 4px 4px;
  border: 1px solid #451a03;
  z-index: 1;
}

.morty-face {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.morty-brows {
  display: flex;
  justify-content: space-between;
  width: 20px;
  margin-bottom: 1px;
}

.morty-brow {
  width: 6px;
  height: 1.5px;
  background: #451a03;
  border-radius: 1px;
}

.morty-brow.left {
  transform: rotate(18deg);
}

.morty-brow.right {
  transform: rotate(-18deg);
}

.morty-eyes {
  display: flex;
  gap: 3px;
  align-items: center;
}

.morty-eye-left {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.morty-pupil-left {
  width: 2.5px;
  height: 2.5px;
  background: #0f172a;
  border-radius: 50%;
}

.morty-eye-cyber {
  width: 8px;
  height: 8px;
  background: #0f172a;
  border-radius: 50%;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cyber-reticle {
  position: absolute;
  inset: 1px;
  border: 0.5px dashed rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  pointer-events: none;
}

.cyber-lens {
  width: 3.5px;
  height: 3.5px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 6px #ffffff;
  transition: transform 0.1s ease;
}

.morty-mouth-nervous {
  width: 8px;
  height: 3px;
  border-bottom: 1.5px solid #9a3412;
  border-radius: 50%;
  margin-top: 1px;
}

.morty-cyber-plate {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 6px;
  height: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cyber-screw {
  width: 2px;
  height: 2px;
  background: #94a3b8;
  border-radius: 50%;
}

.morty-chest {
  width: 38px;
  height: 18px;
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  border-radius: 3px 3px 7px 7px;
  border: 1px solid #ca8a04;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  margin-top: -1px;
  z-index: 1;
}

.morty-shirt-collar {
  width: 14px;
  height: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  position: absolute;
  top: 0;
}

.morty-power-core {
  width: 12px;
  height: 7px;
  background: #09131d;
  border: 1px solid #38bdf8;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.core-pulsar {
  width: 4px;
  height: 4px;
  background: #38bdf8;
  border-radius: 1px;
  box-shadow: 0 0 4px #ffffff;
  animation: mortyCorePulse 1.2s infinite alternate ease-in-out;
}

@keyframes mortyCorePulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 8px #38bdf8; }
}

/* --- Robot Rick (Rick-bot C-137) Styling --- */
.rick-bot-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  position: relative;
}

/* Rick Spiky Blue Hair */
.rick-spikes-group {
  position: absolute;
  top: -8px;
  left: -4px;
  right: -4px;
  height: 24px;
  pointer-events: none;
  z-index: 1;
}

.rick-spikes-group .spike {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 20px solid #93c5fd;
  filter: drop-shadow(0 0 1px #38bdf8);
}

.spike-1 { top: 2px; left: 1px; transform: rotate(-50deg); }
.spike-2 { top: -2px; left: 8px; transform: rotate(-25deg); }
.spike-3 { top: -3px; left: 16px; transform: rotate(0deg); }
.spike-4 { top: -3px; left: 24px; transform: rotate(10deg); }
.spike-5 { top: -2px; right: 12px; transform: rotate(28deg); }
.spike-6 { top: 2px; right: 5px; transform: rotate(52deg); }
.spike-7 { top: 8px; right: 0px; transform: rotate(65deg); }

.rick-head {
  width: 31px;
  height: 29px;
  background: #f1f5f9;
  border-radius: 13px 13px 15px 15px;
  position: relative;
  border: 1.5px solid #64748b;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 2;
  margin-top: 2px;
}

.rick-face {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

/* Rick's Unibrow */
.rick-unibrow {
  width: 21px;
  height: 2.5px;
  background: #7dd3fc;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(125, 211, 252, 0.6);
  margin-bottom: 2px;
}

.rick-eyes {
  display: flex;
  gap: 3px;
  align-items: center;
}

.rick-eye-left {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.rick-eye-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #cbd5e1;
  border-bottom: 0.8px solid #64748b;
}

.rick-pupil-left {
  width: 2.5px;
  height: 2.5px;
  background: #0f172a;
  border-radius: 50%;
}

.rick-eye-cyber {
  width: 8px;
  height: 8px;
  background: #052e16;
  border-radius: 50%;
  border: 1.5px solid #22c55e;
  box-shadow: 0 0 7px #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portal-scanner-ring {
  position: absolute;
  inset: 1px;
  border: 0.5px dashed rgba(74, 222, 128, 0.6);
  border-radius: 50%;
  pointer-events: none;
}

.portal-scanner-lens {
  width: 3.5px;
  height: 3.5px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #ffffff;
  transition: transform 0.1s ease;
}

.rick-mouth-cynical {
  width: 10px;
  height: 2px;
  background: #475569;
  border-radius: 1px;
  margin-top: 3px;
  position: relative;
}

.rick-drool-drop {
  position: absolute;
  top: 2px;
  right: -1px;
  width: 3px;
  height: 4px;
  background: #4ade80;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 5px rgba(74, 222, 128, 0.8);
}

.rick-temple-plate {
  position: absolute;
  left: 1px;
  top: 6px;
  width: 4px;
  height: 8px;
  background: #334155;
  border: 1px solid #22c55e;
  border-radius: 1px;
}

.temple-circuit {
  width: 2px;
  height: 2px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 4px #22c55e;
}

/* Rick Lab Coat & Undershirt */
.rick-coat-body {
  width: 38px;
  height: 19px;
  background: #ffffff;
  border-radius: 3px 3px 7px 7px;
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  position: relative;
  margin-top: -1px;
  z-index: 1;
}

.rick-undershirt {
  position: absolute;
  top: 0;
  width: 12px;
  height: 10px;
  background: #0284c7;
  border-radius: 0 0 3px 3px;
}

.rick-coat-lapels {
  position: absolute;
  inset: 0;
  border-left: 2px solid #e2e8f0;
  border-right: 2px solid #e2e8f0;
  pointer-events: none;
}

.rick-microverse-battery {
  position: relative;
  z-index: 2;
  width: 12px;
  height: 7px;
  background: #052e16;
  border: 1px solid #22c55e;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.6);
  margin-top: 3px;
}

.battery-glow-core {
  width: 4px;
  height: 4px;
  background: #4ade80;
  border-radius: 1px;
  box-shadow: 0 0 5px #ffffff;
  animation: rickBatteryPulse 1.1s infinite alternate ease-in-out;
}

@keyframes rickBatteryPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 9px #22c55e, 0 0 14px #4ade80; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (iPad / Tablets 768px-1024px & Mobile < 768px / < 480px)
   ========================================================================== */

/* --- Tablet / iPad Landscape & Portrait (<= 1024px) --- */
@media (max-width: 1024px) {
  .citadel-card {
    padding: 2rem 1.8rem;
  }

  .citadel-body-grid,
  .wanted-body-grid {
    grid-template-columns: 240px 1fr;
    gap: 2rem;
  }

  .avatar-portal-wrapper,
  .wanted-mugshot-wrapper {
    max-width: 240px;
  }

  .bio-stats-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .wanted-crimes-list li {
    font-size: 0.9rem;
  }

  .tv-housing {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .tv-control-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.2rem;
  }

  .tv-rotary-wrapper {
    margin: 0;
  }

  .tv-channel-select-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .tv-speaker-grille {
    display: none;
  }

  .meeseeks-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.2rem;
  }

  .arsenal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .real-talk-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* --- Mobile & Tablet Portrait Breakpoint (<= 900px) --- */
@media (max-width: 900px) {
  /* Sci-Fi Hamburger Toggle activates */
  .rm-nav-toggle {
    display: flex;
  }

  .rm-nav-inner {
    position: relative;
    padding: 0.65rem 1.1rem;
  }

  /* Collapsible Navigation Drawer */
  .rm-nav-links {
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    background: rgba(12, 16, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    padding: 0;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px var(--portal-subtle);
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, padding 0.3s ease;
    z-index: 200;
  }

  .rm-nav-links.open {
    max-height: 540px;
    opacity: 1;
    pointer-events: auto;
    padding: 1.1rem;
    overflow-y: auto;
  }

  .nav-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.55rem;
    gap: 0.35rem;
  }

  .nav-group .rm-nav-link {
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-weight: 700;
    color: #ffffff;
  }

  .nav-chevron {
    display: none;
  }

  .nav-flyout {
    position: static;
    transform: none;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.15rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .nav-flyout::before {
    display: none;
  }

  .nav-flyout-header {
    display: none;
  }

  .nav-flyout-item {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.28);
  }

  .nav-flyout-item:hover,
  .nav-flyout-item.active {
    background: rgba(151, 206, 76, 0.15);
    color: #ffffff;
  }

  .rm-nav-link {
    justify-content: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
  }

  .rm-nav-link.active {
    background: var(--portal-subtle);
  }

  .citadel-body-grid,
  .wanted-body-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .avatar-portal-wrapper,
  .wanted-mugshot-wrapper {
    margin: 0 auto;
    max-width: 250px;
  }

  .wanted-stamp {
    font-size: 0.72rem;
    padding: 2px 7px;
    top: 10px;
    right: 10px;
    bottom: auto;
  }

  .citadel-bio,
  .wanted-dossier {
    text-align: left;
  }

  .bio-stats-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .meeseeks-control {
    align-items: center;
    text-align: center;
  }

  .meeseeks-actions-group {
    justify-content: center;
  }

  .arsenal-grid {
    grid-template-columns: 1fr;
  }

  .channel-highlights-list {
    grid-template-columns: 1fr;
  }

  .real-talk-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Smartphones (<= 640px) --- */
@media (max-width: 640px) {
  .rm-container {
    padding: 0 1rem;
  }

  .rm-navbar {
    top: 0.6rem;
    margin-bottom: 2rem;
  }

  .rm-nav-inner {
    padding: 0.55rem 0.9rem;
    border-radius: 9999px;
  }

  .rm-brand .rm-logo-dim {
    display: none;
  }

  .rm-brand .rm-logo-text {
    font-size: 1.05rem;
  }

  .btn-audio-toggle {
    padding: 0.35rem 0.6rem;
    font-size: 0.68rem;
  }

  .btn-audio-toggle #audioToggleLabel {
    display: none;
  }

  .btn-back-reality {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    gap: 5px;
  }

  .citadel-hud-dock {
    bottom: 0.85rem;
    right: 0.85rem;
    left: auto;
    max-width: calc(100vw - 1.7rem);
    gap: 0.4rem;
  }

  .hud-capsule {
    padding: 0.22rem 0.38rem;
    gap: 0.25rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hud-capsule::-webkit-scrollbar {
    display: none;
  }

  .matrix-hud-indicator .matrix-hud-text {
    display: none;
  }

  .matrix-hud-indicator {
    padding: 0.2rem 0.35rem;
  }

  .matrix-hud-buttons .btn-dimension {
    padding: 0.25rem 0.42rem;
    font-size: 0.64rem;
  }

  .rm-nav-links.open {
    grid-template-columns: 1fr;
    max-height: 480px;
  }

  .citadel-card {
    padding: 1.25rem 1rem;
    border-radius: 20px;
  }

  .citadel-header-badge,
  .wanted-header-badge {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
  }

  .citadel-meta-left,
  .wanted-meta-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .citadel-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .citadel-threat-badge {
    font-size: 0.64rem;
    padding: 3px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 175px;
  }

  .btn-citadel-toggle {
    padding: 6px 10px;
    font-size: 0.68rem;
    flex-shrink: 0;
  }

  .bio-name {
    font-size: clamp(1.8rem, 6.5vw, 2.2rem) !important;
  }

  .bio-role {
    font-size: 0.92rem !important;
    word-break: normal;
  }

  .bio-quote-box {
    font-size: 0.88rem !important;
    padding: 0.75rem 0.9rem !important;
  }

  .bio-desc {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .bio-stats-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .bio-stat-item {
    padding: 0.6rem 0.4rem;
    text-align: center;
  }

  .bio-stat-label {
    font-size: 0.6rem;
  }

  .bio-stat-value {
    font-size: 0.92rem;
  }

  .wanted-alias {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }

  .wanted-stamp {
    font-size: 0.72rem;
    padding: 2px 7px;
    top: 10px;
    right: 10px;
    bottom: auto;
  }

  .wanted-crimes-list li {
    font-size: 0.86rem;
    padding-left: 1.2rem;
  }

  .wanted-warning-alert {
    font-size: 0.82rem;
    padding: 0.75rem 0.85rem;
  }

  .shifter-box {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .shifter-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
  }

  .btn-dimension {
    justify-content: center;
    padding: 8px 10px;
  }

  .arsenal-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .arsenal-card {
    padding: 1.25rem 1.1rem;
    border-radius: 16px;
  }

  .tv-housing {
    padding: 0.9rem;
    border-radius: 20px;
    border-width: 2px;
    gap: 1rem;
  }

  .tv-screen-wrapper {
    min-height: auto;
    border-radius: 14px;
    border-width: 2px;
  }

  .crt-glass {
    padding: 1rem;
  }

  .channel-broadcast-title {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .channel-broadcast-desc {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .channel-tag-line {
    font-size: 0.65rem;
  }

  .btn-channel-inspect {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
  }

  .tv-control-panel {
    padding: 1rem;
    gap: 1rem;
    display: flex;
    flex-direction: column;
  }

  .tv-channel-select-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .meeseeks-container {
    padding: 1.4rem 1.1rem;
    border-radius: 18px;
    gap: 1.5rem;
  }

  .meeseeks-title {
    font-size: 1.6rem;
  }

  .meeseeks-desc {
    font-size: 0.88rem;
  }

  .btn-meeseeks-dome {
    width: 100%;
    justify-content: center;
  }

  .btn-calm-meeseeks {
    width: 100%;
    justify-content: center;
  }

  .meeseeks-display-card {
    padding: 1.25rem 1rem;
    min-height: 170px;
  }

  .meeseeks-quote-text {
    font-size: 1.05rem;
  }

  .real-talk-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .real-talk-card {
    padding: 1.25rem 1.1rem;
    border-radius: 16px;
  }

  .footer-portal-button {
    padding: 0.75rem 1.4rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
    max-width: 340px;
  }

  .footer-socials {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .footer-social-link {
    word-break: break-all;
    font-size: 0.82rem;
  }

  .rm-copyright {
    font-size: 0.72rem;
    line-height: 1.6;
    word-break: break-word;
    padding: 0 0.5rem;
  }

  .butter-robot-widget {
    bottom: 0.75rem;
    right: 0.75rem;
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .butter-balloon {
    max-width: 220px;
  }
}

/* --- Small Phones (<= 400px) --- */
@media (max-width: 400px) {
  .citadel-threat-badge {
    max-width: 130px;
  }

  .rm-brand .rm-logo-text {
    font-size: 0.98rem;
  }

  .btn-back-reality span {
    display: none;
  }

  .btn-back-reality {
    padding: 0.35rem 0.55rem;
  }

  .matrix-hud-buttons .btn-dimension {
    padding: 0.22rem 0.32rem;
    font-size: 0.6rem;
  }

  .bio-stats-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .bio-stat-item {
    padding: 0.5rem 0.25rem;
  }

  .bio-stat-value {
    font-size: 0.85rem;
  }
}


/* ==========================================================================
   MICROVERSE BATTERY — TESTIMONIALS SECTION
   Power Core, Battery Cells, Witness Cards, Energy Bars
   ========================================================================== */

/* ── Section Container ── */
.microverse-section {
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(151, 206, 76, 0.07) 0%, transparent 60%),
              radial-gradient(ellipse 80% 40% at 80% 100%, rgba(66, 180, 202, 0.06) 0%, transparent 50%),
              var(--void-bg);
}

.microverse-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(151, 206, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 206, 76, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.section-sub {
  max-width: 680px;
  margin: 0.6rem auto 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
  font-family: var(--font-body);
}

/* ── Power Core Plant Header ── */
.microverse-plant-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin: 3rem auto 3.5rem;
}

.power-core-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--portal-green);
  box-shadow:
    0 0 20px var(--portal-glow),
    0 0 60px rgba(151, 206, 76, 0.2),
    inset 0 0 20px rgba(151, 206, 76, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: coreRotate 8s linear infinite;
  position: relative;
}

.power-core-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(151, 206, 76, 0.4);
  animation: coreRotate 4s linear infinite reverse;
}

@keyframes coreRotate {
  to { transform: rotate(360deg); }
}

.power-core-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: coreRotate 8s linear infinite reverse; /* counter-rotate text */
}

.power-core-label {
  font-family: var(--font-code);
  font-size: 0.5rem;
  color: var(--portal-green);
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.power-core-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--portal-green);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 12px var(--portal-glow);
}

.power-plant-pipes {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.pipe {
  display: block;
  width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--portal-green), rgba(151, 206, 76, 0.3));
  box-shadow: 0 0 6px var(--portal-glow);
  animation: pipePulse 2s ease-in-out infinite;
}
.pipe-1 { height: 32px; animation-delay: 0s; }
.pipe-2 { height: 52px; animation-delay: 0.3s; }
.pipe-3 { height: 42px; animation-delay: 0.6s; }
.pipe-4 { height: 36px; animation-delay: 0.9s; }

@keyframes pipePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; box-shadow: 0 0 14px var(--portal-glow); }
}

/* ── Microverse Filter Switcher ── */
.microverse-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 2.2rem;
  flex-wrap: wrap;
}

.battery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(151, 206, 76, 0.25);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(8px);
}

.battery-filter-btn .filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transition: all 0.25s ease;
}

.battery-filter-btn:hover {
  border-color: var(--portal-green);
  color: var(--portal-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.battery-filter-btn.active {
  background: rgba(151, 206, 76, 0.16);
  border-color: var(--portal-green);
  color: var(--portal-green);
  box-shadow: 0 0 16px var(--portal-glow);
}

.battery-filter-btn.active .filter-dot {
  opacity: 1;
  box-shadow: 0 0 8px var(--portal-green);
}

.battery-filter-btn.filter-real.active {
  background: rgba(0, 210, 255, 0.16);
  border-color: #00d2ff;
  color: #00d2ff;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.45);
}

.battery-filter-btn.filter-real.active .filter-dot {
  box-shadow: 0 0 8px #00d2ff;
}

/* ── Microverse HUD Controls & Telemetry Bar ── */
.microverse-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(151, 206, 76, 0.22);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0 15px rgba(151, 206, 76, 0.04);
  position: relative;
  z-index: 10;
}

.hud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--portal-green);
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px var(--portal-glow);
}

.hud-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portal-green);
  box-shadow: 0 0 10px var(--portal-green);
  animation: hudPulse 1.8s ease-in-out infinite alternate;
  flex-shrink: 0;
}

.hud-pulse-dot.is-paused {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: none;
}

@keyframes hudPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 16px var(--portal-green); }
}

.hud-controls-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hud-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(151, 206, 76, 0.25);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.hud-ctrl-btn:hover {
  border-color: var(--portal-green);
  color: var(--portal-green);
  box-shadow: 0 0 12px rgba(151, 206, 76, 0.35);
  transform: translateY(-1px);
}

.hud-ctrl-btn:active {
  transform: translateY(1px);
}

.hud-ctrl-btn.active {
  background: rgba(151, 206, 76, 0.15);
  border-color: var(--portal-green);
  color: var(--portal-green);
  box-shadow: 0 0 10px rgba(151, 206, 76, 0.25);
}

.hud-btn-reverse.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: #00d2ff;
  color: #00d2ff;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.hud-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-dim);
  opacity: 0.85;
}

/* ── Horizontal Marquee Viewport ── */
.microverse-marquee-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1.5rem 0 2rem;
  margin: 0 0 1.5rem;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.microverse-marquee-viewport:active,
.microverse-marquee-viewport.is-dragging {
  cursor: grabbing;
}

.microverse-marquee-viewport.is-dragging .battery-cell {
  pointer-events: none;
}

.microverse-marquee-viewport:focus-visible {
  outline: 2px solid var(--portal-green);
  outline-offset: 4px;
}

/* ── Battery Track (Continuous Infinite Drift) ── */
.microverse-battery-track {
  --microverse-gap: 1.75rem;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: var(--microverse-gap) !important;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}

/* ── Individual Battery Cell ── */
.battery-cell {
  --cell-accent: var(--portal-green);
  --cell-glow: var(--portal-glow);

  width: clamp(340px, 34vw, 480px);
  min-width: clamp(340px, 34vw, 480px);
  max-width: clamp(340px, 34vw, 480px);
  flex: 0 0 clamp(340px, 34vw, 480px);

  background: linear-gradient(145deg, rgba(15, 20, 32, 0.95) 0%, rgba(10, 14, 24, 0.9) 100%);
  border: 1px solid rgba(151, 206, 76, 0.2);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s, opacity 0.35s ease;
  position: relative;
  user-select: text;
}

.battery-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cell-accent), transparent);
  opacity: 0.7;
}

.battery-cell:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px var(--cell-glow);
  border-color: var(--cell-accent);
}

/* Per-character color accent variants */
.cell-morty {
  --cell-accent: #FCD34D;
  --cell-glow: rgba(252, 211, 77, 0.35);
  border-color: rgba(252, 211, 77, 0.2);
}
.cell-morty::before { background: linear-gradient(90deg, transparent, #FCD34D, transparent); }

.cell-meeseeks {
  --cell-accent: #8BE1FF;
  --cell-glow: rgba(139, 225, 255, 0.35);
  border-color: rgba(139, 225, 255, 0.2);
}
.cell-meeseeks::before { background: linear-gradient(90deg, transparent, #8BE1FF, transparent); }

.cell-evil {
  --cell-accent: #ef4444;
  --cell-glow: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.2);
}
.cell-evil::before { background: linear-gradient(90deg, transparent, #ef4444, transparent); }

/* Real LinkedIn Testimonial Variants */
.cell-linkedin {
  --cell-accent: #00d2ff;
  --cell-glow: rgba(0, 210, 255, 0.4);
  border-color: rgba(0, 210, 255, 0.25);
}

.cell-lutfi {
  --cell-accent: #38bdf8;
  --cell-glow: rgba(56, 189, 248, 0.4);
  border-color: rgba(56, 189, 248, 0.28);
}
.cell-lutfi::before {
  background: linear-gradient(90deg, transparent, #38bdf8, #0077b5, transparent);
}

.cell-nabil {
  --cell-accent: #34d399;
  --cell-glow: rgba(52, 211, 153, 0.4);
  border-color: rgba(52, 211, 153, 0.28);
}
.cell-nabil::before {
  background: linear-gradient(90deg, transparent, #34d399, #0284c7, transparent);
}

/* ── Cell Top Terminal (charge header) ── */
.cell-top-terminal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.cell-id-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell-id {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--cell-accent);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.cell-type {
  font-family: var(--font-code);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cell-type-verified {
  color: var(--cell-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  text-shadow: 0 0 8px var(--cell-glow);
}

.verified-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.cell-charge-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.charge-label {
  font-family: var(--font-code);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.charge-track {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.charge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cell-accent), rgba(255, 255, 255, 0.6));
  border-radius: 3px;
  box-shadow: 0 0 8px var(--cell-glow);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.charge-pct {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--cell-accent);
  font-weight: 700;
}

/* ── Cell Body: Avatar + Witness Info ── */
.cell-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.2rem 0.6rem;
}

.cell-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(151, 206, 76, 0.08);
  border: 2px solid rgba(151, 206, 76, 0.25);
  overflow: hidden;
  padding: 4px;
  box-shadow: 0 0 12px var(--cell-glow);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.battery-cell:hover .cell-avatar {
  box-shadow: 0 0 22px var(--cell-glow);
  border-color: var(--cell-accent);
}

.cell-avatar-morty {
  background: rgba(252, 211, 77, 0.08);
  border-color: rgba(252, 211, 77, 0.25);
}
.cell-avatar-meeseeks {
  background: rgba(139, 225, 255, 0.08);
  border-color: rgba(139, 225, 255, 0.25);
}
.cell-avatar-evil {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
.cell-avatar-linkedin {
  background: rgba(0, 180, 216, 0.1);
  border-color: rgba(0, 180, 216, 0.35);
}

.cell-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.cell-witness-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.witness-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.witness-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
}

.cell-linkedin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10, 102, 194, 0.2);
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #7dd3fc;
  text-decoration: none;
  transition: all 0.22s ease;
}

.cell-linkedin-badge:hover {
  background: #0077b5;
  color: #ffffff;
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.55);
  transform: translateY(-1px);
}

.cell-linkedin-badge svg {
  width: 11px;
  height: 11px;
}

.witness-role {
  font-family: var(--font-code);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.witness-relation {
  font-family: var(--font-code);
  font-size: 0.58rem;
  color: var(--cell-accent);
  opacity: 0.9;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.witness-stars {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}

.star {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
}
.star.filled { color: var(--cell-accent); text-shadow: 0 0 6px var(--cell-glow); }
.star.half {
  color: transparent;
  background: linear-gradient(90deg, var(--cell-accent) 50%, rgba(255,255,255,0.15) 50%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ── Quote Zone ── */
.cell-quote-zone {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.cell-quote-mark {
  font-family: Georgia, serif;
  font-size: 3.5rem;
  color: var(--cell-accent);
  opacity: 0.2;
  line-height: 0;
  vertical-align: -0.5rem;
  margin-right: 4px;
  display: inline-block;
}

.cell-quote {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #c8d6e5;
  font-style: italic;
  margin: 0 0 0.75rem;
  border: none;
  padding: 0;
}

.cell-quote em {
  color: var(--cell-accent);
  font-style: normal;
  font-weight: 600;
}

.cell-quote-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.q-tag {
  font-family: var(--font-code);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--cell-accent);
  color: var(--cell-accent);
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.battery-cell:hover .q-tag { opacity: 1; }

/* ── Cell Bottom Energy Bar ── */
.cell-energy-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  flex-shrink: 0;
}

.energy-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cell-accent) 0%, rgba(255, 255, 255, 0.5) 100%);
  box-shadow: 0 0 10px var(--cell-glow);
  animation: energyFlow 3s ease-in-out infinite alternate;
}

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

.cell-energy-morty .energy-fill { background: linear-gradient(90deg, #FCD34D, #fef3c7); }
.cell-energy-meeseeks .energy-fill { background: linear-gradient(90deg, #8BE1FF, #e0f9ff); }
.cell-energy-evil .energy-fill { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.cell-energy-lutfi .energy-fill { background: linear-gradient(90deg, #38bdf8, #bae6fd); }
.cell-energy-nabil .energy-fill { background: linear-gradient(90deg, #34d399, #a7f3d0); }

/* ── CTA Submit Block ── */
.microverse-submit-cta {
  max-width: 1200px;
  margin: 2.5rem auto 0;
}

.submit-cta-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: linear-gradient(135deg, rgba(151, 206, 76, 0.06) 0%, rgba(66, 180, 202, 0.04) 100%);
  border: 1px dashed rgba(151, 206, 76, 0.3);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
}

.submit-cta-icon {
  color: var(--portal-green);
  opacity: 0.7;
  flex-shrink: 0;
  animation: coreRotate 12s linear infinite;
}

.submit-cta-text {
  flex: 1;
  min-width: 220px;
}

.submit-cta-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.submit-cta-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

.submit-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--portal-green);
  border-radius: 8px;
  background: rgba(151, 206, 76, 0.1);
  color: var(--portal-green);
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
  flex-shrink: 0;
}

.submit-cta-btn:hover {
  background: rgba(151, 206, 76, 0.2);
  box-shadow: 0 0 18px var(--portal-glow);
  transform: translateY(-2px);
}

/* ── Responsive: Tablet ── */
@media (max-width: 1024px) {
  .microverse-battery-track {
    --microverse-gap: 1.25rem;
  }
}

@media (max-width: 900px) {
  .microverse-section {
    padding: 4.5rem 1.5rem;
  }

  .microverse-battery-track .battery-cell {
    width: clamp(310px, 70vw, 420px);
    min-width: clamp(310px, 70vw, 420px);
    max-width: clamp(310px, 70vw, 420px);
    flex: 0 0 clamp(310px, 70vw, 420px);
  }

  .microverse-hud-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .submit-cta-inner {
    gap: 1rem;
    padding: 1.2rem 1.4rem;
  }
}

@media (max-width: 640px) {
  .microverse-section {
    padding: 3.5rem 1rem;
  }

  .power-core-ring {
    width: 76px;
    height: 76px;
  }

  .power-core-value {
    font-size: 1.2rem;
  }

  .microverse-hud-bar {
    padding: 0.75rem 1rem;
  }

  .hud-controls-group {
    width: 100%;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .hud-ctrl-btn {
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .microverse-battery-track .battery-cell {
    width: clamp(285px, 86vw, 360px);
    min-width: clamp(285px, 86vw, 360px);
    max-width: clamp(285px, 86vw, 360px);
    flex: 0 0 clamp(285px, 86vw, 360px);
  }

  .cell-top-terminal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .charge-track {
    width: 120px;
  }

  .cell-body {
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem;
  }

  .cell-avatar {
    width: 56px;
    height: 56px;
  }

  .witness-name {
    font-size: 0.9rem;
  }

  .cell-quote-zone {
    padding: 0.85rem 1rem;
  }

  .cell-quote {
    font-size: 0.82rem;
  }

  .submit-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.2rem;
  }

  .submit-cta-icon {
    display: none;
  }

  .submit-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .microverse-battery-track {
    --microverse-gap: 1rem;
  }

  .cell-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .cell-avatar {
    width: 50px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .microverse-battery-track {
    animation: none !important;
  }

  .microverse-marquee-viewport {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
    -webkit-overflow-scrolling: touch;
  }

  .hud-pulse-dot {
    animation: none !important;
  }
}

/* ==========================================================================
   CITADEL SUBSPACE TERMINAL (CONTACT CLI SECTION)
   Rick and Morty Hacker/Terminal Aesthetic with CRT Scanlines & E2EE CLI
   ========================================================================== */
.citadel-terminal-section {
  padding: 5rem 0 3.5rem;
  position: relative;
  z-index: 10;
}

.terminal-section-header {
  text-align: center;
  margin-bottom: 2.8rem;
  position: relative;
}

.citadel-terminal-desc {
  max-width: 680px;
  margin: 0.9rem auto 0;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* Terminal Window Frame */
.terminal-window {
  background: rgba(8, 12, 20, 0.96);
  border: 1px solid rgba(151, 206, 76, 0.38);
  border-radius: 16px;
  box-shadow: 
    0 25px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(151, 206, 76, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  backdrop-filter: blur(20px);
  position: relative;
  margin-bottom: 2.2rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.terminal-window:hover {
  border-color: rgba(151, 206, 76, 0.55);
  box-shadow: 
    0 25px 75px -10px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(151, 206, 76, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Terminal Top Chrome Bar */
.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  background: rgba(14, 20, 32, 0.98);
  border-bottom: 1px solid rgba(151, 206, 76, 0.22);
  gap: 1rem;
}

.terminal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-ctrl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.t-ctrl-dot:hover {
  transform: scale(1.2);
}

.dot-red {
  background: #ff5555;
  box-shadow: 0 0 8px rgba(255, 85, 85, 0.65);
}

.dot-yellow {
  background: #f1fa8c;
  box-shadow: 0 0 8px rgba(241, 250, 140, 0.65);
}

.dot-green {
  background: #97ce4c;
  box-shadow: 0 0 10px rgba(151, 206, 76, 0.85);
}

.terminal-shell-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: #94a3b8;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-title-icon {
  color: #97ce4c;
  flex-shrink: 0;
}

.terminal-status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(151, 206, 76, 0.1);
  border: 1px solid rgba(151, 206, 76, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: #97ce4c;
  letter-spacing: 0.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.t-beacon-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #97ce4c;
  box-shadow: 0 0 8px #97ce4c;
  animation: beaconPulse 1.8s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Metadata Bar */
.terminal-meta-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.55rem 1.4rem;
  background: rgba(6, 9, 15, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-code);
  font-size: 0.74rem;
  gap: 0.8rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-key {
  color: #64748b;
  font-weight: 600;
}

.meta-val {
  color: #cbd5e1;
}

.meta-val.highlight-green {
  color: #97ce4c;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(151, 206, 76, 0.4);
}

.meta-val.highlight-cyan {
  color: #42b4ca;
}

/* Terminal Screen Area */
.terminal-screen {
  position: relative;
  background: #06090e;
  padding: 1.8rem 2rem;
  font-family: var(--font-code);
  color: #cbd5e1;
  overflow: hidden;
}

.terminal-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.28) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 3px, 6px 100%;
  z-index: 5;
  opacity: 0.7;
}

.terminal-screen-inner {
  position: relative;
  z-index: 6;
}

/* ASCII Banner */
.terminal-ascii-art {
  font-family: var(--font-code);
  color: #97ce4c;
  font-size: clamp(0.44rem, 1.05vw, 0.76rem);
  line-height: 1.12;
  margin: 0 0 0.6rem;
  text-shadow: 0 0 10px rgba(151, 206, 76, 0.5);
  font-weight: 800;
  overflow-x: auto;
  user-select: none;
}

.terminal-system-banner {
  font-size: 0.74rem;
  color: #42b4ca;
  margin-bottom: 1.3rem;
  border-bottom: 1px dashed rgba(66, 180, 202, 0.25);
  padding-bottom: 0.6rem;
  letter-spacing: 0.5px;
}

/* Dynamic Log Output */
.terminal-log-output {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.42);
  border-left: 3px solid #97ce4c;
  border-radius: 0 8px 8px 0;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #97ce4c rgba(0, 0, 0, 0.5);
}

.t-log-entry {
  line-height: 1.5;
  word-break: break-word;
  animation: logFadeIn 0.3s ease;
}

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

.t-ts {
  color: #64748b;
  margin-right: 6px;
  font-size: 0.75rem;
}

.t-tag-init {
  color: #97ce4c;
  font-weight: 700;
}

.t-tag-auth {
  color: #ffb86c;
  font-weight: 700;
}

.t-tag-target {
  color: #42b4ca;
  font-weight: 700;
}

.t-tag-ready {
  color: #50fa7b;
  font-weight: 700;
}

.t-tag-err {
  color: #ff5555;
  font-weight: 700;
}

.t-tag-ok {
  color: #97ce4c;
  font-weight: 700;
}

.t-tag-rick {
  color: #bd93f9;
  font-weight: 700;
}

.t-bold-name {
  color: #f8fafc;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* Quick Bar */
.terminal-quick-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  padding: 0.65rem 0.9rem;
  background: rgba(14, 20, 32, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-bar-heading {
  font-size: 0.72rem;
  color: #8fa0ba;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.quick-bar-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.t-cmd-btn {
  background: rgba(22, 30, 46, 0.85);
  border: 1px solid rgba(151, 206, 76, 0.35);
  color: #97ce4c;
  font-family: var(--font-code);
  font-size: 0.78rem;
  padding: 4px 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  display: inline-flex;
  align-items: center;
}

.t-cmd-btn code {
  font-family: inherit;
  font-size: inherit;
}

.t-cmd-btn:hover {
  background: rgba(151, 206, 76, 0.2);
  border-color: #97ce4c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(151, 206, 76, 0.35);
}

.t-cmd-btn:active {
  transform: translateY(0);
}

.t-cmd-clear {
  color: #ff79c6;
  border-color: rgba(255, 121, 198, 0.35);
}

.t-cmd-clear:hover {
  background: rgba(255, 121, 198, 0.2);
  border-color: #ff79c6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 121, 198, 0.35);
}

/* CLI Form */
.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.t-form-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.t-prompt-label {
  color: #97ce4c;
  font-weight: 700;
  font-size: 0.85rem;
  user-select: none;
  flex-shrink: 0;
  text-shadow: 0 0 6px rgba(151, 206, 76, 0.3);
}

.t-prompt-usr {
  color: #97ce4c;
}

.t-field-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.t-field-flag {
  color: #42b4ca;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.t-input-cage {
  display: flex;
  align-items: center;
  flex: 1;
  background: rgba(14, 21, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.48rem 0.8rem;
  transition: all 0.25s ease;
}

.t-input-cage:focus-within {
  border-color: #97ce4c;
  box-shadow: 0 0 16px rgba(151, 206, 76, 0.28);
  background: rgba(18, 28, 44, 0.98);
}

.t-quote {
  color: #ffb86c;
  font-weight: bold;
  font-size: 0.95rem;
  user-select: none;
}

.t-cli-input {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-code);
  font-size: 0.88rem;
  width: 100%;
  padding: 0 4px;
}

.t-cli-input::placeholder {
  color: #64748b;
  font-style: italic;
  font-size: 0.82rem;
}

.t-select-cage {
  padding-right: 0.5rem;
}

.t-cli-select {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-code);
  font-size: 0.85rem;
  width: 100%;
  padding: 0 4px;
  cursor: pointer;
}

.t-cli-select option {
  background: #0d131f;
  color: #f1f5f9;
  padding: 6px;
}

/* Multiline Form Row */
.t-form-row-multiline {
  align-items: flex-start;
}

.t-form-row-multiline .t-prompt-label {
  padding-top: 0.6rem;
}

.t-field-group-area {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.t-area-cage {
  align-items: flex-start;
  width: 100%;
  padding: 0.6rem 0.8rem;
}

.t-cli-textarea {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-code);
  font-size: 0.88rem;
  width: 100%;
  padding: 0 4px;
  resize: vertical;
  min-height: 85px;
  line-height: 1.55;
}

.t-cli-textarea::placeholder {
  color: #64748b;
  font-style: italic;
  font-size: 0.82rem;
}

/* Terminal Actions */
.t-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.4rem;
  padding-top: 0.6rem;
}

.t-submit-btn {
  background: linear-gradient(135deg, #97ce4c 0%, #42b4ca 100%);
  color: #070a0f;
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.78rem 1.65rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 0 22px rgba(151, 206, 76, 0.42);
  transition: all 0.25s var(--ease-smooth);
}

.t-btn-run {
  font-weight: 900;
}

.t-btn-blink {
  animation: cursorBlink 1s infinite steps(2);
  font-weight: 900;
}

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

.t-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(151, 206, 76, 0.7);
}

.t-submit-btn:active {
  transform: translateY(0);
}

.t-action-btn {
  background: rgba(22, 30, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: var(--font-code);
  font-size: 0.82rem;
  padding: 0.74rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s var(--ease-smooth);
}

.t-action-btn:hover {
  border-color: #42b4ca;
  color: #ffffff;
  background: rgba(66, 180, 202, 0.18);
  box-shadow: 0 0 14px rgba(66, 180, 202, 0.25);
  transform: translateY(-1px);
}

.t-action-btn:active {
  transform: translateY(0);
}

.t-copy-btn:hover {
  border-color: #97ce4c;
  background: rgba(151, 206, 76, 0.15);
  box-shadow: 0 0 14px rgba(151, 206, 76, 0.25);
}

/* Terminal Bottom Status Bar */
.terminal-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.4rem;
  background: rgba(10, 15, 24, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: #64748b;
  gap: 1rem;
}

.t-bottom-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.t-kbd-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: inherit;
  color: #cbd5e1;
}

.t-bottom-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.t-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8fa0ba;
}

.t-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #97ce4c;
}

/* Direct Uplink Frequency Cards */
.terminal-direct-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.direct-freq-card {
  background: rgba(12, 17, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.4rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.direct-freq-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.freq-email::before {
  background: #97ce4c;
}

.freq-github::before {
  background: #42b4ca;
}

.freq-linkedin::before {
  background: #50fa7b;
}

.direct-freq-card:hover {
  transform: translateY(-4px);
  border-color: rgba(151, 206, 76, 0.4);
  box-shadow: 0 14px 35px -8px rgba(0, 0, 0, 0.7), 0 0 25px rgba(151, 206, 76, 0.12);
}

.freq-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.freq-badge {
  font-family: var(--font-code);
  font-size: 0.68rem;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #94a3b8;
}

.freq-ping {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: #97ce4c;
  font-weight: 700;
}

.freq-icon {
  color: #97ce4c;
  margin-top: 0.3rem;
}

.freq-github .freq-icon {
  color: #42b4ca;
}

.freq-linkedin .freq-icon {
  color: #50fa7b;
}

.freq-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.freq-val {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: #94a3b8;
  word-break: break-all;
}

.freq-action {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  color: #97ce4c;
  margin-top: 0.4rem;
  letter-spacing: 0.4px;
  transition: transform 0.2s ease;
}

.direct-freq-card:hover .freq-action {
  transform: translateX(3px);
}

/* ==========================================================================
   TERMINAL RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .terminal-meta-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .terminal-direct-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .terminal-direct-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 680px) {
  .terminal-topbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .terminal-shell-title {
    order: 3;
    width: 100%;
    font-size: 0.75rem;
  }

  .terminal-status-indicator {
    order: 2;
  }

  .terminal-meta-bar {
    grid-template-columns: 1fr;
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
  }

  .terminal-screen {
    padding: 1.2rem 1rem;
  }

  .t-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .t-prompt-label {
    font-size: 0.78rem;
  }

  .t-field-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .t-input-cage {
    width: 100%;
    box-sizing: border-box;
  }

  .t-form-actions {
    flex-direction: column;
    width: 100%;
  }

  .t-submit-btn,
  .t-action-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .terminal-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
  }

  .t-bottom-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 440px) {
  .terminal-ascii-art {
    display: none;
  }

  .quick-bar-buttons {
    gap: 0.4rem;
  }

  .t-cmd-btn {
    font-size: 0.74rem;
    padding: 3px 8px;
  }
}



/* ==========================================================================
   WAITING MODE (STANDBY)
   ========================================================================== */
.waiting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out;
  display: flex;
  overflow: hidden;
}

.waiting-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.waiting-logo {
  position: absolute;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #00ffcc;
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
  white-space: nowrap;
}

#shooterCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10001;
}

#btnDestructPlane {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10002;
  background: #ff0033;
  color: white;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid #ff99aa;
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 0 10px #ff0033;
  transition: transform 0.2s, box-shadow 0.2s;
}

#btnDestructPlane:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #ff0033;
}

/* Wubba Lubba Dub Dub Easter Egg Enhancements */
@keyframes shake-dimension {
  0% { transform: translate(4px, 2px) rotate(0deg); filter: invert(1) hue-rotate(180deg) saturate(3); }
  10% { transform: translate(-2px, -4px) rotate(-1deg); filter: invert(0) hue-rotate(90deg) saturate(1); }
  20% { transform: translate(-6px, 0px) rotate(1deg); filter: invert(1) hue-rotate(270deg) saturate(4); }
  30% { transform: translate(0px, 4px) rotate(0deg); filter: invert(0) hue-rotate(0deg) saturate(1); }
  40% { transform: translate(2px, -2px) rotate(1deg); filter: invert(1) hue-rotate(180deg) saturate(2); }
  50% { transform: translate(-2px, 4px) rotate(-1deg); filter: invert(0); }
  60% { transform: translate(-6px, 2px) rotate(0deg); filter: invert(1) hue-rotate(90deg) saturate(3); }
  70% { transform: translate(4px, 2px) rotate(-1deg); filter: invert(0); }
  80% { transform: translate(-2px, -2px) rotate(1deg); filter: invert(1) hue-rotate(270deg) saturate(5); }
  90% { transform: translate(4px, 4px) rotate(0deg); filter: invert(0); }
  100% { transform: translate(2px, -4px) rotate(-1deg); filter: invert(0); }
}

.dimension-glitch {
  animation: shake-dimension 0.2s infinite;
  overflow: hidden;
}

@keyframes glitch-text {
  0% { text-shadow: 6px 0 #ff0033, -6px 0 #00ffff; transform: translate(-50%, -50%) scale(1) skew(0deg); }
  25% { text-shadow: -6px 0 #ff0033, 6px 0 #00ffff; transform: translate(-52%, -48%) scale(1.05) skew(2deg); }
  50% { text-shadow: 6px 0 #ff0033, -6px 0 #00ffff; transform: translate(-48%, -52%) scale(1.1) skew(-2deg); }
  75% { text-shadow: -6px 0 #ff0033, 6px 0 #00ffff; transform: translate(-50%, -49%) scale(1.05) skew(1deg); }
  100% { text-shadow: 6px 0 #ff0033, -6px 0 #00ffff; transform: translate(-50%, -50%) scale(1.15) skew(0deg); }
}

.wubba-easter-egg-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  z-index: 10005;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  animation: glitch-text 0.15s infinite;
  background: rgba(10, 10, 15, 0.9);
  padding: 30px 50px;
  border: 4px solid #00ff66;
  box-shadow: 0 0 50px #00ff66, inset 0 0 30px #00ff66;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* ==========================================================================
   BRAINWAVE MASKING MATRIX (MORTY WAVES CLOAKING CHAMBER)
   Cybernetic Oscilloscope, Radar Shield & Real-Time Data Redaction (mask.js)
   ========================================================================== */

.brainwave-section {
  position: relative;
  padding: 5rem 0 4rem;
  z-index: 2;
}

.brainwave-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(340px, 1.25fr);
  gap: 1.75rem;
  margin-top: 2rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .brainwave-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Left Card: Dual Oscilloscope & Radar --- */
.brainwave-oscilloscope-card,
.brainwave-console-card {
  background: var(--void-card);
  border: 1px solid var(--portal-border);
  border-radius: 18px;
  padding: 1.6rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.brainwave-oscilloscope-card::before,
.brainwave-console-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--portal-yellow, #fbee35), var(--portal-green, #97ce4c), transparent);
  opacity: 0.6;
}

.brainwave-oscilloscope-card:hover,
.brainwave-console-card:hover {
  border-color: rgba(251, 238, 53, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(251, 238, 53, 0.12);
}

.osc-card-header,
.console-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.osc-title-group,
.console-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.osc-live-beacon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--portal-yellow, #fbee35);
  box-shadow: 0 0 10px var(--portal-yellow, #fbee35);
  animation: osc-beacon-pulse 1.6s infinite ease-in-out;
}

@keyframes osc-beacon-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 6px var(--portal-yellow, #fbee35); }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px var(--portal-yellow, #fbee35), 0 0 24px rgba(251, 238, 53, 0.6); }
}

.osc-title,
.console-title {
  font-family: var(--font-code);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-white);
  text-transform: uppercase;
  margin: 0;
}

.console-icon {
  color: var(--portal-yellow, #fbee35);
}

.osc-freq-badge {
  font-family: var(--font-code);
  font-size: 0.74rem;
  color: var(--portal-yellow, #fbee35);
  background: rgba(251, 238, 53, 0.1);
  border: 1px solid rgba(251, 238, 53, 0.28);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.04em;
}

/* Oscilloscope Screen Bezel */
.osc-screen-container {
  position: relative;
  width: 100%;
  background: #030509;
  border: 1px solid rgba(151, 206, 76, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.9), 0 8px 24px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 9;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.osc-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.45) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.65;
}

.osc-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(151, 206, 76, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 206, 76, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

#brainwaveCanvas {
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

/* Radar Warning Overlay */
.radar-hud-overlay {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.radar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.radar-status-pill.stealth {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(151, 206, 76, 0.5);
  color: #a3e635;
  box-shadow: 0 0 14px rgba(163, 230, 53, 0.25);
}

.radar-status-pill.stealth .radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a3e635;
  box-shadow: 0 0 8px #a3e635;
  animation: radar-blink 1.4s infinite;
}

.radar-status-pill.danger {
  background: rgba(30, 10, 10, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.8);
  color: #f87171;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
  animation: hazard-shake 0.4s infinite alternate ease-in-out;
}

.radar-status-pill.danger .radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: radar-blink 0.5s infinite;
}

@keyframes radar-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes hazard-shake {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

/* Oscilloscope Legend */
.osc-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-code);
  font-size: 0.73rem;
  color: var(--text-dim);
}

.legend-line {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.line-rick {
  background: #39ff14;
  box-shadow: 0 0 8px #39ff14;
}

.line-morty {
  background: #fbee35;
  box-shadow: 0 0 8px #fbee35;
}

.line-net {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* Oscilloscope Tactical Controls */
.osc-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.1rem;
}

.btn-morty-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 238, 53, 0.5);
  background: linear-gradient(135deg, rgba(251, 238, 53, 0.18), rgba(151, 206, 76, 0.22));
  color: #fef08a;
  box-shadow: 0 4px 18px rgba(251, 238, 53, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-morty-shield:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 238, 53, 0.8);
  box-shadow: 0 8px 24px rgba(251, 238, 53, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-morty-shield:active {
  transform: translateY(0);
}

.btn-morty-shield.disabled {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(239, 68, 68, 0.4);
  color: #94a3b8;
  box-shadow: none;
}

.btn-morty-shield.disabled:hover {
  border-color: rgba(239, 68, 68, 0.8);
  color: #f87171;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.shield-stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.shield-stat-unit {
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shield-stat-k {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.shield-stat-v {
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.highlight-yellow { color: #fbee35; }
.highlight-cyan { color: #38bdf8; }
.highlight-green { color: #4ade80; }

/* --- Right Card: Data Cloaking Console --- */
.mask-format-selector {
  display: inline-flex;
  background: rgba(10, 14, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.btn-fmt {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fmt:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.btn-fmt.active {
  background: rgba(251, 238, 53, 0.16);
  color: #fef08a;
  border: 1px solid rgba(251, 238, 53, 0.35);
  box-shadow: 0 0 10px rgba(251, 238, 53, 0.15);
}

/* Presets Toolbar */
.mask-presets-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(10, 14, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.preset-label {
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-preset-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-preset-chip:hover {
  color: var(--portal-yellow, #fbee35);
  border-color: rgba(251, 238, 53, 0.4);
  background: rgba(251, 238, 53, 0.08);
  transform: translateY(-1px);
}

/* Editor Split Layout */
.mask-editor-split {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mask-pane {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.2rem;
}

.pane-tag {
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pane-counter,
.pane-indicator {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pane-indicator {
  color: #fbee35;
  background: rgba(251, 238, 53, 0.1);
  border: 1px solid rgba(251, 238, 53, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.mask-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--font-code);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #e2e8f0;
  resize: vertical;
  min-height: 120px;
  max-height: 260px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mask-textarea:focus {
  border-color: var(--portal-yellow, #fbee35);
  box-shadow: 0 0 16px rgba(251, 238, 53, 0.2);
}

.mask-textarea::placeholder {
  color: rgba(148, 163, 184, 0.45);
}

/* Action Row between Input and Output */
.mask-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-execute-mask {
  flex: 1;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(151, 206, 76, 0.7);
  background: linear-gradient(135deg, #10b981 0%, #84cc16 50%, #eab308 100%);
  color: #050a0e;
  box-shadow: 0 4px 20px rgba(132, 204, 22, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-execute-mask:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(132, 204, 22, 0.55), 0 0 32px rgba(234, 179, 8, 0.3);
  filter: brightness(1.08);
}

.btn-execute-mask:active {
  transform: translateY(0);
}

.exec-icon {
  font-size: 1rem;
}

.btn-clear-mask {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-mask:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Output Code Box */
.mask-output-container {
  background: #030509;
  border: 1px solid rgba(151, 206, 76, 0.25);
  border-radius: 10px;
  overflow: hidden;
  max-height: 220px;
  display: flex;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.mask-output-pre {
  margin: 0;
  padding: 0.85rem 1rem;
  width: 100%;
  overflow: auto;
  font-family: var(--font-code);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-all;
}

.mask-output-code {
  font-family: inherit;
}

/* Stylized Redaction Badges */
.redacted-tag {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  margin: 0 0.12rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  font-family: var(--font-code);
  text-shadow: 0 0 6px currentColor;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  animation: redacted-glow 2s infinite alternate ease-in-out;
}

@keyframes redacted-glow {
  0% { filter: brightness(0.95); }
  100% { filter: brightness(1.2); }
}

.redacted-tag.tag-db,
.redacted-tag.tag-jwt,
.redacted-tag.tag-key {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.7);
  color: #fca5a5;
}

.redacted-tag.tag-nik,
.redacted-tag.tag-npwp,
.redacted-tag.tag-card {
  background: rgba(251, 238, 53, 0.16);
  border: 1px solid rgba(251, 238, 53, 0.65);
  color: #fef08a;
}

.redacted-tag.tag-email,
.redacted-tag.tag-phone,
.redacted-tag.tag-ip {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.65);
  color: #7dd3fc;
}

.redacted-tag.tag-default {
  background: rgba(163, 230, 53, 0.16);
  border: 1px solid rgba(163, 230, 53, 0.65);
  color: #bef264;
}

/* Telemetry Strip below output */
.mask-telemetry-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.telemetry-item {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.telemetry-item.tags-item {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.category-pill {
  font-family: var(--font-code);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* Output Actions */
.mask-output-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.btn-copy-masked,
.btn-relay-terminal {
  flex: 1;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-masked {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(251, 238, 53, 0.3);
  color: #fef08a;
}

.btn-copy-masked:hover {
  background: rgba(251, 238, 53, 0.15);
  border-color: rgba(251, 238, 53, 0.6);
  transform: translateY(-1px);
}

.btn-relay-terminal {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.btn-relay-terminal:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: rgba(6, 182, 212, 0.7);
  transform: translateY(-1px);
}

/* Subspace Terminal Quick Command & Shield Switch */
.t-cmd-btn.t-cmd-morty {
  border-color: rgba(251, 238, 53, 0.4);
  color: #fef08a;
}

.t-cmd-btn.t-cmd-morty:hover {
  background: rgba(251, 238, 53, 0.15);
  border-color: #fbee35;
  box-shadow: 0 0 10px rgba(251, 238, 53, 0.3);
}

.t-form-row-shield {
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
}

.t-field-shield-toggle {
  display: flex;
  align-items: center;
}

.t-shield-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.t-shield-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.t-shield-slider {
  width: 38px;
  height: 20px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  position: relative;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.t-shield-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #94a3b8;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.t-shield-switch input:checked + .t-shield-slider {
  background: rgba(251, 238, 53, 0.25);
  border-color: #fbee35;
  box-shadow: 0 0 10px rgba(251, 238, 53, 0.35);
}

.t-shield-switch input:checked + .t-shield-slider::before {
  transform: translateX(18px);
  background: #fbee35;
  box-shadow: 0 0 6px #fbee35;
}

.t-shield-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.t-shield-status {
  color: #a3e635;
  font-weight: 700;
}

.t-tag-morty {
  color: #fef08a;
  background: rgba(251, 238, 53, 0.15);
  border: 1px solid rgba(251, 238, 53, 0.4);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  font-family: var(--font-code);
  font-size: 0.75rem;
  box-shadow: 0 0 8px rgba(251, 238, 53, 0.2);
}

