/* ==========================================================================
   BLAZE // RE41 — TACTICAL 3D CYBERPUNK HUD & DIMENSIONAL LINK PORTAL
   ========================================================================== */

:root {
  --frame-silver: #e6ecf2;
  --frame-silver-dim: #cdd6e0;
  --panel-dark: #151b22;
  --panel-deeper: #0f141a;
  --panel-slate: #202833;
  --neon-pink: #ff1268;
  --neon-pink-soft: #ff3c85;
  --neon-pink-glow: rgba(255, 18, 104, 0.55);
  --neon-cyan: #00f0ff;
  --neon-amber: #ffb800;
  --text-white: #f4f7fb;
  --text-muted: #8c9bb0;

  --font-display: 'Orbitron', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-jp: 'Noto Sans JP', sans-serif;

  /* Dynamic Portal Accent Variables (Overridden per Platform) */
  --portal-accent: #ff1268;
  --portal-secondary: #5865f2;
  --portal-glow: rgba(255, 18, 104, 0.5);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: radial-gradient(circle at 38% 35%, #1d2530 0%, #10151c 58%, #070a0f 100%);
  color: var(--text-white);
  font-family: var(--font-ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button {
    cursor: none;
  }
}

/* ==========================================================================
   1. CANVASES & ATMOSPHERIC OVERLAYS
   ========================================================================== */

#webgl-canvas,
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#webgl-canvas {
  z-index: 1;
}

#fx-canvas {
  z-index: 4;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.45;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(4, 7, 12, 0.78) 100%);
}

/* ==========================================================================
   2. CUSTOM TACTICAL RETICLE CURSOR
   ========================================================================== */

.cyber-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 18, 104, 0.78);
  border-radius: 50%;
  position: relative;
  transform: translate(-50%, -50%);
  transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease,
              transform 0.2s ease;
  box-shadow: 0 0 14px rgba(255, 18, 104, 0.35);
}

.cursor-cross {
  position: absolute;
  background: rgba(0, 240, 255, 0.85);
}

.cursor-cross.h {
  width: 8px;
  height: 1px;
  top: 50%;
  left: -5px;
  transform: translateY(-50%);
}

.cursor-cross.v {
  width: 1px;
  height: 8px;
  left: 50%;
  top: -5px;
  transform: translateX(-50%);
}

.cursor-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon-cyan);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--neon-cyan);
}

.cursor-coords {
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(230, 236, 242, 0.7);
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
}

.cursor-tag {
  position: absolute;
  top: -24px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 2px 6px;
  background: rgba(255, 18, 104, 0.9);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.cyber-cursor.is-hover .cursor-ring {
  width: 48px;
  height: 48px;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.5);
}

.cyber-cursor.is-portal .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--neon-pink);
  border-style: dashed;
  animation: spinSlow 4s linear infinite;
}

.cyber-cursor.is-portal .cursor-tag,
.cyber-cursor.is-hover .cursor-tag {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none), (pointer: coarse) {
  .cyber-cursor {
    display: none !important;
  }
}

/* ==========================================================================
   3. MAIN 3D VIEWPORT & BEVELED HUD CHASSIS
   ========================================================================== */

.hud-viewport {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 36px 28px 58px;
  perspective: 1450px;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s ease,
              opacity 0.5s ease;
}

.hud-viewport.warping-out {
  transform: scale(0.88) translateZ(-140px);
  filter: blur(6px) brightness(0.55);
  opacity: 0.45;
  pointer-events: none;
}

.hud-chassis-wrap {
  position: relative;
  width: 100%;
  max-width: 1320px;
  min-height: 670px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Left Protruding Error [x] Glitch Modules (55px forward) */
.error-tag-stack {
  position: absolute;
  left: -34px;
  bottom: 58px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transform: translateZ(55px);
  transform-style: preserve-3d;
}

.error-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 118px;
  padding: 7px 11px 7px 14px;
  background: var(--frame-silver);
  border: none;
  border-left: 4px solid var(--neon-pink);
  color: #151b22;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.48), -3px 0 14px rgba(255, 18, 104, 0.25);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.22s ease,
              color 0.22s ease,
              box-shadow 0.22s ease;
}

.error-tag .err-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.6px solid var(--neon-pink);
  color: var(--neon-pink);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.error-tag:hover {
  transform: translateX(8px) scale(1.04);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 18, 104, 0.4);
}

