/* ==========================================================
   Ya Rayah, le jeu — Stylesheet
   4:3 stage · cinematic freeze overlays · JOUER button
   ========================================================== */

@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/satoshi/Satoshi-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/satoshi/Satoshi-VariableItalic.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Array';
  src: url('../assets/fonts/array/Array-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Array';
  src: url('../assets/fonts/array/Array-Bold.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Array Wide';
  src: url('../assets/fonts/array/Array-BoldWide.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Medium.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:       #000000;
  --black-rich:  #060608;
  --gold:        #d4a24e;
  --gold-bright: #eabb5e;
  --gold-dim:    rgba(212,162,78,.25);
  --bet-blue:    #8bdfff;
  --white:       #f2efea;
  --white-dim:   #8a8680;
  --white-muted: #4a4744;
  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --font-array:   'Array', 'Satoshi', system-ui, sans-serif;
  --font-array-wide: 'Array Wide', 'Array', 'Satoshi', system-ui, sans-serif;
  --font-bet: 'Array', 'Satoshi', system-ui, sans-serif;
  --ease-out:    cubic-bezier(.22,1,.36,1);
  --ease-smooth: cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================
   4:3 Stage
   ================================ */
#app {
  position: relative;
  width: 100%;
  max-width: calc(100vh * 4 / 3);
  aspect-ratio: 4 / 3;
  max-height: 100vh;
  overflow: hidden;
  background: var(--black);
}

/* ================================
   Shared: Image button (no chrome)
   Used for both JOUER (intro) and ÉCOUTER (freeze)
   ================================ */
.jouer-btn,
.ecouter-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: transform .25s var(--ease-smooth), filter .25s;
}
.jouer-btn:hover,
.ecouter-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.12);
}
.jouer-btn:active,
.ecouter-btn:active {
  transform: scale(.94);
}
.jouer-btn img,
.ecouter-btn img {
  height: auto;
  display: block;
}

/* ================================
   Shared: Next arrow (minimal)
   ================================ */
.next-arrow-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s, transform .2s;
  opacity: .45;
}
.next-arrow-btn:hover {
  opacity: 1;
}
.next-arrow-btn:active {
  opacity: .6;
}
.next-arrow-btn svg {
  width: 40px; height: 40px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================
   Shared: Freeze overlay
   Full-screen container shown after video ends.
   Contains: title image + JOUER + arrow
   ================================ */
.freeze-overlay {
  position: absolute; inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  /* No transition on hide — instant disappear prevents content flash */
}
.freeze-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity .5s var(--ease-smooth);
}

/* Title image — covers the full 4:3 stage */
.title-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Écouter inside freeze */
.freeze-ecouter {
  position: absolute;
  left: clamp(3rem, 12vw, 8rem);
  bottom: clamp(1.5rem, 5vh, 3rem);
  transform: none;
  z-index: 2;
}
.freeze-ecouter:hover {
  transform: scale(1.06);
  filter: brightness(1.12);
}
.freeze-ecouter:active {
  transform: scale(.94);
}
.freeze-ecouter img {
  width: clamp(170px, 28vw, 280px);
}

