/* ═══════════════════════════════════════════════════════════════════════════
   Infopolis — style.css
   Architecture : Scene → PhoneFrame → PhoneScreen → Game → HUD + Card
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & base ──────────────────────────────────────────────────────────── */

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

:root {
  --screen-bg:      #0e0e0e;
  --surface-1:      #1a1a1a;
  --surface-2:      #242424;
  --border-dim:     rgba(255,255,255,0.08);
  --border-bright:  rgba(255,255,255,0.16);
  --text-primary:   #f0f0f0;
  --text-secondary: #888;
  --text-muted:     #555;
  --accent-green:   #4ade80;
  --accent-red:     #f43f5e;
  --phone-w:        375px;
  --phone-h:        812px;
  --bezel:          12px;
  --screen-radius:  44px;
  --frame-radius:   54px;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  background: #1c1917;
}

/* ── Scène : fond ambiant ───────────────────────────────────────────────────── */

#scene {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Papier journal froissé — rappelle le thème médias */
  background-color: #1c1917;
  background-image:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(234,179,8,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 70% 60%, rgba(239,68,68,0.05) 0%, transparent 70%);
}

/* ── Cadre téléphone ────────────────────────────────────────────────────────── */

#phoneFrame {
  width: calc(var(--phone-w) + var(--bezel) * 2);
  height: calc(var(--phone-h) + var(--bezel) * 2);
  background: linear-gradient(160deg, #2a2a2a 0%, #111 50%, #1e1e1e 100%);
  border-radius: var(--frame-radius);
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 0 2px rgba(0,0,0,0.8),
    0 40px 80px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Encoche haut */
#phoneSpeaker {
  position: absolute;
  top: calc(var(--bezel) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 6px;
  background: #0a0a0a;
  border-radius: 3px;
  z-index: 10;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

/* Caméra frontale */
#phoneCamera {
  position: absolute;
  top: calc(var(--bezel) + 6px);
  left: calc(50% + 54px);
  width: 10px;
  height: 10px;
  background: #0d0d0d;
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset 0 0 0 2px rgba(50,100,180,0.3);
}

/* ── Écran ──────────────────────────────────────────────────────────────────── */

#phoneScreen {
  position: absolute;
  inset: var(--bezel);
  background: var(--screen-bg);
  border-radius: var(--screen-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Barre de statut OS ─────────────────────────────────────────────────────── */

#statusBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  /* Espace pour l'encoche */
  padding-top: 18px;
}

#statusIcons {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--text-primary);
}

.status-icon {
  letter-spacing: -1px;
}

/* ── Conteneur de jeu ───────────────────────────────────────────────────────── */

#game {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── HUD ────────────────────────────────────────────────────────────────────── */

#hud {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 6px 16px 8px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
  gap: 4px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.statLabel {
  font-size: 9px;
  color: var(--text-muted);
  font-family: 'Jersey 20', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* Indicateur de preview */
.indicator {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

/* Icône jauge */
.icon-fill {
  width: 32px;
  height: 32px;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  background: var(--surface-2);
  position: relative;
  border-radius: 6px;
}

.icon-fill.curiosity  { mask-image: url("/assets/icons/faq.svg"); }
.icon-fill.truth      { mask-image: url("/assets/icons/education.svg"); }
.icon-fill.expertise  { mask-image: url("/assets/icons/graduation.svg"); }
.icon-fill.speed      { mask-image: url("/assets/icons/rocket.svg"); }
.icon-fill.viral      { mask-image: url("/assets/icons/virus.svg"); }
.icon-fill.influence  { mask-image: url("/assets/icons/influence.svg"); }

/* Liquide dans l'icône */
.liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--fill, 50%);
  background: #e8e8e8;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 0 6px 6px;
}

/* Couleurs des liquides par stat */
#curiosityBar  { background: #60a5fa; }
#truthBar      { background: #4ade80; }
#expertiseBar  { background: #a78bfa; }
#speedBar      { background: #fb923c; }
#viralBar      { background: #f43f5e; }
#influenceBar  { background: #facc15; }

