/**
 * PragCore 13-Hero Mascot Universe & 3D Cover Flow Lore Gallery
 * Strict anti-slop monochrome styling with specular top-bevel catchlights.
 * Zero Unicode emojis (pure SVG / SF symbols only).
 * Keynote Cover Flow 3D Stage & Museum Vitrine Invariants.
 */

:root {
  --stage-bg: #050811;
  --card-w: 240px;
  --card-h: 300px;
  --stage-h: 520px;
  --horizon-top: 360px;
  --accent-cyan: #00f2fe;
  --accent-blue: #38bdf8;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-specular: rgba(255, 255, 255, 0.2);
}

body.characters-page {
  background-color: var(--stage-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Ambient Canvas & Radial Glow */
.characters-ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle 800px at 50% 280px, rgba(0, 242, 254, 0.04) 0%, rgba(5, 8, 17, 0) 70%),
              radial-gradient(circle 600px at 80% 600px, rgba(168, 85, 247, 0.03) 0%, rgba(5, 8, 17, 0) 65%);
}

/* Header Brand Badge */
.header-badge-mascots {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hero Intro Section */
.mascot-hero-section {
  position: relative;
  z-index: 1;
  padding: 48px 24px 16px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.mascot-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.2);
  margin-bottom: 16px;
}

.mascot-hero-kicker .kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.mascot-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.mascot-hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 28px;
}

/* Audio Theme & Stage Controls Bar */
.stage-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.stage-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-specular);
  transform: translateY(-1px);
}

.stage-btn.is-active {
  background: rgba(0, 242, 254, 0.14);
  border-color: rgba(0, 242, 254, 0.5);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.theme-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 9999px;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-subtle);
}

.theme-opt-btn {
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-opt-btn.is-selected {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Cover Flow 3D Stage & Museum Vitrine
   Invariant: Reserve >= 140px floor space below contact baseline (height: 520px, top: 360px)
   Perspective origin: 50% 360px
   ========================================================================== */
.coverflow-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  z-index: 1;
  overflow: hidden;
  user-select: none;
}

.coverflow-viewport {
  position: relative;
  width: 100%;
  height: var(--stage-h);
  perspective: 1100px;
  perspective-origin: 50% var(--horizon-top);
  cursor: grab;
  touch-action: pan-y;
  overflow: visible;
}

.coverflow-viewport.is-dragging {
  cursor: grabbing;
}

.coverflow-viewport.is-dragging .cf-card {
  transition: none !important;
}

/* Specular Light Blade Contact Horizon */
.coverflow-horizon-line {
  position: absolute;
  top: var(--horizon-top);
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 242, 254, 0) 0%, rgba(0, 242, 254, 0.6) 25%, rgba(255, 255, 255, 0.9) 50%, rgba(0, 242, 254, 0.6) 75%, rgba(0, 242, 254, 0) 100%);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4), 0 0 2px rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 2;
}

/* 3D Cards Container */
.coverflow-track {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 100%;
  transform-style: preserve-3d;
}

/* Individual Cover Flow Card Plaque */
.cf-card {
  position: absolute;
  top: calc(var(--horizon-top) - var(--card-h));
  left: calc(var(--card-w) / -2);
  width: var(--card-w);
  height: var(--card-h);
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  cursor: pointer;
}

/* Card 3D Flip Container */
.cf-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 18px;
  background: rgba(10, 15, 28, 0.95);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 16px 40px rgba(0, 0, 0, 0.7);
  -webkit-box-reflect: below 2px linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.28) 100%);
}

.cf-card.is-flipped .cf-flip-inner {
  transform: rotateY(180deg);
}

.cf-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Front Face: 1:1 Pixar Bust Portrait */
.cf-face-front {
  background: #080c16;
}

.cf-portrait-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #04060c;
}

.cf-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cf-card:hover .cf-portrait-img {
  transform: scale(1.04);
}

.cf-portrait-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, #080c16 0%, transparent 100%);
  pointer-events: none;
}

.cf-card-front-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.cf-card-division {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-card-product {
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  color: var(--text-sub);
}

.cf-flip-hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.15s ease;
}