/* Arrow inside freeze — right center */
.freeze-arrow {
  position: absolute;
  right: clamp(.8rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.freeze-arrow:hover {
  transform: translateY(-50%) translateX(2px);
}
.freeze-arrow:active {
  transform: translateY(-50%) scale(.9);
}

/* ================================
   SCREEN: Intro
   ================================ */
.intro-screen {
  position: absolute; inset: 0;
  background: var(--black);
  z-index: 10;
}

.intro-screen video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
}

/* Intro first-freeze play — same position/size as écouter */
.intro-play-wrap {
  position: absolute;
  left: clamp(3rem, 12vw, 8rem);
  bottom: clamp(1.5rem, 5vh, 3rem);
  z-index: 3;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.intro-play-wrap.ready {
  animation: fadeUp .7s var(--ease-out) .15s forwards;
  pointer-events: auto;
}
.intro-play-wrap.hidden {
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}
.intro-play-wrap .jouer-btn img {
  width: clamp(170px, 28vw, 280px);
}

/* ================================
   SCREEN: Video Selector
   ================================ */
.video-screen {
  position: absolute; inset: 0;
  background: var(--black);
}

.vs-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
}


/* ================================
   SCREEN: Gameplay — V1
   ================================ */
.gameplay-screen {
  position: absolute; inset: 0;
  background: var(--black);
  display: flex;
  flex-direction: column;
}

.gp-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gp-stage.hidden { opacity: 0; pointer-events: none; }

/* --- Announcement overlay --- */
.gp-announce {
  position: absolute; inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.gp-announce.visible {
  opacity: 1;
  pointer-events: auto;
}
.announce-text {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: .12em;
  text-transform: uppercase;
  animation: fadeIn .3s ease-out;
}

/* --- Progress bar --- */
.gp-progress-wrap {
  height: 4px;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
}
.gp-progress-wrap.hidden { opacity: 0; }
.gp-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width .15s linear;
}

/* --- V1 shared elements --- */
.v1-header {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--white-muted);
  text-align: center;
  padding: 1.2rem 0 .5rem;
  flex-shrink: 0;
}

.v1-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem;
}

.v1-placeholder-icon {
  font-size: clamp(2rem, 6vw, 3.5rem);
  opacity: .3;
}

/* --- Intro title image --- */
.v1-intro-title {
  position: absolute; inset: 0;
}
.v1-title-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Tap to play fallback --- */
.gp-tap-btn {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  padding: .8rem 2rem;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: var(--black);
  cursor: pointer;
}
.gp-tap-btn:hover { background: var(--gold-bright); }

/* ================================
   V1: Quiz
   ================================ */
.quiz-container {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(.4rem, 1.5vw, 1rem);
}

.quiz-cassette-frame {
  position: relative;
  width: min(100%, calc((100vh - 56px) * 1.315266));
  max-width: 100%;
  aspect-ratio: 1456 / 1107;
  overflow: hidden;
  background: var(--black);
}

.quiz-cassette-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.quiz-transition-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity .2s ease;
}
.quiz-transition-video.is-active {
  opacity: 1;
}

.quiz-meta {
  position: absolute;
  right: 8.5%;
  top: 26.5%;
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-body);
  font-size: clamp(.55rem, 1.4vw, .95rem);
  font-weight: 700;
  color: rgba(245, 229, 203, .9);
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  z-index: 2;
  transition: opacity .28s ease, transform .28s ease;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2.35rem);
  color: rgba(245, 229, 203, .96);
  text-align: center;
  line-height: 1.08;
  position: absolute;
  left: 19%;
  top: 18.9%;
  width: 57%;
  min-height: 7%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0,0,0,.86);
  z-index: 2;
  transition: opacity .28s ease, transform .28s ease;
}

.quiz-answers {
  position: absolute;
  inset: 0;
  z-index: 3;
  transition: opacity .28s ease, transform .28s ease;
}

.quiz-question-finished {
  top: 36%;
  align-items: center;
  font-size: clamp(1.7rem, 4.4vw, 3.2rem);
}

.quiz-answer {
  position: absolute;
  font-family: var(--font-body);
  font-size: clamp(.9rem, 1.9vw, 1.45rem);
  font-weight: 700;
  color: rgba(20, 18, 15, .92);
  background: transparent;
  border: 0;
  border-radius: 4%;
  padding: 1.1% 1.8%;
  cursor: pointer;
  transition: transform .1s;
  text-align: center;
  line-height: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.quiz-answer:hover:not(:disabled) {
  transform: scale(1.008);
}
.quiz-answer:active:not(:disabled) { transform: scale(.97); }
.quiz-answer:disabled { cursor: default; }

.quiz-answer-text {
  position: relative;
  z-index: 2;
}

.quiz-answer-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.35);
  background: radial-gradient(circle,
    rgba(255,255,255,.9) 0%,
    rgba(255,255,255,.48) 28%,
    rgba(255,255,255,.16) 58%,
    transparent 74%);
  filter: blur(1px);
}