/* Alerte quand une jauge est critique (< 20% ou > 80%) — géré via JS */
.stat.critical .liquid {
  background: #ef4444 !important;
}
.stat.critical .statLabel {
  color: #ef4444;
}

/* ── Badge d'acte ───────────────────────────────────────────────────────────── */

#actBadge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
}

#actLabel {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#actName {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'Jersey 20', sans-serif;
  letter-spacing: 0.04em;
}

/* ── Zone carte ─────────────────────────────────────────────────────────────── */

#cardContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 8px;
  min-height: 0;
}

/* Hints de swipe */
#swipeHints {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

#hintLeft, #hintRight {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  transition: opacity 0.2s;
}

#hintLeft  { color: var(--accent-red);   border: 1px solid rgba(244,63,94,0.3);  background: rgba(244,63,94,0.08);  opacity: 0.5; }
#hintRight { color: var(--accent-green); border: 1px solid rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); opacity: 0.5; }

/* Activation des hints au survol de swipe — via JS sur #card */
#card.swiping-left  #hintLeft,
body.swiping-left   #hintLeft  { opacity: 1; }
#card.swiping-right #hintRight,
body.swiping-right  #hintRight { opacity: 1; }

/* ── Carte (base) ───────────────────────────────────────────────────────────── */

#card {
  width: 100%;
  max-height: 100%;
  background: #1e1e1e;
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  position: relative;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  transition: transform 0.08s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 0.5px rgba(255,255,255,0.06);
}

#card:active {
  cursor: grabbing;
}

/* ── Barre de navigation simulée ───────────────────────────────────────────── */

#navBar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 16px;
  background: var(--surface-1);
  border-top: 1px solid var(--border-dim);
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  opacity: 0.35;
  transition: opacity 0.15s;
}

.nav-item.active {
  opacity: 1;
}

.nav-icon {
  font-size: 16px;
  line-height: 1;
}

.nav-item span {
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.nav-item.active span {
  color: var(--text-primary);
}

/* ── Écran de fin ───────────────────────────────────────────────────────────── */

#endingScreen {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  border-radius: var(--screen-radius);
}

#endingContent {
  background: var(--surface-1);
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  padding: 28px 24px;
  width: calc(100% - 32px);
  text-align: center;
}

#endingTitle {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-family: 'Jersey 20', sans-serif;
  letter-spacing: 0.02em;
}

#endingText {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 20px;
  white-space: pre-line;
  text-align: left;
}

#endingStats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ending-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ending-score span:first-child {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ending-score span:last-child {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Jersey 20', sans-serif;
}

#endingRestart {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 10px 28px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}

#endingRestart:hover {
  background: rgba(255,255,255,0.14);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEMPLATES DE CARTES TYPÉES PAR SOURCE
   Chaque .card-type-X redéfinit l'apparence complète de #card
   via la variable --card-bg et des classes .ct-* partagées.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base commune à toutes les cartes typées ────────────────────────────────── */

#card {
  --card-accent: #888;
  --card-bg:     #1e1e1e;
  background: var(--card-bg);
  transition: background 0.2s ease;
}

.ct-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Header : avatar + meta + badge */
.ct-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px 8px;
}

