/* CSS stylesheet for Family Feud Graduation Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Playfair+Display:ital,wght@0,600;0,800;1,700&family=Cinzel:wght@500;700;900&display=swap');

:root {
  --primary-gradient: linear-gradient(to bottom, #0f172a, #020617);
  --board-card-bg: #0f172a;
  --text-color: #fef3c7; /* amber-100 */
  --accent-color: #f59e0b; /* amber-500 */
  --accent-rgb: 245, 158, 11;
  --font-title: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

body {
  font-family: var(--font-sans);
  background: var(--primary-gradient);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

.font-title {
  font-family: var(--font-title);
}

/* --- Elegant Graduation Borders --- */
.diploma-border {
  border: 2px double var(--accent-color);
  position: relative;
}

.diploma-border::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  pointer-events: none;
}

/* --- 3D Flip Card System --- */
.flip-card-container {
  perspective: 1000px;
  min-height: 80px; /* Auto-expanding minimum height for boards */
  width: 100%;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

/* State classes */
.flip-card-container.revealed .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari support */
  backface-visibility: hidden;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Front: Hidden Answer (Numbered card) */
.flip-card-front {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(var(--accent-rgb), 0.4);
  color: #fff;
  cursor: pointer;
}

.flip-card-front:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3);
}

/* Back: Revealed Answer (Text + Points) */
.flip-card-back {
  background: linear-gradient(135deg, var(--board-card-bg) 0%, #1e293b 100%);
  border: 2px solid var(--accent-color);
  transform: rotateY(180deg);
  justify-content: space-between;
  padding: 0 1.5rem;
}

/* --- Neon Strike Overlay & Animations --- */
.strike-overlay {
  background: rgba(0, 0, 0, 0.9);
  z-index: 100;
  display: none; /* Managed by JS */
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.strike-box {
  background: rgba(15, 23, 42, 0.95);
  border: 5px solid #ef4444; /* Red neon */
  box-shadow: 0 0 30px #ef4444, inset 0 0 20px #ef4444;
}

/* Shaking keyframe for incorrect answers */
.animate-shake {
  animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(6px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-12px, 0, 0); }
  40%, 60% { transform: translate3d(12px, 0, 0); }
}

/* --- Gold Confetti Particles background --- */
.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  display: block;
  pointer-events: none;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  border-radius: 50%;
  opacity: 0.35;
  animation: floatUp 15s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* --- Pulse Glowing Effect --- */
.glow-accent {
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.4);
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
    border-color: rgba(var(--accent-rgb), 0.4);
  }
  100% {
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.7);
    border-color: var(--accent-color);
  }
}

/* Glassmorphism panels */
.glass-panel {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}