.error-tag.active {
  background: var(--neon-pink);
  color: #fff;
  border-left-color: var(--neon-cyan);
  box-shadow: 0 0 24px var(--neon-pink-glow);
}

.error-tag.active .err-box {
  border-color: #fff;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
}

/* Main 3D Tilting Beveled HUD Card */
.hud-card {
  position: relative;
  width: 100%;
  min-height: 670px;
  padding: 0 26px 24px 26px;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}

/* Outer Chamfered Silver & Dark Slate Panel Layers */
.chassis-outer-border {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(145deg, var(--frame-silver) 0%, #b4c0ce 35%, #232c38 68%, var(--frame-silver-dim) 100%);
  clip-path: polygon(
    26px 0,
    calc(100% - 140px) 0,
    calc(100% - 114px) 22px,
    calc(100% - 18px) 22px,
    100% 42px,
    100% calc(100% - 26px),
    calc(100% - 26px) 100%,
    22px 100%,
    0 calc(100% - 22px),
    0 26px
  );
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
}

.chassis-inner-panel {
  position: absolute;
  inset: 5px;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 26% 14%, rgba(230, 236, 242, 0.22) 0%, rgba(21, 27, 34, 0) 36%),
    radial-gradient(circle at 72% 48%, rgba(255, 18, 104, 0.08) 0%, transparent 48%),
    linear-gradient(135deg, #1b222c 0%, var(--panel-dark) 48%, var(--panel-deeper) 100%);
  clip-path: polygon(
    24px 0,
    calc(100% - 142px) 0,
    calc(100% - 116px) 22px,
    calc(100% - 16px) 22px,
    100% 40px,
    100% calc(100% - 24px),
    calc(100% - 24px) 100%,
    20px 100%,
    0 calc(100% - 20px),
    0 24px
  );
}

/* subtle tech grid texture inside inner panel */
.chassis-inner-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
}

/* ==========================================================================
   4. TOP TACTICAL UTILITY BAR
   ========================================================================== */

.hud-top-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
  margin-bottom: 12px;
  transform: translateZ(35px);
}