.ct-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ct-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
  flex-shrink: 0;
}
.ct-avatar--insta {
  /* Liseré dégradé Instagram */
  background: conic-gradient(from 0deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* .ct-avatar--insta::after {
  content: attr(data-initials);
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
 */
.ct-meta {
  flex: 1;
  min-width: 0;
}

.ct-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ct-verified {
  color: #1d9bf0;
  font-size: 12px;
}

/* Badge source — coin haut droit */
.ct-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 5px;
  color: #fff;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Corps de texte */
.ct-body {
  padding: 6px 14px 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  flex: 1;
}
.ct-body--sm    { font-size: 12px; color: var(--text-secondary); flex: none; }
.ct-body--x     { font-size: 14px; padding: 4px 14px 10px; }
.ct-body--discord { font-size: 12px; padding: 2px 0; }

/* Footer : actions */
.ct-footer {
  display: flex;
  gap: 14px;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border-dim);
}
.ct-action {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tags génériques */
.ct-tags {
  padding: 0 14px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ct-tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-dim);
  border-radius: 999px;
  font-size: 10px;
  padding: 2px 8px;
  color: var(--text-secondary);
}

/* ── TikTok ──────────────────────────────────────────────────────────────────── */

.card-type-tiktok {
  background: #010101 !important;
  border-color: #1a1a1a !important;
}

.ct-video {
  background: #111;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Simulation d'un gradient vidéo */
  background-image: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
}
.ct-video--text {
  height: 90px;
}
.ct-play {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  backdrop-filter: blur(4px);
}
.ct-video-label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.ct-hashtags {
  padding: 0 14px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ct-hashtag {
  font-size: 11px;
  color: #fe2c55;
  font-weight: 500;
}

/* ── X ───────────────────────────────────────────────────────────────────────── */

.card-type-x {
  background: #16202a !important;
  border-color: #1e2f3f !important;
}

.card-type-x .ct-footer {
  border-top-color: #1e2f3f;
}

.card-type-x .ct-action {
  color: #8b98a5;
}

/* ── YouTube ─────────────────────────────────────────────────────────────────── */

.card-type-youtube {
  background: #0f0f0f !important;
  border-color: #222 !important;
}

.ct-yt-thumb {
  background: #1a1a1a;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(160deg, #1f1f1f 0%, #0a0a0a 100%);
  overflow: hidden;
}
.ct-yt-play {
  width: 48px;
  height: 34px;
  background: #ff0000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}
.ct-yt-views {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
}
.ct-yt-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px 4px;
}
.ct-yt-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ── Instagram ───────────────────────────────────────────────────────────────── */

.card-type-instagram {
  background: #0f0f0f !important;
  border-color: #2a2a2a !important;
}

.ct-story-bar {
  display: flex;
  gap: 3px;
  padding: 0 14px 6px;
}
.ct-story-seg {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.2);
  border-radius: 1px;
}
.ct-story-seg--done {
  background: rgba(255,255,255,0.8);
}

.ct-insta-quote {
  margin: 6px 14px 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid #e1306c;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #ddd;
  line-height: 1.5;
  font-style: italic;
}

/* ── Discord ─────────────────────────────────────────────────────────────────── */

.card-type-discord {
  background: #1e1f22 !important;
  border-color: #2b2d31 !important;
}

.ct-discord-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  border-bottom: 1px solid #2b2d31;
}
.ct-discord-server {
  font-size: 11px;
  font-weight: 600;
  color: #8a8f98;
  letter-spacing: 0.05em;
}
.ct-discord-msg {
  display: flex;
  gap: 10px;
  padding: 10px 14px 6px;
  align-items: flex-start;
}
.ct-discord-name {
  font-size: 12px;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Presse ──────────────────────────────────────────────────────────────────── */

.card-type-press {
  background: #fafaf7 !important;
  border-color: #e0dbd0 !important;
  color: #1a1a1a;
}

.ct-press-masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px 8px;
  border-bottom: 2px solid #1a1a1a;
}
.ct-press-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}
.card-type-press .ct-time {
  color: #999;
  font-size: 10px;
}

.ct-press-img {
  background: #e8e5df;
  height: 80px;
}

.ct-press-headline {
  padding: 10px 14px 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}

.ct-body--press {
  color: #444;
  font-size: 12px;
  line-height: 1.6;
}

.ct-press-byline {
  display: flex;
  justify-content: space-between;
  padding: 6px 14px 10px;
  font-size: 10px;
  color: #999;
  border-top: 1px solid #e0dbd0;
}

/* ── Officiel ────────────────────────────────────────────────────────────────── */

