html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* Dynamic viewport fallback */
.h-dvh { height: 100vh; height: 100dvh; }
.min-h-dvh { min-height: 100vh; min-height: 100dvh; }

/* Safe-area insets for iOS notches */
.pt-safe { padding-top: calc(env(safe-area-inset-top) + 0.5rem); }
.pb-safe { padding-bottom: calc(env(safe-area-inset-bottom) + 1rem); }

/* Force uppercase on text inputs visually */
input[type="text"], input[type="tel"] { text-transform: uppercase; }

/* Prevent iOS form zoom */
input, select, textarea { font-size: 16px; }

/* Hide scrollbars where not needed */
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ===== Radiant red background animation ===== */
.bg-radiant {
  position: relative;
  background: #fff5f5;
  overflow: hidden;
  isolation: isolate;
}
.bg-radiant::before,
.bg-radiant::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
.bg-radiant::before {
  width: 60vmax; height: 60vmax;
  background: radial-gradient(circle, rgba(239,68,68,0.55), rgba(239,68,68,0) 70%);
  top: -20vmax; left: -20vmax;
  animation: radiant1 14s ease-in-out infinite alternate;
}
.bg-radiant::after {
  width: 55vmax; height: 55vmax;
  background: radial-gradient(circle, rgba(252,165,165,0.6), rgba(252,165,165,0) 70%);
  bottom: -25vmax; right: -20vmax;
  animation: radiant2 18s ease-in-out infinite alternate;
}
@keyframes radiant1 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(15vmax, 10vmax) scale(1.15); }
  100% { transform: translate(8vmax, 20vmax) scale(0.95); }
}
@keyframes radiant2 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-12vmax, -8vmax) scale(1.1); }
  100% { transform: translate(-20vmax, -15vmax) scale(0.9); }
}

/* ===== View entry animation ===== */
.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo gentle float */
.logo-float { animation: floaty 4s ease-in-out infinite; }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* Pulse glow for primary buttons */
.btn-pulse { animation: btnPulse 2.4s ease-in-out infinite; }
@keyframes btnPulse {
  0%,100% { box-shadow: 0 8px 24px rgba(220,38,38,0.35), 0 0 0 0 rgba(220,38,38,0.4); }
  50%     { box-shadow: 0 12px 32px rgba(220,38,38,0.5), 0 0 0 14px rgba(220,38,38,0); }
}

/* Capture button ring pulse */
.capture-ring { animation: ringPulse 2s ease-in-out infinite; }
@keyframes ringPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  50%     { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}

/* Loading spinner */
.mb-spinner {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 5px solid rgba(220,38,38,0.18);
  border-top-color: #dc2626;
  animation: spin 0.9s linear infinite;
}
.mb-spinner-sm {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Full-screen loading overlay */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,245,245,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem; z-index: 60;
  animation: fadeUp 0.25s ease-out both;
}
.loading-overlay p {
  color: #b91c1c; font-weight: 600; letter-spacing: 0.05em;
}

/* Input focus subtle lift */
input:focus { transform: translateY(-1px); transition: transform 0.2s, border-color 0.2s; }

/* ======================================================================
   RAFFLE — win.html styles
   ====================================================================== */

[ng-cloak] { display: none !important; }

/* ===== 3D Countdown 10→1 ===== */
.countdown-3d {
  position: relative;
  width: clamp(220px, 40vmin, 420px);
  height: clamp(220px, 40vmin, 420px);
  perspective: 1200px;
  transform-style: preserve-3d;
}
.countdown-3d::before {
  content: '';
  position: absolute;
  bottom: -30px; left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 22px;
  background: rgba(220, 38, 38, 0.35);
  border-radius: 50%;
  filter: blur(18px);
  animation: cdShadow 1s linear infinite;
}
@keyframes cdShadow {
  0%,100% { transform: translateX(-50%) scale(0.5); opacity: 0.3; }
  50%     { transform: translateX(-50%) scale(1);   opacity: 0.7; }
}
.cd-num {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(8rem, 22vmin, 18rem);
  font-weight: 900;
  color: #dc2626;
  text-shadow:
    0 0 30px rgba(220,38,38,0.5),
    0 0 70px rgba(220,38,38,0.25);
  transform: rotateY(270deg);
  opacity: 0;
  animation: cdFlip 10s linear;
  font-family: system-ui, sans-serif;
}
.cd-num:nth-child(1)  { animation-delay: 0s; }
.cd-num:nth-child(2)  { animation-delay: 1s; }
.cd-num:nth-child(3)  { animation-delay: 2s; }
.cd-num:nth-child(4)  { animation-delay: 3s; }
.cd-num:nth-child(5)  { animation-delay: 4s; }
.cd-num:nth-child(6)  { animation-delay: 5s; }
.cd-num:nth-child(7)  { animation-delay: 6s; }
.cd-num:nth-child(8)  { animation-delay: 7s; }
.cd-num:nth-child(9)  { animation-delay: 8s; }
.cd-num:nth-child(10) { animation-delay: 9s; }
@keyframes cdFlip {
  0%   { transform: rotateY(90deg);  opacity: 1; }
  2%   { transform: rotateY(0deg);   opacity: 1; }
  8%   { transform: rotateY(0deg);   opacity: 1; }
  10%  { transform: rotateY(-90deg); opacity: 0; }
  100% { transform: rotateY(-90deg); opacity: 0; }
}

/* ===== 3D Word Carousel ===== */
.word-rotate {
  list-style: none;
  margin: 0; padding: 0;
  width: min(95vw, 1200px);
  height: clamp(280px, 50vmin, 480px);
  position: relative;
  display: inline-block;
}
.word-rotate li {
  position: absolute;
  bottom: 50%; left: 0;
  width: 100%;
  text-align: center;
  font-size: clamp(1.5rem, 4vmin, 3rem);
  font-weight: 800;
  color: #b91c1c;
  text-shadow: 0 2px 18px rgba(220,38,38,0.5);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.13s ease;
}

/* ===== Winner reveal ===== */
.winner-name {
  font-size: clamp(2.5rem, 9vmin, 7rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-shadow:
    0 4px 25px rgba(220,38,38,0.4),
    0 0 60px rgba(220,38,38,0.25);
}

/* ===== Confetti ===== */
.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.confetti-piece {
  position: absolute;
  top: -30px;
  left: var(--x, 50vw);
  width: 10px;
  height: 14px;
  background: var(--c, #dc2626);
  transform: rotate(var(--r, 0deg));
  animation: confettiFall var(--d, 4s) linear var(--dl, 0s) forwards;
  border-radius: 2px;
  opacity: 0.95;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(var(--r,0deg)); opacity: 1; }
  100% { transform: translateY(110vh) rotate(calc(var(--r,0deg) + 720deg)); opacity: 0.6; }
}