.cf-flip-hint-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Back Face: 3:4 Full Body Action Pose */
.cf-face-back {
  background: #080c16;
  transform: rotateY(180deg);
  padding: 12px;
}

.cf-character-full-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #04060c;
  margin-bottom: 10px;
}

.cf-character-full-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-card-back-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cf-sig-move-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #ffffff;
}

.cf-sig-move-name {
  font-weight: 700;
  color: var(--accent-cyan);
}

.cf-combat-arch {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Active Highlight Glow */
.cf-card.is-active .cf-flip-inner {
  border-color: rgba(0, 242, 254, 0.6);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.3), 0 0 24px rgba(0, 242, 254, 0.35), 0 20px 48px rgba(0, 0, 0, 0.85);
}

/* Scrubber Bar & Controls */
.coverflow-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 24px;
  max-width: 680px;
  margin: 0 auto 36px;
}

.nav-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-specular);
  transform: scale(1.06);
}

.scrubber-track-container {
  position: relative;
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.scrubber-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, left 0.2s ease;
}

.scrubber-track-container:hover .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1.2);
}

.scrubber-ticks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.scrubber-tick {
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  transition: height 0.2s ease, background 0.2s ease;
}

.scrubber-tick.is-active {
  background: var(--accent-cyan);
  height: 12px;
  box-shadow: 0 0 6px var(--accent-cyan);
}

.stage-counter-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ==========================================================================
   Active Hero Detailed Dossier Section
   ========================================================================== */
.mascot-dossier-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.dossier-card {
  background: rgba(10, 16, 30, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 24px 64px -8px rgba(0, 0, 0, 0.8);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  transition: all 0.3s ease;
}

/* Left Column: Identity & Plain-Language Explainer */
.dossier-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dossier-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.dossier-hero-name {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: #ffffff;
}

.dossier-hero-subtitle {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dossier-lore-p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0;
}

/* Plain-Language Explainer Box (Mandate) */
.dossier-explainer-box {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(10, 16, 30, 0.85) 100%);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.explainer-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.explainer-box-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #f1f5f9;
  margin: 0;
}

/* Action Trigger Buttons */
.dossier-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.action-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #050811;
  background: #ffffff;
  border: 1px solid #ffffff;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.action-btn-primary:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.45);
  transform: translateY(-2px);
}

.action-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-specular);
  transform: translateY(-2px);
}

/* Right Column: Combat Specs, Telemetry, and Banter */
.dossier-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Signature Move Card */
.sig-move-card {
  background: rgba(14, 22, 40, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sig-move-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sig-move-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.sig-move-dmg-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
}

.sig-move-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* Combat Metric Progress Bars */
.combat-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.metric-label-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.metric-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Banter Dialogue Box */
.dossier-banter-card {
  background: rgba(14, 22, 40, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.banter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.banter-quote-text {
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.5;
  color: #e2e8f0;
  margin: 0;
}

/* Audio Visualizer Waveform Animation */
.audio-visualizer-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.vis-stick {
  width: 3px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 1px;
  transition: height 0.1s ease;
}

.is-playing-audio .vis-stick:nth-child(1) { animation: vis-pulse 0.4s infinite ease-in-out; }
.is-playing-audio .vis-stick:nth-child(2) { animation: vis-pulse 0.4s 0.1s infinite ease-in-out; }
.is-playing-audio .vis-stick:nth-child(3) { animation: vis-pulse 0.4s 0.2s infinite ease-in-out; }
.is-playing-audio .vis-stick:nth-child(4) { animation: vis-pulse 0.4s 0.3s infinite ease-in-out; }

@keyframes vis-pulse {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .dossier-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --card-w: 190px;
    --card-h: 240px;
    --stage-h: 420px;
    --horizon-top: 290px;
  }

  .mascot-hero-section {
    padding: 32px 16px 12px;
  }

  .cf-portrait-wrap {
    height: 150px;
  }

  .cf-character-full-wrap {
    height: 130px;
  }

  .dossier-card {
    padding: 20px;
  }

  .dossier-actions-bar {
    flex-direction: column;
  }

  .action-btn-primary, .action-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