.quiz-answer-ripple.is-active {
  animation: quizClickLight .72s ease-out forwards;
}

.quiz-answer-0 {
  left: 20.7%;
  top: 30.5%;
  width: 24.9%;
  height: 16.2%;
}
.quiz-answer-1 {
  left: 47.6%;
  top: 30.5%;
  width: 24.9%;
  height: 16.2%;
}
.quiz-answer-2 {
  left: 20.7%;
  top: 49.0%;
  width: 24.9%;
  height: 16.1%;
}
.quiz-answer-3 {
  left: 47.6%;
  top: 49.0%;
  width: 24.9%;
  height: 16.1%;
}

.quiz-answer.correct {
  background: rgba(255,255,255,.08) !important;
  opacity: 1 !important;
}
.quiz-answer.wrong {
  background: rgba(0,0,0,.05) !important;
  opacity: 1 !important;
}

.quiz-done {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
}
.quiz-final-score {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
}

/* Quiz explanation — appears after answer */
.quiz-explanation {
  font-family: var(--font-body);
  font-size: clamp(.76rem, 1.55vw, 1.08rem);
  font-weight: 700;
  color: rgba(245, 229, 203, .88);
  text-align: center;
  position: absolute;
  left: 19%;
  top: 69.1%;
  width: 57%;
  min-height: 5%;
  opacity: 0;
  transition: opacity .25s;
  line-height: 1.25;
  padding: 0 .5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  z-index: 4;
}
.quiz-explanation.visible { opacity: 1; }
.quiz-explanation.is-correct { color: #3ec9a7; }
.quiz-explanation.is-wrong   { color: #e8a838; }
.quiz-cassette-frame.is-exiting .quiz-meta,
.quiz-cassette-frame.is-exiting .quiz-question,
.quiz-cassette-frame.is-exiting .quiz-answers,
.quiz-cassette-frame.is-exiting .quiz-explanation {
  opacity: 0 !important;
  transform: translateY(-6px);
  pointer-events: none;
}
.quiz-cassette-frame.is-entering .quiz-meta,
.quiz-cassette-frame.is-entering .quiz-question,
.quiz-cassette-frame.is-entering .quiz-answers {
  animation: quizTextIn .38s ease-out both;
}

/* ================================
   V1: Geo map guesser
   ================================ */
.geo-game {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  display: block;
}

.geo-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  overflow: hidden;
  cursor: none;
  display: block;
}

.geo-map-frame.is-locked {
  cursor: default;
}

.geo-map-layer {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform .72s cubic-bezier(.2,.85,.18,1);
  will-change: transform;
}

.geo-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.geo-flag {
  background: rgba(255, 247, 226, .96);
  border: 3px solid rgba(36, 30, 58, .88);
  color: #25213e;
  clip-path: polygon(0 0, 96% 0, 100% 50%, 96% 100%, 0 100%, 3% 50%);
  box-shadow: 0 7px 0 rgba(255,255,255,.56), 0 12px 26px rgba(29,21,44,.22);
}

.geo-title {
  position: absolute;
  left: 50%;
  top: clamp(.45rem, 1.9vh, 1.05rem);
  transform: translateX(-50%);
  width: min(86vw, 920px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .04em .36em;
  padding: clamp(.42rem, 1.05vw, .72rem) clamp(1rem, 2.6vw, 2rem);
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.85vw, 2.95rem);
  font-weight: 900;
  line-height: .96;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 0 rgba(255,255,255,.75)) drop-shadow(0 7px 11px rgba(0,0,0,.22));
  pointer-events: none;
  animation: geoFlagFloat 3.4s ease-in-out infinite;
}