/* Left Light-Silver Chamfered Recess (0010221210 + Hamburger) */
.top-left-recess {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(180deg, #f2f6fa 0%, var(--frame-silver) 100%);
  color: #151b22;
  padding: 13px 28px 13px 34px;
  margin-left: -21px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.recess-pink-tab {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 6px;
  height: calc(100% - 20px);
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink-glow);
}

.matrix-display {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 0 rgba(21, 27, 34, 0.28), 0 0 14px rgba(21, 27, 34, 0.35);
  background: linear-gradient(180deg, #9aa6b8 0%, #c6d0dd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #5b6778;
  user-select: none;
  cursor: pointer;
  transition: letter-spacing 0.2s ease, color 0.2s ease;
}

.matrix-display:hover {
  color: var(--neon-pink);
  letter-spacing: 0.28em;
}

.cmd-trigger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 30px;
  height: 28px;
  background: rgba(21, 27, 34, 0.08);
  border: 1px solid rgba(21, 27, 34, 0.2);
  padding: 5px;
  border-radius: 3px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cmd-trigger-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: #232c38;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cmd-trigger-btn:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

.cmd-trigger-btn:hover span {
  background: #fff;
}

/* Center Hot-Pink Bars & Live Reactor Telemetry */
.top-center-telemetry {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-pink-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
}

.top-pink-bars span {
  width: 3px;
  height: 12px;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink-glow);
  animation: topBarPulse 1.4s ease-in-out infinite;
}

.top-pink-bars span:nth-child(odd) {
  height: 18px;
  animation-delay: 0.2s;
}

.top-pink-bars span:nth-child(3n) {
  height: 8px;
  animation-delay: 0.5s;
}

@keyframes topBarPulse {
  0%, 100% { transform: scaleY(0.65); opacity: 0.7; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.reactor-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(15, 20, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--frame-silver);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseGlow 1.5s infinite;
}

/* Right Interactive Controls */
.top-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}

.tactical-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: rgba(32, 40, 51, 0.88);
  border: 1px solid rgba(230, 236, 242, 0.18);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tactical-chip.icon-only {
  padding: 7px 10px;
}

.tactical-chip:hover {
  background: rgba(255, 18, 104, 0.2);
  border-color: var(--neon-pink);
  color: #fff;
  transform: translateY(-2px);
}

.tactical-chip.active {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 18px var(--neon-pink-glow);
}

.tactical-chip .chip-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.ignite-chip {
  border-color: rgba(255, 184, 0, 0.45);
  color: var(--neon-amber);
}

.ignite-chip:hover,
body.overdrive-active .ignite-chip {
  background: linear-gradient(90deg, var(--neon-pink), #ff6b00);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 18, 104, 0.65);
}

/* ==========================================================================
   5. CORE HUD SPLIT STAGE (CHARACTER LEFT / COMMAND RIGHT)
   ========================================================================== */

.hud-stage-grid {
  position: relative;
  z-index: 10;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(340px, 44%) 1fr;
  gap: 24px;
  align-items: stretch;
  transform-style: preserve-3d;
}

/* --- LEFT CHARACTER ZONE --- */
.character-zone {
  position: relative;
  min-height: 555px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-style: preserve-3d;
}

.char-top-chrome {
  position: absolute;
  top: 8px;
  left: 6px;
  pointer-events: none;
  transform: translateZ(20px);
}

.pink-chamfer-bar {
  width: 112px;
  height: 18px;
  background: linear-gradient(90deg, var(--neon-pink) 0%, #ff4789 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 10px 100%);
  box-shadow: 0 0 20px var(--neon-pink-glow);
}

.micro-diag-line {
  display: block;
  width: 170px;
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(230, 236, 242, 0.65), transparent);
}

/* Vertical Barcode Equalizers (Left Pink / Right White) */
.barcode-eq {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.eq-left {
  left: -4px;
  top: 155px;
  flex-direction: column;
  align-items: flex-start;
  transform: translateZ(35px);
}

.eq-left .eq-bar {
  height: 3px;
  width: 16px;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink-glow);
  transition: width 0.09s ease-out;
}

.eq-right {
  position: relative;
  flex-shrink: 0;
  align-self: flex-end;
  gap: 4px;
  height: 30px;
  align-items: flex-end;
  margin-top: 6px;
}

.eq-right .eq-bar {
  width: 4px;
  height: 14px;
  background: rgba(244, 247, 251, 0.9);
  transition: height 0.09s ease-out;
}

/* Back Plane (15px): Rotating Gyroscope & Barrel Auras */
.char-layer-back {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateZ(15px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.halo-radial-light {
  position: absolute;
  top: 4%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 242, 255, 0.24) 0%, rgba(255, 18, 104, 0.14) 45%, transparent 72%);
  filter: blur(8px);
}

.barrel-cyan-aura {
  position: absolute;
  bottom: 18px;
  left: 34%;
  width: 210px;
  height: 220px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.42) 0%, rgba(0, 175, 255, 0.16) 52%, transparent 75%);
  filter: blur(18px);
  animation: barrelPulse 2.8s ease-in-out infinite;
}

@keyframes barrelPulse {
  0%, 100% { opacity: 0.72; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.gyro-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 18, 104, 0.35);
}

.gyro-outer {
  width: 410px;
  height: 410px;
  top: 46px;
  animation: spinSlow 24s linear infinite;
}

.gyro-inner {
  width: 290px;
  height: 290px;
  top: 106px;
  border-color: rgba(0, 240, 255, 0.3);
  border-style: solid;
  border-left-color: transparent;
  border-right-color: transparent;
  animation: spinReverse 14s linear infinite;
}

/* Mid Plane (40px): Blaze Cutout + Kanji Glow + Chainsaw Specular + Hitbox */
.char-layer-mid {
  position: relative;
  z-index: 8;
  width: 100%;
  max-width: 470px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateZ(40px);
  transform-style: preserve-3d;
  will-change: transform;
}

.blaze-cutout-img {
  width: 100%;
  max-height: 550px;
  object-fit: contain;
  object-position: bottom center;
  user-select: none;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 18px rgba(0, 240, 255, 0.18));
  transition: filter 0.35s ease, transform 0.35s ease;
}

.barrel-kanji-pulse {
  position: absolute;
  left: 33%;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--font-jp);
  font-size: 20px;
  font-weight: 900;
  color: rgba(215, 252, 255, 0.72);
  text-shadow: 0 0 14px var(--neon-cyan), 0 0 26px var(--neon-cyan);
  pointer-events: none;
  animation: kanjiFlicker 3.2s ease-in-out infinite;
}

