/* ===============================================
   WHEEL QUIZZ — FDJ Style
   =============================================== */

:root {
  --fdj-blue: #0032A0;
  --fdj-blue-dark: #001E5C;
  --fdj-red: #E4002B;
  --fdj-yellow: #FFC300;
  --fdj-green: #00A651;
  --fdj-cyan: #00AEEF;
  --fdj-white: #FFFFFF;
  --fdj-grey: #58585A;
  --fdj-bg: #0A0E2A;
  --fdj-panel-bg: #0D1233;
}

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

body {
  background: #000;
  overflow: hidden;
  cursor: default;
  font-family: 'Space Grotesk', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* --- 16/9 Container --- */
#container {
  position: absolute;
  top: 50%; left: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  display: flex;
  overflow: hidden;
  background: var(--fdj-bg);
}

#video {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ===============================================
   LEFT PANEL — Quiz (30%)
   =============================================== */
#quiz-panel {
  width: 576px;
  height: 1080px;
  flex-shrink: 0;
  background: var(--fdj-panel-bg);
  border-right: 2px solid rgba(255,255,255,0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* --- Start Screen --- */
#start-screen {
  text-align: center;
  padding: 40px;
}

.logo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 8px;
  line-height: 1.1;
  color: var(--fdj-white);
  text-shadow: 0 0 40px rgba(0,50,160,0.6), 0 0 80px rgba(0,50,160,0.3);
  margin-bottom: 40px;
}

.start-sub {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  line-height: 1.6;
  margin-bottom: 50px;
  padding: 0 20px;
}

.loading-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fdj-yellow);
  margin: 20px auto 0;
  animation: pulse 1.5s infinite;
}
.loading-dot.ready { background: var(--fdj-green); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* --- Test button (temporary) --- */
.btn-test {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-test:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.25); }

/* --- Buttons --- */
.btn-primary {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--fdj-white);
  background: var(--fdj-blue);
  border: none;
  padding: 20px 50px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}
.btn-primary:active {
  transform: scale(0.96);
  background: var(--fdj-blue-dark);
}

/* --- Screens --- */
.screen { width: 100%; height: 100%; padding: 40px; display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* --- Quiz Progress Bar --- */
#quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  margin-bottom: 40px;
  overflow: hidden;
}
#quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fdj-blue), var(--fdj-cyan));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* --- Question --- */
#question-number {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--fdj-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

#question-text {
  font-size: 28px;
  font-weight: 600;
  color: var(--fdj-white);
  line-height: 1.4;
  margin-bottom: 40px;
  flex-shrink: 0;
}

/* --- Choices --- */
#choices {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.choice-btn {
  width: 100%;
  padding: 22px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--fdj-white);
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  gap: 16px;
}
.choice-btn:active {
  transform: scale(0.98);
}
.choice-btn .choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  flex-shrink: 0;
}

.choice-btn.selected {
  border-color: var(--fdj-cyan);
  background: rgba(0,174,239,0.1);
}
.choice-btn.correct {
  border-color: var(--fdj-green);
  background: rgba(0,166,81,0.15);
  color: var(--fdj-green);
}
.choice-btn.wrong {
  border-color: var(--fdj-red);
  background: rgba(228,0,43,0.12);
  color: var(--fdj-red);
}
.choice-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.choice-btn.correct .choice-letter { background: var(--fdj-green); color: #fff; }
.choice-btn.wrong .choice-letter { background: var(--fdj-red); color: #fff; }

/* --- Feedback --- */
#feedback {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  text-align: center;
  padding: 16px 0;
  min-height: 50px;
}
#feedback.correct { color: var(--fdj-green); }
#feedback.wrong { color: var(--fdj-red); }

/* --- Result Screen --- */
#result-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}
#result-icon {
  font-size: 80px;
  margin-bottom: 30px;
}
#result-text {
  font-size: 32px;
  font-weight: 700;
  color: var(--fdj-white);
  line-height: 1.4;
  margin-bottom: 16px;
}
#result-score {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  margin-bottom: 40px;
}

/* --- Prize Screen --- */
#prize-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}
#prize-icon {
  font-size: 80px;
  margin-bottom: 30px;
}
#prize-text {
  font-size: 36px;
  font-weight: 700;
  color: var(--fdj-yellow);
  line-height: 1.4;
  margin-bottom: 40px;
  text-shadow: 0 0 30px rgba(255,195,0,0.4);
}

/* ===============================================
   RIGHT PANEL — Wheel (70%)
   =============================================== */
#wheel-panel {
  flex: 1;
  height: 1080px;
  position: relative;
  overflow: hidden;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Pointer (hidden — ball determines result now) --- */
#wheel-pointer {
  display: none;
}

/* --- Wheel instruction text --- */
#wheel-instruction {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
  text-align: center;
  animation: fadeInOut 2s infinite;
  z-index: 20;
}
@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ===============================================
   ANIMATIONS
   =============================================== */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen:not(.hidden) {
  animation: slideIn 0.3s ease;
}