.card-type-official {
  background: #f4f7f4 !important;
  border-color: #c8d8c8 !important;
  color: #1a1a1a;
}

.ct-official-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}
.ct-official-logo {
  width: 36px;
  height: 36px;
  background: #6b9e5e;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.ct-official-org {
  font-size: 12px;
  font-weight: 700;
  color: #2a2a2a;
}
.card-type-official .ct-time {
  color: #888;
}
.ct-official-divider {
  height: 2px;
  background: linear-gradient(90deg, #6b9e5e, transparent);
  margin: 0 14px 10px;
}
.ct-official-title {
  padding: 0 14px 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}
.ct-body--official {
  color: #444;
  font-size: 12px;
  line-height: 1.6;
  padding-bottom: 14px;
}

/* ── Feedback de swipe (recréé dynamiquement, styles identiques) ─────────────── */

#cardPreviewLeft,
#cardPreviewRight {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  opacity: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

#cardPreviewLeft {
  left: 0;
  background: linear-gradient(90deg, rgba(244,63,94,0.3) 0%, transparent 100%);
  justify-content: flex-start;
  padding-left: 20px;
}

#cardPreviewRight {
  right: 0;
  background: linear-gradient(270deg, rgba(74,222,128,0.3) 0%, transparent 100%);
  justify-content: flex-end;
  padding-right: 20px;
}

#cardPreviewLeft span,
#cardPreviewRight span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#cardPreviewLeft span  { color: var(--accent-red);   }
#cardPreviewRight span { color: var(--accent-green); }

/* Presse & Officiel : overlays adaptés au fond clair */
.card-type-press #cardPreviewLeft,
.card-type-official #cardPreviewLeft {
  background: linear-gradient(90deg, rgba(200,30,50,0.2) 0%, transparent 100%);
}
.card-type-press #cardPreviewRight,
.card-type-official #cardPreviewRight {
  background: linear-gradient(270deg, rgba(30,130,60,0.2) 0%, transparent 100%);
}

/* ── Horloge dynamique ──────────────────────────────────────────────────────── */
/* Mise à jour via JS si souhaité */

/* ── Responsive : si l'écran est trop petit pour le téléphone ───────────────── */

@media (max-height: 860px) {
  :root {
    --phone-h: 720px;
    --phone-w: 340px;
  }
}

@media (max-height: 760px) {
  :root {
    --phone-h: 640px;
    --phone-w: 310px;
  }
  .icon-fill { width: 26px; height: 26px; }
  #cardTop   { font-size: 13px; }
}
/* ========================
   SCREENS — SCROLL BACK
   ======================== */

:root {
  --sb-black:    #0A0A0F;
  --sb-surface:  #1A1A24;
  --sb-white:    #E8E4D9;
  --sb-muted:    #7A7A8A;
  --sb-acid:     #C8F43A;
  --sb-red:      #FF3B3B;
  --sb-border:   rgba(232, 228, 217, 0.12);
}

/* ── BASE SCREEN ── */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--sb-black);
  color: var(--sb-white);
  font-family: 'Courier New', Courier, monospace;
}
.screen.active {
  display: flex;
}

/* ━━━━━━━━━━━━━━━━━━━━━
   TITLE SCREEN
   ━━━━━━━━━━━━━━━━━━━━━ */
#titleScreen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.title-eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sb-muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.title-logo {
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sb-white);
  line-height: 1;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.7s forwards;
  position: relative;
}

.title-logo .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--sb-acid);
  vertical-align: middle;
  margin-left: 6px;
  animation: blink 1s step-end infinite;
}

.title-tagline {
  font-size: 13px;
  color: var(--sb-muted);
  letter-spacing: 0.08em;
  margin-top: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.1s forwards;
}

.title-start-hint {
position: absolute;
  bottom: 27vh;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeUp 0.8s ease 2s forwards;
}

#btnStart {
  background: transparent;
  border: 1px solid var(--sb-white);
  color: var(--sb-white);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 14px 48px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