@keyframes kanjiFlicker {
  0%, 100% { opacity: 0.4; }
  45% { opacity: 0.85; }
  50% { opacity: 0.25; }
  55% { opacity: 0.95; }
}

.chainsaw-glint {
  position: absolute;
  right: 8%;
  bottom: 18%;
  width: 170px;
  height: 44px;
  transform: rotate(28deg);
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px;
}

.chainsaw-glint::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -60%;
  width: 42px;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), rgba(255, 184, 0, 0.7), transparent);
  transform: skewX(-22deg);
  animation: glintSweep 4.2s ease-in-out infinite;
}

@keyframes glintSweep {
  0%, 62% { left: -60%; opacity: 0; }
  75% { opacity: 1; }
  100% { left: 135%; opacity: 0; }
}

.chainsaw-hitbox {
  position: absolute;
  right: 4%;
  bottom: 8%;
  width: 46%;
  height: 30%;
  background: transparent;
  border: none;
  z-index: 20;
  border-radius: 14px;
}

.chainsaw-hitbox:hover {
  box-shadow: inset 0 0 24px rgba(255, 18, 104, 0.22);
}

/* Front Overlay Plane (75px): Chevrons & Tactical Arrows */
.char-layer-front {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateZ(75px);
}

.pink-arrow-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--neon-pink);
  filter: drop-shadow(0 0 10px var(--neon-pink-glow));
}

.arrow-upper {
  top: 102px;
  left: 14px;
}

.arrow-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(230, 236, 242, 0.78);
  padding: 2px 7px;
  border-bottom: 1px solid rgba(255, 18, 104, 0.5);
  background: rgba(15, 20, 26, 0.65);
}

.pink-chevrons-3 {
  position: absolute;
  left: 6px;
  bottom: 192px;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(255, 18, 104, 0.65));
  animation: chevronShift 2.2s ease-in-out infinite;
}

@keyframes chevronShift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(7px); }
}

/* --- RIGHT COMMAND ZONE --- */
.command-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 4px 4px;
  transform-style: preserve-3d;
}

/* Top-Right Lore & Medical Telemetry (25px) */
.top-lore-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  transform: translateZ(25px);
}

.lore-block {
  max-width: 440px;
}

.lore-header-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lore-pink-arrow {
  color: var(--neon-pink);
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 0 8px var(--neon-pink-glow));
}

.lore-text {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(230, 236, 242, 0.76);
  letter-spacing: 0.03em;
}

.lore-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.diag-slash {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-pink), rgba(230, 236, 242, 0.35), transparent);
}

.density-readout {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--neon-cyan);
  white-space: nowrap;
}

/* Center-Right Giant "Blaze" Title & Pink Chamfered Banner (65px) */
.blaze-hero-block {
  position: relative;
  margin: 12px 0 8px;
  transform: translateZ(65px);
  transform-style: preserve-3d;
}

.re41-watermark {
  position: absolute;
  top: -12px;
  right: 12%;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 18, 104, 0.62);
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.blaze-title {
  position: relative;
  z-index: 3;
  font-family: var(--font-display);
  font-size: clamp(58px, 7.6vw, 114px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: -10px;
  padding-left: 16px;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.blaze-title .char-solid {
  color: #ffffff;
}

.blaze-title .char-hollow {
  color: rgba(255, 18, 104, 0.08);
  -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 0 18px rgba(255, 18, 104, 0.65));
}

.blaze-pink-banner {
  position: relative;
  z-index: 2;
  padding-bottom: 10px;
}

.banner-undercarriage {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 0;
  height: 22px;
  background: linear-gradient(90deg, #98053b, #c90a50, #98053b);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
  opacity: 0.85;
}

.banner-core {
  position: relative;
  height: 54px;
  background: linear-gradient(90deg, #ff0d64 0%, #ff1e75 55%, #e60058 100%);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 27px, calc(100% - 22px) 54px, 22px 54px, 0 27px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  box-shadow: 0 0 36px rgba(255, 18, 104, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.banner-cutout {
  position: absolute;
  bottom: 0;
  width: 44px;
  height: 11px;
  background: var(--panel-dark);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
}

.banner-cutout.c1 { left: 26%; }
.banner-cutout.c2 { right: 26%; }

.banner-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.92);
}

.banner-ticks {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(21, 27, 34, 0.55);
}

/* Tactical Kanji Sub-Row (45px) */
.kanji-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 12px;
  transform: translateZ(45px);
}

