/* Friendsgiving Gratitude Guessing Game Styles */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..800;1,9..144,400..700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --autumn-bg-start: #1c110b;
  --autumn-bg-mid: #2b1810;
  --autumn-bg-end: #160e0a;
  --amber-gold: #f59e0b;
  --pumpkin-orange: #ea580c;
  --warm-crimson: #991b1b;
  --cozy-cream: #fef3c7;
  --card-bg: rgba(38, 22, 14, 0.85);
  --card-border: rgba(245, 158, 11, 0.25);
  --card-glow: rgba(245, 158, 11, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 50% 10%, #3b1d11 0%, #1a0f0a 60%, #0d0705 100%);
  min-height: 100vh;
  color: #fdfaf6;
  overflow-x: hidden;
  position: relative;
}

.font-serif-display {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: 'swsh' 1;
}

.font-fun {
  font-family: 'Outfit', sans-serif;
}

/* Subtle Thanksgiving Autumn Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.18) 0%, rgba(245, 158, 11, 0.08) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Autumn Falling Leaves Canvas / Container */
#leaves-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.leaf {
  position: absolute;
  top: -40px;
  opacity: 0.7;
  user-select: none;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(80px);
    opacity: 0;
  }
}

/* Glassmorphism Card Style */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6), 0 0 30px var(--card-glow);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.glass-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

/* 3D Flip Card Container */
.perspective-container {
  perspective: 1400px;
}

.flip-card {
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  position: relative;
  min-height: 440px;
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
}

.card-back {
  transform: rotateY(180deg);
}

/* AI Impostor Glitch Pulse */
@keyframes aiPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3), inset 0 0 20px rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.6);
  }
  50% {
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.5), inset 0 0 30px rgba(236, 72, 153, 0.25);
    border-color: rgba(236, 72, 153, 0.8);
  }
}

.ai-card-glow {
  animation: aiPulse 3s infinite ease-in-out;
}

/* Friend Reveal Golden Pulse */
@keyframes friendPulse {
  0%, 100% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.35), inset 0 0 15px rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.6);
  }
  50% {
    box-shadow: 0 0 45px rgba(234, 88, 12, 0.5), inset 0 0 25px rgba(234, 88, 12, 0.2);
    border-color: rgba(234, 88, 12, 0.85);
  }
}

.friend-card-glow {
  animation: friendPulse 3s infinite ease-in-out;
}

/* Reveal Popup Animations */
@keyframes popupEntrance {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(24px);
  }
  60% {
    opacity: 1;
    transform: scale(1.02) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-enter {
  animation: popupEntrance 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Custom button press effects */
.btn-press {
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-press:active {
  transform: scale(0.97);
}

/* Custom Scrollbar for modesty */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 10, 5, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}
