/* Custom CSS for Wing Link Association Lottery */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #131b2f;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --gold: #fbbf24;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
}

/* Hide scrollbar for cleanly designed lists */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Military Tactical Animated Background */
.military-bg {
  background-color: #050a15;
  background-image: 
    linear-gradient(rgba(30, 41, 59, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.5) 1px, transparent 1px);
  background-size: 50px 50px;
  position: relative;
}

.military-bg::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, #02040a 90%);
  pointer-events: none;
  z-index: 1;
}

/* Radar vertical sweep animation */
.military-bg::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 200%;
  background: linear-gradient(to bottom, 
    transparent 45%, 
    rgba(59, 130, 246, 0.05) 49.8%, 
    rgba(59, 130, 246, 0.4) 50%, 
    rgba(59, 130, 246, 0.05) 50.2%, 
    transparent 55%);
  animation: radarSweep 8s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes radarSweep {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(50%); }
}

/* Ensure contents stay above the background effects */
.military-bg > *:not(#confetti-canvas):not(#bg-layer) {
  z-index: 10;
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes jet-flyby {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
    10% { opacity: 0.2; }
    90% { opacity: 0.2; }
    100% { transform: translate(120vw, -120vh) scale(2.5); opacity: 0; }
}

/* Glassmorphism utilities */
.glass {
  background: rgba(19, 27, 47, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 3D Flip Card Styles */
.flip-card {
  perspective: 1000px;
  width: 100%;
  max-width: 600px;
  height: 350px;
  margin: 0 auto;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 1.2s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

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

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.flip-card-front {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 30px var(--accent-glow);
}

.flip-card-front::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle at center, rgba(59,130,246,0.15) 0%, transparent 70%);
}

.flip-card-back {
  background: linear-gradient(145deg, #1e1b4b, #312e81);
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 50px var(--accent-glow); }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite;
}

.winner-name {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
  width: 90%;
  text-align: center;
  word-wrap: break-word;
}

/* Shuffling Animation */
.shuffling-text {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.8;
  filter: blur(0px);
  transition: all 0.1s;
  width: 90%;
  text-align: center;
  word-wrap: break-word;
}

.is-shuffling .shuffling-text {
  filter: blur(1px);
  transform: scale(1.02);
}

/* Confetti layer */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}