.kanji-left-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kanji-vert-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vert-bar {
  width: 3px;
  height: 18px;
  background: var(--frame-silver);
}

.kanji-chars {
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--frame-silver);
}

.white-chevrons-left {
  display: flex;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.05em;
}

.white-chevrons-left span {
  animation: chevWave 1.6s ease-in-out infinite;
}

.white-chevrons-left span:nth-child(2) { animation-delay: 0.1s; }
.white-chevrons-left span:nth-child(3) { animation-delay: 0.2s; }
.white-chevrons-left span:nth-child(4) { animation-delay: 0.3s; }
.white-chevrons-left span:nth-child(5) { animation-delay: 0.4s; }
.white-chevrons-left span:nth-child(6) { animation-delay: 0.5s; }

@keyframes chevWave {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-3px); color: var(--neon-cyan); }
}

.kanji-right-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.kanji-overline {
  width: 96px;
  height: 3px;
  background: var(--frame-silver);
}

.kanji-large {
  font-family: var(--font-jp);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-white);
}

/* ==========================================================================
   6. INTERACTIVE 3D SOCIAL LINK COMMAND GRID (DISCORD / IG / TG / FB)
   ========================================================================== */

.social-command-grid {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0;
  transform: translateZ(60px);
  transform-style: preserve-3d;
}

.social-module {
  --mod-color: var(--neon-pink);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 16px 12px;
  text-decoration: none;
  color: var(--text-white);
  background: linear-gradient(135deg, rgba(32, 40, 51, 0.92) 0%, rgba(16, 22, 29, 0.96) 100%);
  border: 1px solid rgba(230, 236, 242, 0.14);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.24s ease,
              box-shadow 0.24s ease,
              background 0.24s ease;
  overflow: hidden;
}

.social-module.mod-discord { --mod-color: #7289da; }
.social-module.mod-instagram { --mod-color: #ff1268; }
.social-module.mod-telegram { --mod-color: #00f0ff; }
.social-module.mod-facebook { --mod-color: #3b82f6; }

.social-module::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-110%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.social-module:hover::before {
  transform: translateX(110%);
}

.social-module:hover {
  transform: translateY(-4px) translateZ(14px);
  border-color: var(--mod-color);
  background: linear-gradient(135deg, rgba(40, 50, 65, 0.96) 0%, rgba(18, 25, 34, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55), 0 0 22px color-mix(in srgb, var(--mod-color) 40%, transparent);
}

.mod-notch {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--mod-color);
  box-shadow: 0 0 12px var(--mod-color);
}

.mod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.mod-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 9px #22c55e;
  animation: pulseGlow 1.5s infinite;
}

.mod-tag {
  color: var(--mod-color);
  font-weight: 700;
}

.mod-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mod-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mod-color);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.social-module:hover .mod-icon {
  background: var(--mod-color);
  color: #fff;
  transform: scale(1.08);
}

.mod-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.mod-info strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.mod-info span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-arrow {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--mod-color);
  transition: transform 0.22s ease;
}

.social-module:hover .mod-arrow {
  transform: translate(3px, -3px);
}

/* ==========================================================================
   7. LOWER-RIGHT ANGLED STRIPES & STATUS FOOTER
   ========================================================================== */

.lower-status-footer {
  position: relative;
  padding-top: 10px;
  transform: translateZ(30px);
}

.angled-stripes-bg {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  margin-bottom: 10px;
  overflow: hidden;
  pointer-events: none;
}

.stripe-chev {
  width: 56px;
  height: 44px;
  background: rgba(15, 20, 26, 0.72);
  border-right: 2px solid rgba(255, 18, 104, 0.16);
  clip-path: polygon(0 0, 58% 0, 100% 50%, 58% 100%, 0 100%, 42% 50%);
  animation: stripeGlide 3.4s ease-in-out infinite;
}

.stripe-chev:nth-child(2) { animation-delay: 0.18s; }
.stripe-chev:nth-child(3) { animation-delay: 0.36s; }
.stripe-chev:nth-child(4) { animation-delay: 0.54s; }

@keyframes stripeGlide {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(10px); opacity: 0.92; }
}