.geo-title-word {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.geo-title-letter {
  display: inline-block;
  color: var(--geo-letter-color);
  animation: geoLetterBounce 1.8s ease-in-out infinite;
  animation-delay: var(--geo-letter-delay);
  transform-origin: 50% 80%;
}

.geo-title-space {
  width: .42em;
}

.geo-rhythm-card {
  position: absolute;
  left: 50%;
  bottom: clamp(.6rem, 3vh, 1.5rem);
  transform: translateX(-50%) rotate(-1deg);
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .45rem .8rem;
  border-radius: 8px;
  background: rgba(255, 244, 223, .88);
  color: #25213e;
  box-shadow: 0 5px 14px rgba(0,0,0,.18);
  font-family: var(--font-body);
}

.geo-rhythm-card span {
  font-size: clamp(.55rem, 1.4vw, .8rem);
  text-transform: uppercase;
  font-weight: 800;
  color: #d93472;
}

.geo-rhythm-card strong {
  font-size: clamp(.78rem, 2.1vw, 1.15rem);
}

.geo-lens {
  position: absolute;
  width: clamp(130px, 15vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 0 0 2px rgba(20,20,40,.72), 0 0 22px rgba(255,255,255,.55);
  background-image: url("../assets/ui/geo-map.jpg");
  background-repeat: no-repeat;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
  pointer-events: none;
  z-index: 6;
  transition: opacity .12s ease, transform .12s ease;
}

.geo-lens.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.geo-map-frame.is-locked .geo-lens {
  opacity: 0;
}

.geo-lens::before,
.geo-lens::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: 0 0 5px rgba(0,0,0,.55);
  transform: translate(-50%, -50%);
}

.geo-lens::before {
  width: 88%;
  height: 2px;
}

.geo-lens::after {
  width: 2px;
  height: 88%;
}

.geo-lens {
  display: none !important;
}

.geo-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: clamp(116px, 14.5vw, 224px);
  aspect-ratio: 1;
  z-index: 30;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255,174,70,.55)) drop-shadow(0 0 18px rgba(255,255,255,.22));
  transition: opacity .12s ease, transform .12s ease;
}

.geo-cursor.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.geo-cursor-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.geo-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: none;
  z-index: 12;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.geo-panel.visible {
  opacity: 1;
}

.geo-panel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.geo-panel-content {
  position: absolute;
  left: 50%;
  top: 81.8%;
  z-index: 2;
  width: min(37vw, 535px);
  min-height: clamp(112px, 16vh, 170px);
  padding: 0 clamp(.45rem, 1.1vw, 1rem);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  justify-items: center;
  align-items: center;
  gap: .18rem;
  text-align: center;
  font-family: var(--font-array);
  font-weight: 900;
  color: #fff2d2;
  line-height: .92;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(65,24,0,.9), 0 0 16px rgba(255,146,39,.72);
  opacity: 0;
  transition: opacity .18s ease;
}

.geo-panel-content.visible {
  opacity: 1;
}

.geo-panel-content .geo-label-main {
  font-size: clamp(.76rem, 1.55vw, 1.55rem);
}

.geo-panel-content .geo-label-detail {
  font-family: var(--font-array);
  font-size: clamp(.48rem, .82vw, .7rem);
  color: #ffe3a3;
  text-shadow: 0 2px 0 rgba(65,24,0,.82), 0 0 10px rgba(255,146,39,.58);
}

.geo-click-marker,
.geo-target-marker {
  position: absolute;
  width: clamp(100px, 12vw, 190px);
  aspect-ratio: 1;
  border-radius: 0;
  z-index: 7;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72);
  pointer-events: none;
}

.geo-click-marker {
  filter: brightness(1.08);
}

.geo-target-marker {
  filter: hue-rotate(8deg) saturate(1.08) brightness(1.12);
}

.geo-marker-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255,174,70,.72)) drop-shadow(0 0 20px rgba(255,255,255,.24));
}

