/* ═══════════════════════════════════════════════════
   Guessing Game — Styles
   ═══════════════════════════════════════════════════ */

/* ── Multiplier Badge ─────────────────────────────── */
.multiplier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid;
  position: relative;
  overflow: hidden;
}

.multiplier-badge .multiplier-icon {
  font-size: 1.1rem;
}

.multiplier-badge .multiplier-value {
  font-size: 1.3rem;
  font-weight: 900;
}

.multiplier-badge .multiplier-label {
  font-size: 0.65rem;
  opacity: 0.7;
  font-weight: 600;
}

.multiplier-4x {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.2), inset 0 0 15px rgba(250, 204, 21, 0.05);
  animation: multiplierGlow4x 1.5s ease-in-out infinite;
}

.multiplier-3x {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2), inset 0 0 15px rgba(34, 197, 94, 0.05);
  animation: multiplierGlow3x 1.5s ease-in-out infinite;
}

.multiplier-2x {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), inset 0 0 15px rgba(59, 130, 246, 0.05);
  animation: multiplierGlow2x 1.5s ease-in-out infinite;
}

.multiplier-1x {
  background: rgba(156, 163, 175, 0.15);
  border-color: rgba(156, 163, 175, 0.4);
  color: #9ca3af;
  box-shadow: none;
}

@keyframes multiplierGlow4x {
  0%, 100% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.2); }
  50%      { box-shadow: 0 0 35px rgba(250, 204, 21, 0.4); }
}

@keyframes multiplierGlow3x {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.2); }
  50%      { box-shadow: 0 0 35px rgba(34, 197, 94, 0.4); }
}

@keyframes multiplierGlow2x {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.2); }
  50%      { box-shadow: 0 0 35px rgba(59, 130, 246, 0.4); }
}

.multiplier-pop {
  animation: multiplierPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes multiplierPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ── Clue Cards ───────────────────────────────────── */
.clue-card {
  perspective: 800px;
  height: 80px;
  cursor: default;
}

.clue-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.clue-card.revealed .clue-card-inner {
  transform: rotateY(180deg);
}

.clue-front, .clue-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
}

.clue-front {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.8) 0%, rgba(31, 41, 55, 0.9) 100%);
  border: 2px solid rgba(75, 85, 99, 0.5);
}

.clue-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  border: 2px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #818cf8;
}

.clue-lock {
  font-size: 1.2rem;
  opacity: 0.5;
}

.clue-back {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 2px solid rgba(99, 102, 241, 0.4);
  transform: rotateY(180deg);
  flex-direction: column;
}

.clue-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
  text-align: center;
  line-height: 1.4;
}

/* Clue reveal glow effect */
.clue-card.just-revealed .clue-card-inner {
  animation: clueRevealGlow 0.8s ease-out;
}

@keyframes clueRevealGlow {
  0%   { filter: drop-shadow(0 0 0 transparent); }
  30%  { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6)); }
  100% { filter: drop-shadow(0 0 0 transparent); }
}

/* ── Option Buttons ───────────────────────────────── */
.guess-option {
  background: rgba(31, 41, 55, 0.8);
  border: 2px solid rgba(75, 85, 99, 0.5);
  border-radius: 12px;
  padding: 14px 10px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.guess-option:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.guess-option:active {
  transform: scale(0.97);
}

.guess-option.selected {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.2);
  pointer-events: none;
}

.guess-option.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.guess-option.correct-reveal {
  border-color: rgba(34, 197, 94, 0.8) !important;
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
}

.guess-option.wrong-reveal {
  border-color: rgba(239, 68, 68, 0.5) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #f87171 !important;
}

/* ── Answered Waiting Area ────────────────────────── */
.guessing-answered-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guessing-answered-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  animation: answeredGlow 2s ease-in-out infinite;
}

@keyframes answeredGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.2); opacity: 1; }
}

.guessing-answered-emoji {
  font-size: 3rem;
  line-height: 1;
  z-index: 2;
  animation: answeredBounce 2s ease-in-out infinite;
}

@keyframes answeredBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ── Quick Verdict Flash ──────────────────────────── */
.quick-verdict-glow {
  position: absolute;
  inset: 0;
  transition: background 0.3s;
}

.quick-verdict-correct .quick-verdict-glow {
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.2) 0%, transparent 70%);
}

.quick-verdict-wrong .quick-verdict-glow {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
}

.quick-verdict-correct {
  border: 2px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.15), inset 0 0 30px rgba(34, 197, 94, 0.05);
  animation: quickVerdictPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.quick-verdict-wrong {
  border: 2px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.15), inset 0 0 30px rgba(239, 68, 68, 0.05);
  animation: quickVerdictPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes quickVerdictPop {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.quick-verdict-icon {
  animation: verdictIconDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes verdictIconDrop {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(5deg); opacity: 1; }
  80%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.quick-verdict-exit {
  animation: quickVerdictExit 0.4s ease-in forwards;
}

@keyframes quickVerdictExit {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.9) translateY(-15px); opacity: 0; }
}

/* ── Result Feedback ──────────────────────────────── */
.result-icon-anim {
  animation: resultIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultIconPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

.total-score-anim {
  animation: totalScorePulse 0.6s ease-out 0.3s both;
}

@keyframes totalScorePulse {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.correct-glow {
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.15), inset 0 0 20px rgba(34, 197, 94, 0.05);
}

.wrong-shake {
  animation: wrongShake 0.5s ease-out;
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ── Reveal Screen ────────────────────────────────── */
.reveal-header {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, transparent 100%);
}

.reveal-header-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.reveal-answer-badge {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.4);
  border-radius: 12px;
  padding: 8px 20px;
}

.reveal-clue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.3);
  animation: revealClueSlide 0.3s ease-out both;
}

.reveal-clue-item:nth-child(1) { animation-delay: 0.1s; }
.reveal-clue-item:nth-child(2) { animation-delay: 0.2s; }
.reveal-clue-item:nth-child(3) { animation-delay: 0.3s; }
.reveal-clue-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes revealClueSlide {
  0%   { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.reveal-clue-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #818cf8;
  flex-shrink: 0;
}

/* ── Finished Screen ──────────────────────────────── */
.finished-confetti-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(250, 204, 21, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 50%);
  animation: finishedShimmer 3s ease-in-out infinite;
}

@keyframes finishedShimmer {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