.status-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-resistance {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(230, 236, 242, 0.7);
  letter-spacing: 0.04em;
}

.sq-bullet {
  width: 7px;
  height: 7px;
  background: var(--frame-silver);
  flex-shrink: 0;
}

.footer-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chainsaw-rev-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255, 18, 104, 0.14);
  border: 1px solid rgba(255, 18, 104, 0.5);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.chainsaw-rev-btn:hover {
  background: var(--neon-pink);
  transform: translateY(-2px);
  box-shadow: 0 0 18px var(--neon-pink-glow);
}

.rev-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-amber);
  box-shadow: 0 0 8px var(--neon-amber);
}

.pink-arrow-se {
  color: var(--neon-pink);
  filter: drop-shadow(0 0 10px var(--neon-pink-glow));
}

/* ==========================================================================
   8. INTERACTIVE ANOMALY & OVERDRIVE STATES
   ========================================================================== */

body.overdrive-active .chassis-outer-border {
  background: linear-gradient(145deg, var(--neon-pink) 0%, var(--neon-amber) 45%, var(--neon-cyan) 100%);
}

body.overdrive-active .blaze-cutout-img {
  filter: drop-shadow(0 0 28px rgba(255, 18, 104, 0.6)) drop-shadow(0 0 16px rgba(255, 184, 0, 0.45));
}

body.overdrive-active .barrel-cyan-aura {
  background: radial-gradient(circle, rgba(255, 100, 30, 0.55) 0%, rgba(255, 18, 104, 0.25) 55%, transparent 78%);
}

body.anomaly-zerog .char-layer-mid {
  animation: zeroGFloat 4s ease-in-out infinite;
}

@keyframes zeroGFloat {
  0%, 100% { transform: translateZ(40px) translateY(0px); }
  50% { transform: translateZ(65px) translateY(-14px); }
}

body.anomaly-thermal .blaze-cutout-img {
  filter: contrast(1.38) hue-rotate(155deg) saturate(1.8) drop-shadow(0 0 24px rgba(0, 240, 255, 0.75));
}

body.anomaly-thermal .chassis-inner-panel {
  filter: hue-rotate(140deg) contrast(1.1);
}

/* ==========================================================================
   9. UNIVERSAL 3D DIMENSIONAL LINK PORTAL MODAL
   ========================================================================== */

.link-portal-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  perspective: 1200px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.link-portal-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.portal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--portal-accent) 18%, transparent), rgba(5, 8, 13, 0.88) 72%);
  backdrop-filter: blur(8px);
}

.warp-telemetry {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 650px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--frame-silver);
}

.warp-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-square {
  width: 9px;
  height: 9px;
  background: var(--portal-accent);
  box-shadow: 0 0 12px var(--portal-accent);
  animation: pulseGlow 0.9s infinite;
}

.warp-speed-meter {
  display: flex;
  gap: 16px;
}

.warp-speed-meter strong {
  color: var(--portal-accent);
}

.portal-holo-card {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 650px;
  padding: 26px 28px;
  background: linear-gradient(155deg, rgba(22, 29, 39, 0.96) 0%, rgba(11, 15, 21, 0.98) 100%);
  border: 1.5px solid var(--portal-accent);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 50px var(--portal-glow);
  transform-style: preserve-3d;
  transform: scale(0.86) rotateX(12deg);
  transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.link-portal-modal.active .portal-holo-card {
  transform: scale(1) rotateX(0deg);
}

.holo-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--portal-accent) 12%, transparent) 50%, transparent 100%);
  height: 40%;
  animation: holoSweep 3.2s linear infinite;
}

@keyframes holoSweep {
  0% { transform: translateY(-120%); }
  100% { transform: translateY(320%); }
}

.holo-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 20, 26, 0.85);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.holo-close-btn:hover {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.holo-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.holo-platform-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 20, 0.9);
  border: 1.5px solid var(--portal-accent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  color: var(--portal-accent);
  box-shadow: 0 0 24px var(--portal-glow);
}

.emblem-pulse {
  position: absolute;
  inset: -6px;
  border: 1px solid var(--portal-accent);
  opacity: 0.45;
  animation: pulseGlow 1.8s infinite;
}