.geo-click-marker.visible,
.geo-target-marker.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .18s ease, transform .28s ease;
}

.geo-selection-label,
.geo-reveal-label {
  display: none;
}

.geo-selection-label,
.geo-reveal-label {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: clamp(4.6rem, 10vh, 6.6rem);
  transform: translateX(-50%) translateY(-8px) rotate(.8deg);
  z-index: 8;
  display: grid;
  gap: .16rem;
  width: max-content;
  max-width: min(88vw, 980px);
  padding: .58rem 1.3rem .66rem;
  font-family: var(--font-body);
  font-size: clamp(.95rem, 2.55vw, 1.85rem);
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .28s ease;
}

.geo-reveal-label {
  background: rgba(255, 238, 171, .96);
  max-width: min(92vw, 1160px);
  padding: clamp(.72rem, 1.8vw, 1.2rem) clamp(1.4rem, 3.2vw, 2.6rem);
  font-size: clamp(1.22rem, 3.35vw, 3.05rem);
}

.geo-reveal-label.is-success {
  background: rgba(224, 255, 199, .96);
}

.geo-label-main,
.geo-label-detail {
  display: block;
}

.geo-label-detail {
  font-family: var(--font-body);
  font-size: clamp(.68rem, 1.55vw, 1rem);
  font-weight: 900;
  letter-spacing: 0;
  color: #d93472;
}

.geo-reveal-label .geo-label-detail {
  margin-top: .14rem;
  font-size: clamp(.78rem, 1.8vw, 1.24rem);
}

.geo-selection-label.visible,
.geo-reveal-label.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(.8deg);
  animation: geoFeedbackPop .42s ease-out both;
}

.geo-map-frame.is-revealing .geo-target-marker {
  animation: geoTargetPulse .72s ease-out infinite alternate;
}

