/* Christmas slot machine look. Layout utilities come from tailwind.css. */

body {
  font-family: 'Inter', sans-serif;
  background-color: #090d0b;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(220, 38, 38, 0.24) 0%, transparent 52%),
    radial-gradient(circle at 18% 72%, rgba(6, 95, 70, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.16) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, #16090b 0%, #060b09 100%);
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
}

.font-casino { font-family: 'Cinzel Decorative', serif; }

/* Falling snow */
@keyframes snowfall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { transform: translate3d(var(--drift, 30px), 110vh, 0) rotate(360deg); opacity: 0; }
}
.snowflake {
  position: fixed;
  top: -20px;
  color: #ffffff;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  animation: snowfall linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .snowflake { display: none; }
}

.gold-bezel {
  background: linear-gradient(145deg, #fce28b 0%, #d4962a 20%, #7f1d1d 48%, #eab64d 78%, #6e4206 100%);
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.9),
    0 0 36px rgba(220, 38, 38, 0.28),
    0 0 20px rgba(245, 185, 66, 0.25),
    inset 0 2px 3px rgba(255, 250, 210, 0.85),
    inset 0 -3px 6px rgba(58, 32, 2, 0.95);
}

.xmas-panel {
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.35) 0%, transparent 65%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 4px, transparent 4px, transparent 10px),
    linear-gradient(180deg, #3b0d11 0%, #1c100f 52%, #0a241b 100%);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}

.marquee-arch {
  background: radial-gradient(ellipse at 50% 100%, #991b1b 0%, #450a0a 72%, #1f0404 100%);
  border: 3px solid #f5b942;
  box-shadow: 0 -4px 24px rgba(245, 185, 66, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.85);
}

.marquee-title {
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 45%, #f59e0b 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(251, 191, 36, 0.65));
}

/* Twinkling red / green / gold / white bulbs */
@keyframes xmasTwinkleA {
  0%, 100% { opacity: 1; transform: scale(1.12); filter: brightness(1.3); }
  50% { opacity: 0.42; transform: scale(0.88); filter: brightness(0.75); }
}
@keyframes xmasTwinkleB {
  0%, 100% { opacity: 0.42; transform: scale(0.88); filter: brightness(0.75); }
  50% { opacity: 1; transform: scale(1.12); filter: brightness(1.3); }
}
.xmas-bulb:nth-child(4n+1) { background: #ef4444; box-shadow: 0 0 8px #ef4444, 0 0 14px #dc2626; animation: xmasTwinkleA 1.1s infinite ease-in-out; }
.xmas-bulb:nth-child(4n+2) { background: #10b981; box-shadow: 0 0 8px #10b981, 0 0 14px #059669; animation: xmasTwinkleB 1.1s infinite ease-in-out; }
.xmas-bulb:nth-child(4n+3) { background: #facc15; box-shadow: 0 0 8px #facc15, 0 0 14px #eab308; animation: xmasTwinkleA 1.1s infinite ease-in-out 0.25s; }
.xmas-bulb:nth-child(4n+4) { background: #fffbeb; box-shadow: 0 0 8px #fffbeb, 0 0 14px #fde68a; animation: xmasTwinkleB 1.1s infinite ease-in-out 0.25s; }
.fast-bulbs .xmas-bulb { animation-duration: 0.26s !important; }

.reel-window {
  background: #120c0c;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(255, 230, 150, 0.35);
}

.reel-drum {
  background: linear-gradient(180deg, #78716c 0%, #f5f5f4 12%, #fffbeb 28%, #fffbeb 72%, #e7e5e4 88%, #57534e 100%);
  box-shadow:
    inset 0 18px 22px -6px rgba(0, 0, 0, 0.68),
    inset 0 -18px 22px -6px rgba(0, 0, 0, 0.68),
    inset 4px 0 8px rgba(0, 0, 0, 0.22),
    inset -4px 0 8px rgba(0, 0, 0, 0.22);
}

.glass-glare {
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.07) 32%, transparent 33%, transparent 100%);
  pointer-events: none;
}

.payline-glow { box-shadow: 0 0 8px #fde047, 0 0 16px #ef4444, 0 0 24px #f59e0b; }

.reel-cell { display: flex; align-items: center; justify-content: center; }
.reel-cell img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* Candy-cane lever */
.candy-cane-shaft {
  background: repeating-linear-gradient(-45deg, #dc2626 0px, #dc2626 6px, #ffffff 6px, #ffffff 12px);
}
.lever-arm { transform-origin: bottom center; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lever-arm.pulled { transform: rotateX(58deg) scaleY(0.75); }

/* Festive buttons with shimmer */
@keyframes btnShimmer {
  0% { transform: translateX(-140%) skewX(-20deg); }
  100% { transform: translateX(260%) skewX(-20deg); }
}
.spin-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 48%, #d97706 100%);
  box-shadow: 0 6px 0 #5c0f0f, 0 10px 26px rgba(220, 38, 38, 0.5), inset 0 2px 2px rgba(255, 240, 200, 0.8);
  transition: all 0.12s ease;
  border: none;
  text-decoration: none;
}
.spin-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: btnShimmer 3.2s infinite ease-in-out;
  pointer-events: none;
}
.spin-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 7px 0 #5c0f0f, 0 14px 30px rgba(245, 158, 11, 0.65), inset 0 2px 3px rgba(255, 255, 255, 0.9);
}
.spin-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #5c0f0f, 0 4px 10px rgba(220, 38, 38, 0.4), inset 0 2px 2px rgba(255, 240, 200, 0.6);
}

@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.wheel-spin-slow { animation: spinSlow 14s linear infinite; }
.wheel-spin-fast { animation: spinSlow 1.4s linear infinite; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.animate-shake { animation: shake 0.35s ease-in-out; }

@keyframes winPop {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.8)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 18px rgba(250, 204, 21, 1)); }
}
.win-symbol { animation: winPop 0.7s ease-in-out infinite; }

/* Result message under the form */
.message.success { background: #ecfdf5; color: #047857; padding: 12px; border-radius: 10px; }
.message.error { background: #fef2f2; color: #b91c1c; padding: 12px; border-radius: 10px; }
.message.info { color: #d6d3d1; font-weight: 500; }

/* Prize list */
.paytable-hint { margin: 10px 0 0; text-align: center; font-size: 0.8rem; color: #d6d3d1; }
.paytable-hint b { color: #fde047; }
.paytable-times { color: #fde047; font-size: 0.85rem; font-weight: 800; }
.paytable li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(245, 185, 66, 0.3);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.25);
}
.paytable li img { width: 40px; height: 40px; object-fit: contain; }
.hidden { display: none !important; }

/* iSPIN88 logo in the marquee: a bit bigger, static glow */
.marquee-logo { height: 46px; box-shadow: 0 0 10px rgba(245, 185, 66, 0.45); }

/* Symbols on the reels beat gently while waiting to spin */
@keyframes idleBeat {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(250, 204, 21, 0.4)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.95)); }
}
.idle-beat { animation: idleBeat 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .idle-beat { animation: none; } }