#btnStart:hover {
  background: var(--sb-acid);
  border-color: var(--sb-acid);
  color: var(--sb-black);
}

/* ━━━━━━━━━━━━━━━━━━━━━
   CINEMATIC SCREEN
   ━━━━━━━━━━━━━━━━━━━━━ */
#cinematicScreen {
  flex-direction: column;
  background: #000;
}

.cinematic-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cinematic-image-slot {
  position: absolute;
  inset: 0;
  background: var(--sb-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.cinematic-image-slot.visible {
  opacity: 1;
}

.cinematic-image-placeholder {
height: 98vh;
  border: 1px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}
.cinematic-image-placeholder span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.15);
}

/* Letterbox bands */
.cinematic-band {
  flex-shrink: 0;
  background: #000;
  width: 100%;
  position: relative;
  z-index: 10;
}
.cinematic-band--top {
  height: 14%;
  display: flex;
  align-items: center;
  padding: 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cinematic-band--bottom {
  height: 22%;
  min-height: 110px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.cinematic-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cinematic-progress-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sb-muted);
  transition: background 0.3s;
}
.cinematic-progress-dot.active {
  background: var(--sb-acid);
}

.cinematic-scene-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--sb-muted);
  text-transform: uppercase;
  margin-left: auto;
}

.cinematic-text-wrap {
  flex: 1;
}

.cinematic-text {
  font-family: Arial, sans-serif;
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--sb-white);
  opacity: 0;
  transition: opacity 0.6s ease;
  max-width: 700px;
}
.cinematic-text.visible {
  opacity: 1;
}

.cinematic-skip {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--sb-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 32px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.cinematic-skip:hover {
  color: var(--sb-white);
}

/* ━━━━━━━━━━━━━━━━━━━━━
   PROFILE SCREEN
   ━━━━━━━━━━━━━━━━━━━━━ */
#profileScreen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 48px;
}

.profile-header {
  text-align: center;
}
.profile-eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sb-muted);
  margin-bottom: 12px;
}
.profile-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--sb-white);
  letter-spacing: -0.01em;
}
.profile-subtitle {
  font-size: 13px;
  color: var(--sb-muted);
  margin-top: 8px;
  font-family: Arial, sans-serif;
}

.profile-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  width: 100%;
}

.profile-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: var(--sb-surface);
  border: 1px solid var(--sb-border);
  padding: 28px 24px 24px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
  font-family: 'Courier New', monospace;
}
.profile-card:hover {
  border-color: rgba(232, 228, 217, 0.4);
  transform: translateY(-3px);
}
.profile-card.selected {
  border-color: var(--sb-acid);
}
.profile-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  color: var(--sb-acid);
}

.profile-card-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
}

.profile-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--sb-white);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.profile-card-desc {
  font-size: 11px;
  color: var(--sb-muted);
  line-height: 1.6;
  font-family: Arial, sans-serif;
  margin-bottom: 20px;
}

.profile-card-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.profile-stat-name {
  color: var(--sb-muted);
  width: 64px;
  flex-shrink: 0;
}

.profile-stat-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  position: relative;
}

.profile-stat-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--sb-acid);
  transition: width 0.4s ease;
}

.profile-card.selected .profile-stat-bar-fill {
  background: var(--sb-acid);
}

.profile-play-btn {
  margin-top: 8px;
  background: var(--sb-acid);
  border: none;
  color: var(--sb-black);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 14px 56px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-weight: 700;
}
.profile-play-btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
}
.profile-play-btn:disabled {
  opacity: 0.25;
  cursor: default;
  transform: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━
   TRANSITIONS
   ━━━━━━━━━━━━━━━━━━━━━ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.screen-fade-out {
  animation: screenFadeOut 0.5s ease forwards;
}
@keyframes screenFadeOut {
  to { opacity: 0; }
}

/* ── hide game initially ── */
#game {
  display: none;
}
#game.active {
  display: block;
}