.geo-confetti {
  position: absolute;
  left: 50%;
  bottom: clamp(5.4rem, 12vh, 7.4rem);
  z-index: 9;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.geo-confetti.visible {
  opacity: 1;
}

.geo-confetti span {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(7px, 1vw, 12px);
  height: clamp(10px, 1.45vw, 18px);
  border-radius: 2px;
  background: var(--geo-confetti-color);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(.6);
}

.geo-confetti.visible span {
  animation: geoConfettiBurst .95s cubic-bezier(.12,.82,.18,1) forwards;
}

.geo-game.is-entering .geo-title,
.geo-game.is-entering .geo-rhythm-card {
  animation: quizTextIn .38s ease-out both, geoFlagFloat 3.4s ease-in-out .38s infinite;
}

.geo-game.is-entering .geo-rhythm-card {
  animation: quizTextIn .38s ease-out both;
}

/* ================================
   V1: Bet (slider)
   ================================ */
.bet-game {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  color: var(--white);
  font-family: var(--font-bet);
}

.bet-score-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.bet-panel {
  position: absolute;
  right: clamp(4.5rem, 12vw, 10rem);
  top: 50%;
  width: min(44vw, 520px);
  transform: translateY(-50%) translateX(1rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
  padding: clamp(1rem, 3vw, 2rem);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.bet-panel.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.bet-panel .v1-slider,
.bet-panel .v1-slider-range {
  width: 100%;
}

.bet-label {
  font-family: var(--font-bet);
  font-size: clamp(1.55rem, 4.55vw, 2.65rem);
  font-weight: 900;
  color: var(--bet-blue);
  line-height: .95;
  text-shadow: 0 0 12px rgba(139,223,255,.68), 0 2px 0 rgba(0,0,0,.85);
}
.bet-value {
  font-family: var(--font-bet);
  font-size: clamp(3.3rem, 9.6vw, 5.85rem);
  font-weight: 900;
  color: var(--bet-blue);
  line-height: .9;
  text-shadow: 0 0 16px rgba(139,223,255,.76), 0 3px 0 rgba(0,0,0,.9);
}
.v1-slider {
  -webkit-appearance: none;
  width: 80%;
  max-width: 350px;
  height: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  outline: none;
}
.v1-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.v1-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.v1-slider-range {
  display: flex;
  justify-content: space-between;
  width: 80%;
  max-width: 350px;
  font-size: .6rem;
  color: rgba(139,223,255,.86);
}
.v1-validate-btn {
  margin-top: .6rem;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.15vw, 1.35rem);
  font-weight: 900;
  padding: .62rem 1.5rem;
  border-radius: 8px;
  border: none;
  background: var(--bet-blue);
  color: var(--black);
  cursor: pointer;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.bet-game .v1-slider-range,
.bet-game .v1-validate-btn {
  font-family: var(--font-bet);
  font-weight: 900;
}

.v1-validate-btn:hover { background: #b8edff; }
.v1-validate-btn:active { transform: scale(.95); }
.v1-validate-btn.validated {
  background: rgba(139,223,255,.08);
  border: 1px solid rgba(139,223,255,.72);
  color: var(--bet-blue);
  cursor: default;
  text-shadow: 0 0 12px rgba(139,223,255,.68);
}
.v1-validate-btn:disabled { opacity: 1; }

.bet-panel.answered .bet-label,
.bet-value.validated {
  color: var(--bet-blue);
}

.bet-panel.answered .v1-slider,
.bet-panel.answered .v1-slider-range {
  opacity: .72;
}


/* ================================
   V1: Reveal image
   ================================ */
.v1-reveal-image-only {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.score-reveal-image {
  width: min(82%, 820px);
  max-height: 86%;
  object-fit: contain;
  display: block;
  animation: scoreRevealDrop .82s cubic-bezier(.18,.88,.2,1.04) both;
}
.score-reveal-menu {
  position: absolute;
  right: clamp(.85rem, 2vw, 1.35rem);
  bottom: clamp(.65rem, 1.6vw, 1.05rem);
  z-index: 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: #000;
  font-family: var(--font-array);
  font-size: clamp(.78rem, 1.45vw, 1.05rem);
  font-weight: 400;
  line-height: 1;
  padding: .25rem;
  cursor: pointer;
  text-transform: lowercase;
}

.score-reveal-menu:hover,
.score-reveal-menu:focus-visible {
  text-decoration: underline;
  outline: none;
}

@keyframes scoreRevealDrop {
  0% {
    transform: translateY(-118vh);
  }
  72% {
    transform: translateY(2.4vh);
  }
  100% {
    transform: translateY(0);
  }
}


/* ================================
   V1: Lyrics timing
   ================================ */
.lyrics-game {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #030303;
  color: var(--white);
  isolation: isolate;
}

.lyrics-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.lyrics-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 203, 0, .16), transparent 34%),
    linear-gradient(rgba(0,0,0,.34), rgba(0,0,0,.5)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 5px);
  opacity: 1;
  pointer-events: none;
}

.lyrics-instruction {
  position: absolute;
  z-index: 2;
  top: clamp(2.1rem, 8vh, 4.2rem);
  left: 50%;
  width: min(86%, 720px);
  transform: translateX(-50%);
  font-family: var(--font-array);
  font-size: clamp(.95rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
  color: rgba(242,239,234,.88);
  text-transform: uppercase;
  text-wrap: balance;
}

.lyrics-feedback {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  width: min(84%, 760px);
  min-height: clamp(4rem, 14vh, 7rem);
  transform: translate(-50%, -50%) scale(.98);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-array-wide);
  font-size: clamp(1.7rem, 5.8vw, 4.05rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(255, 207, 24, .34);
  -webkit-text-stroke: clamp(1px, .22vw, 3px) rgba(0,0,0,.78);
  pointer-events: none;
  text-wrap: balance;
  transition: opacity .18s var(--ease-smooth), transform .18s var(--ease-smooth), color .18s var(--ease-smooth);
}

.lyrics-feedback::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -42% -12%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 204, 0, .46) 0%, rgba(255, 204, 0, .22) 38%, transparent 72%);
  filter: blur(30px);
  opacity: 0;
  transform: scale(.88);
  transition: opacity .2s var(--ease-smooth), transform .2s var(--ease-smooth);
}

