/* ============================================================
   Rapid Fire — styles
   Fast-paced multiple-choice quiz arcade
   ============================================================ */

#rf-wrap {
  flex: 1; overflow: hidden;
  background: #0D0A06;
  display: flex; flex-direction: column;
  font-family: 'Inter', sans-serif;
  position: relative;
}

/* ── Screens ── */
.rf-screen { display: none; flex-direction: column; align-items: center;
             justify-content: center; height: 100%; padding: 2rem 1.5rem; }
.rf-screen.active { display: flex; }

/* ── Menu ── */
.rf-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 7vw, 72px); font-weight: 300;
  color: #F6F2EB; letter-spacing: -1px; text-align: center; line-height: 1;
  margin-bottom: 0.25rem;
}
.rf-logo span { color: #c9a44a; }
.rf-tagline {
  font-size: 11px; color: rgba(246,242,235,0.35); letter-spacing: 3px;
  text-transform: uppercase; text-align: center; margin-bottom: 2.5rem;
}
.rf-packs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px; width: 100%; max-width: 700px; margin-bottom: 1.75rem;
}
.rf-pack {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(217,208,190,0.1);
  padding: 1rem; cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; gap: 10px;
}
.rf-pack:hover { background: rgba(255,255,255,0.08); border-color: rgba(201,164,74,0.35); }
.rf-pack.selected { background: rgba(201,164,74,0.1); border-color: rgba(201,164,74,0.55); }
.rf-pack-icon { font-size: 24px; flex-shrink: 0; }
.rf-pack-info { min-width: 0; }
.rf-pack-name { font-size: 14px; color: #e8dcc8; margin-bottom: 2px; font-family: 'Cormorant Garamond', serif; }
.rf-pack-count { font-size: 9px; letter-spacing: 1px; color: rgba(201,164,74,0.6); text-transform: uppercase; }

.rf-play-btn {
  font-size: 13px; padding: 13px 52px; cursor: pointer;
  background: #c9a44a; border: none; color: #0D0A06;
  font-family: 'Inter', sans-serif; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  transition: background 0.25s, transform 0.2s;
}
.rf-play-btn:hover { background: #e0bc64; transform: translateY(-2px); }
.rf-play-btn:disabled { opacity: 0.3; cursor: default; transform: none; }

/* ── Countdown ── */
.rf-countdown {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(80px, 18vw, 160px); font-weight: 300; color: #c9a44a;
  text-align: center; line-height: 1;
  animation: rf-count-pop 0.45s cubic-bezier(0.16,1,0.3,1);
}
.rf-countdown-label {
  font-size: 11px; letter-spacing: 3px; color: rgba(246,242,235,0.35);
  text-transform: uppercase; margin-top: 0.5rem;
}
@keyframes rf-count-pop {
  from { opacity: 0; transform: scale(1.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Game screen ── */
.rf-hud {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 1.5rem; border-bottom: 1px solid rgba(217,208,190,0.08);
  flex-shrink: 0;
}
.rf-score-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; color: #c9a44a; line-height: 1; font-weight: 300;
}
.rf-score-lbl { font-size: 9px; letter-spacing: 2px; color: rgba(246,242,235,0.3); text-transform: uppercase; }
.rf-streak-badge {
  font-size: 12px; font-weight: 700; padding: 3px 12px;
  border: 1px solid rgba(201,164,74,0.3); color: #c9a44a;
  letter-spacing: 1px; opacity: 0; transition: opacity 0.2s;
}
.rf-streak-badge.show { opacity: 1; }
.rf-lives { font-size: 18px; letter-spacing: 3px; }

/* Time bar */
.rf-timebar-wrap {
  height: 5px; width: 100%; background: rgba(255,255,255,0.06); flex-shrink: 0;
}
.rf-timebar {
  height: 100%; background: #c9a44a;
  transition: width 0.1s linear, background 0.3s;
}
.rf-timebar.warning { background: #d47a30; }
.rf-timebar.danger  { background: #cc4040; }

/* Question area */
.rf-question-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem 1.5rem 0;
  overflow: hidden;
}
.rf-q-number {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(246,242,235,0.3); margin-bottom: 0.75rem;
}
.rf-question {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 3.5vw, 28px); color: #F6F2EB; font-weight: 300;
  text-align: center; line-height: 1.5; max-width: 580px;
  animation: rf-q-in 0.3s cubic-bezier(0.16,1,0.3,1);
}
.rf-question strong { color: #c9a44a; font-style: italic; }
@keyframes rf-q-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Answers */
.rf-answers {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; width: 100%; max-width: 600px;
  padding: 1.25rem 1.5rem 1.5rem;
  flex-shrink: 0;
}
.rf-answer {
  padding: 13px 14px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(217,208,190,0.12);
  color: rgba(246,242,235,0.75); font-size: 13px; font-family: 'Inter', sans-serif;
  text-align: left; line-height: 1.4;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  display: flex; align-items: center; gap: 10px;
}
.rf-answer:hover:not(.disabled) {
  background: rgba(255,255,255,0.09); border-color: rgba(201,164,74,0.35); color: #e8dcc8;
}
.rf-answer.disabled { pointer-events: none; }
.rf-answer.correct {
  background: rgba(30,80,30,0.5); border-color: rgba(106,135,82,0.7); color: #a8d890;
}
.rf-answer.wrong {
  background: rgba(100,20,20,0.5); border-color: rgba(180,50,50,0.6); color: #e08080;
}
.rf-answer-key {
  font-size: 10px; font-weight: 700; color: rgba(201,164,74,0.5);
  letter-spacing: 1px; flex-shrink: 0; width: 16px;
  font-family: 'Cormorant Garamond', serif;
}
.rf-answer.correct .rf-answer-key { color: #6A8752; }
.rf-answer.wrong   .rf-answer-key { color: #cc4040; }

/* Feedback flash */
.rf-feedback {
  position: absolute; inset: 0;
  pointer-events: none; opacity: 0;
  transition: opacity 0.12s;
  border: 3px solid transparent;
}
.rf-feedback.correct { border-color: rgba(106,135,82,0.5); opacity: 1; }
.rf-feedback.wrong   { border-color: rgba(180,50,50,0.5);  opacity: 1; }

/* Score popup */
.rf-score-pop {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 300;
  pointer-events: none; z-index: 50;
  animation: rf-pop-up 0.7s forwards;
}
.rf-score-pop.pos { color: #c9a44a; top: 30%; }
.rf-score-pop.neg { color: #cc4040; top: 30%; }
@keyframes rf-pop-up {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.7); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(-10px) scale(1.1); }
  70%  { opacity: 1; transform: translateX(-50%) translateY(-30px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px) scale(0.9); }
}

/* ── Game Over ── */
.rf-over-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 6vw, 64px); font-weight: 300; color: #F6F2EB;
  text-align: center; margin-bottom: 0.3rem; letter-spacing: -0.5px;
}
.rf-final-score {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(56px, 10vw, 96px); font-weight: 300; color: #c9a44a;
  line-height: 1; margin: 0.5rem 0;
}
.rf-over-stats {
  display: flex; gap: 2.5rem; margin: 1rem 0 2rem;
  flex-wrap: wrap; justify-content: center;
}
.rf-over-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rf-over-val { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: #e8dcc8; font-weight: 300; }
.rf-over-lbl { font-size: 9px; letter-spacing: 2px; color: rgba(246,242,235,0.35); text-transform: uppercase; }
.rf-over-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rf-over-btn {
  font-size: 12px; padding: 11px 30px; cursor: pointer;
  border: 1px solid rgba(217,208,190,0.22); background: transparent;
  color: rgba(246,242,235,0.6); font-family: 'Inter', sans-serif;
  letter-spacing: 1px; text-transform: uppercase; transition: all 0.22s;
}
.rf-over-btn:hover { color: #e8dcc8; border-color: rgba(201,164,74,0.5); }
.rf-over-btn.primary { background: #c9a44a; border-color: #c9a44a; color: #0D0A06; font-weight: 700; }
.rf-over-btn.primary:hover { background: #e0bc64; }

/* ── Speed indicator ── */
.rf-speed {
  font-size: 9px; letter-spacing: 2px; color: rgba(246,242,235,0.28);
  text-transform: uppercase; text-align: center; padding: 4px 0 0;
}

@media (max-width: 480px) {
  .rf-answers { grid-template-columns: 1fr; gap: 6px; padding: 1rem; }
}