.holo-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--portal-accent);
  margin-bottom: 4px;
}

.holo-server-name {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 23px);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.holo-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 3px;
}

.portal-radar-strip {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

#portal-mini-canvas {
  width: 100%;
  height: 110px;
  background: rgba(8, 12, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.holo-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.metric-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.035);
  border-left: 2px solid var(--portal-accent);
}

.metric-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
}

.metric-box small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.metric-dot.alt { background: var(--portal-accent); box-shadow: 0 0 8px var(--portal-accent); }
.metric-dot.sec { background: var(--neon-cyan); box-shadow: 0 0 8px var(--neon-cyan); }

/* Operative Pass Generator */
.holo-pass-generator {
  background: rgba(9, 13, 19, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pass-top-btns {
  display: flex;
  gap: 8px;
}

.mini-hud-btn {
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.mini-hud-btn:hover {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.pass-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.pass-card small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.pass-card strong {
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
}

.pass-code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-accent);
  padding: 5px 10px;
  border: 1px dashed var(--portal-accent);
}

/* Auto-Warp Progress Bar */
.warp-progress-wrap {
  margin-bottom: 18px;
}

.warp-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--frame-silver);
  margin-bottom: 7px;
}

.pause-warp-btn {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
}

.pause-warp-btn:hover {
  background: rgba(0, 240, 255, 0.18);
}

.warp-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.warp-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--portal-accent), var(--neon-cyan));
  box-shadow: 0 0 14px var(--portal-accent);
}

.holo-actions {
  display: flex;
  gap: 12px;
}

.launch-portal-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  background: var(--portal-accent);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 0 26px var(--portal-glow);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.launch-portal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.stay-btn {
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.stay-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ==========================================================================
   10. COMMAND PALETTE & CYBER TOAST
   ========================================================================== */

.quick-search-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px;
  background: rgba(6, 9, 14, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.quick-search-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quick-search-box {
  width: 100%;
  max-width: 580px;
  background: #141b23;
  border: 1.5px solid var(--neon-pink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 18, 104, 0.25);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

.quick-search-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qs-prompt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-pink);
  font-weight: 700;
}

#quick-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
}

.qs-close {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 11px;
}

.quick-search-list {
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow-y: auto;
}

.qs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--frame-silver);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
  transition: background 0.16s ease, padding-left 0.16s ease;
}

.qs-item small {
  color: var(--neon-cyan);
  font-size: 11px;
}

.qs-item:hover {
  background: rgba(255, 18, 104, 0.18);
  padding-left: 24px;
  color: #fff;
}

.cyber-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 300;
  padding: 10px 20px;
  background: rgba(15, 20, 26, 0.94);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 18px rgba(0, 240, 255, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.cyber-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   11. KEYFRAMES & RESPONSIVE BREAKPOINTS
   ========================================================================== */

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

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 1100px) {
  .hud-viewport {
    padding: 20px 18px 20px 34px;
  }

  .hud-top-bar {
    flex-wrap: wrap;
  }

  .top-center-telemetry {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hud-stage-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .character-zone {
    min-height: 430px;
  }

  .blaze-cutout-img {
    max-height: 430px;
  }

  .error-tag-stack {
    left: -18px;
    top: 130px;
    bottom: auto;
  }
}

@media (max-width: 720px) {
  .hud-viewport {
    padding: 12px;
  }

  .hud-card {
    padding: 0 14px 18px;
  }

  .top-left-recess {
    margin-left: -10px;
    padding: 10px 22px 10px 22px;
    gap: 12px;
  }

  .matrix-display {
    font-size: 16px;
    letter-spacing: 0.16em;
  }

  .top-right-controls {
    flex-wrap: wrap;
    padding-top: 4px;
  }

  .error-tag-stack {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    transform: none;
    margin-bottom: 10px;
  }

  .error-tag {
    min-width: auto;
    flex: 1 1 auto;
    font-size: 11px;
  }

  .character-zone {
    min-height: 360px;
  }

  .social-command-grid {
    grid-template-columns: 1fr;
  }

  .portal-radar-strip {
    grid-template-columns: 1fr;
  }

  .holo-actions {
    flex-direction: column;
  }

  .pass-card {
    grid-template-columns: 1fr 1fr;
  }

  .status-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