.lyrics-feedback.is-hit {
  color: #ffd119;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  text-shadow:
    0 2px 0 rgba(255,247,160,.8),
    0 0 14px rgba(255, 210, 24, .86),
    0 0 38px rgba(255, 190, 0, .54),
    0 0 84px rgba(255, 168, 0, .28);
  animation: lyricsHitPulse .56s var(--ease-out) both;
}

.lyrics-feedback.is-hit::before {
  opacity: 1;
  transform: scale(1);
}

.lyrics-feedback.is-miss {
  color: rgba(242,239,234,.55);
  opacity: .65;
  text-shadow: none;
}

.lyrics-hit-list {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(1.5rem, 7vh, 4rem);
  width: min(80%, 680px);
  max-height: 28%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  overflow: hidden;
  pointer-events: none;
}

.lyrics-line {
  max-width: 100%;
  font-family: var(--font-array-wide);
  font-size: clamp(.9rem, 2vw, 1.2rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  color: #ffd119;
  -webkit-text-stroke: 1px rgba(0,0,0,.72);
  text-shadow: 0 0 10px rgba(255, 210, 24, .66), 0 0 26px rgba(255, 178, 0, .28);
  opacity: .88;
  animation: lyricsLineIn .34s var(--ease-out) both;
}

@keyframes lyricsHitPulse {
  0% { transform: translate(-50%, -50%) scale(.9); filter: brightness(1.35); }
  100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes lyricsLineIn {
  from { transform: translateY(.55rem); opacity: 0; }
  to { transform: translateY(0); opacity: .88; }
}

/* ================================
   V1: Drum kit
   ================================ */
.rt-container {
  position: absolute;
  inset: 0;
  font-family: var(--font-array);
  background: #000;
  overflow: hidden;
  isolation: isolate;
}

.rt-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.rt-animation-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}

.rt-hit-animation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.rt-hit-count {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ================================
   Cinematic Intro (loop → transition → PNG)
   ================================ */
.cinematic-layer {
  position: absolute; inset: 0;
  background: var(--black);
}
.cinematic-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
  transition: opacity .3s;
}

/* PNG animation overlay — transparent, above everything */
#overlay-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
  background: transparent;
}
#overlay-container.is-active {
  display: block;
}
.overlay-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* ================================
   Animations
   ================================ */
@keyframes rtLayerPop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes quizClickLight {
  0%   { opacity: .95; transform: translate(-50%, -50%) scale(.25); }
  55%  { opacity: .42; transform: translate(-50%, -50%) scale(5.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}
@keyframes quizTextIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes geoLetterBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  35%      { transform: translateY(-7px) rotate(2deg); }
  65%      { transform: translateY(2px) rotate(-2deg); }
}
@keyframes geoFlagFloat {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-.45deg); }
  50%      { transform: translateX(-50%) translateY(7px) rotate(.45deg); }
}
@keyframes geoFeedbackPop {
  from { opacity: 0; transform: translateX(-50%) scale(.82) rotate(-2deg); }
  to   { opacity: 1; transform: translateX(-50%) scale(1) rotate(.8deg); }
}
@keyframes geoTargetPulse {
  from { box-shadow: 0 0 0 2px rgba(255,255,255,.8), 0 0 16px rgba(217,52,114,.55); }
  to   { box-shadow: 0 0 0 5px rgba(255,255,255,.92), 0 0 28px rgba(217,52,114,.78); }
}
@keyframes geoConfettiBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(.55);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--geo-confetti-x)), calc(-50% + var(--geo-confetti-y))) rotate(var(--geo-confetti-rot)) scale(1);
  }
}
