/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', Arial, sans-serif;
  background: #1a1a2e;
  touch-action: manipulation;
}

.view-root {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ================================================================
   PAGE BASE
   ================================================================ */
.page {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ================================================================
   PAGE HEADER (shared across pages 2–5)
   ================================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1a5c2a 0%, #2e7d32 100%);
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

.logo-small {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.player-greeting {
  font-size: 1.1rem;
  color: #ffe082;
  font-weight: 600;
}

.player-greeting strong {
  color: #fff;
}

.btn-header-home {
  position: absolute;
  right: 16px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-header-home:hover { background: rgba(255,255,255,0.3); }

/* ================================================================
   PAGE 1 — START
   ================================================================ */
.page-start {
  background: radial-gradient(ellipse at center, #f5c518 0%, #e6a800 40%, #c47f00 100%);
  align-items: center;
  justify-content: center;
}

.start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeInUp 0.6s ease both;
}

.logo-large {
  width: min(280px, 42vw, 42vh);
  height: min(280px, 42vw, 42vh);
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 6px #fff, 0 0 0 10px #d4a800;
  animation: logoPulse 2.5s ease-in-out infinite;
}

.tagline {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  color: #1a5c2a;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  letter-spacing: 2px;
}

.btn-start {
  padding: 20px 70px;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, #1a5c2a 0%, #2e7d32 60%, #43a047 100%);
  border: none;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
.btn-start:active {
  transform: scale(0.96);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Hidden admin gear — bottom right */
.btn-admin-hidden {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 50%;
  font-size: 1.1rem;
  color: rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  opacity: 0.4;
  touch-action: manipulation;
}
.btn-admin-hidden:hover { opacity: 1; }

/* ================================================================
   PAGE 2 — REGISTER
   ================================================================ */
.page-register {
  background: linear-gradient(160deg, #f5f5f5 0%, #e8f5e9 100%);
}

.register-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 20px;
  animation: fadeInUp 0.5s ease both;
}

.register-title {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #1a5c2a;
  text-align: center;
}

.form-group {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  padding-left: 4px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  border: 2px solid #c8e6c9;
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.form-input:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}

.error-msg {
  color: #c62828;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.btn-go {
  width: 100%;
  max-width: 500px;
  padding: 18px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #f5c518 0%, #e6a800 100%);
  border: none;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(245,197,24,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
  margin-top: 6px;
}
.btn-go:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(245,197,24,0.3);
}

/* ================================================================
   PAGE 3 — SPIN
   ================================================================ */
.page-spin {
  background: linear-gradient(160deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.wheel-scene {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px;
  position: relative;
}

.wheel-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#wheel-canvas {
  width:  min(90vw, 80vh, 680px);
  height: min(90vw, 80vh, 680px);
  display: block;
  border-radius: 50%;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.6));
}

/* Center tap button — overlaid on canvas, does NOT rotate */
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width:  min(19vw, 17vh, 110px);
  height: min(19vw, 17vh, 110px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #ffe082);
  border: 4px solid #ffd700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: clamp(0.65rem, 1.8vw, 0.9rem);
  font-weight: 900;
  color: #1a5c2a;
  letter-spacing: 0.5px;
  line-height: 1.3;
  cursor: pointer;
  z-index: 20;
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
  user-select: none;
}
.wheel-center:active,
.wheel-center.spinning {
  transform: translate(-50%, -50%) scale(0.93);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: default;
}
.wheel-center.spinning {
  background: radial-gradient(circle at 35% 35%, #fff9c4, #ffe082);
}

.spinning-dots {
  font-size: 1.6rem;
  animation: spinDots 1s linear infinite;
}

/* Pointer container — sits below wheel */
.pointer-wrap {
  display: flex;
  justify-content: center;
  margin-top: -4px;
  z-index: 30;
}

.pointer-triangle {
  width: 0;
  height: 0;
  border-left:  22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 36px solid #ffd700;
  filter: drop-shadow(0 -2px 6px rgba(0,0,0,0.5));
  animation: pointerPulse 1.5s ease-in-out infinite;
}

/* ================================================================
   PAGE 4 — RESULT
   ================================================================ */
.page-result {
  position: relative;
  overflow: hidden;
}

.page-win {
  background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
}

.page-lose {
  background: linear-gradient(160deg, #1a1a2e 0%, #2d2d44 50%, #3a3a5c 100%);
}

.result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  z-index: 5;
  position: relative;
}

/* WIN PANEL */
.win-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: winEntrance 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.win-burst {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  letter-spacing: 2px;
  animation: burstPulse 0.8s ease-in-out infinite alternate;
}

.prize-img {
  width:  min(38vw, 38vh, 240px);
  height: min(38vw, 38vh, 240px);
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}

.prize-bounce {
  animation: prizeBounce 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) both,
             floatUp 3s ease-in-out 0.9s infinite;
}

.prize-label {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  text-align: center;
}

.congrats-name {
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
  font-weight: 600;
  color: #c8e6c9;
  text-align: center;
}

/* LOSE PANEL */
.lose-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.6s ease both;
}

.sad-img {
  width:  min(36vw, 36vh, 220px);
  height: min(36vw, 36vh, 220px);
  object-fit: contain;
  animation: sadShake 0.8s ease 0.3s both;
}

.lose-text {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #90caf9;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 1px;
}

.lose-name {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: #9e9e9e;
}

/* COUNTDOWN BAR */
.countdown-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.countdown-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  overflow: hidden;
}

.countdown-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffd700, #ff9800);
  border-radius: 99px;
}

.countdown-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}

/* ================================================================
   CONFETTI
   ================================================================ */
#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confettiFall linear forwards;
}

/* ================================================================
   PAGE 5 — ADMIN
   ================================================================ */
.page-admin {
  background: #f0f4f8;
  overflow-y: auto;
}

.admin-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.admin-login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.admin-login-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a5c2a;
  text-align: center;
}

.admin-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}

/* STATS ROW */
.stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stat-card {
  flex: 1;
  min-width: 90px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border-top: 4px solid #90a4ae;
}
.card-wins  { border-top-color: #43a047; }
.card-lemon { border-top-color: #f5c518; }
.card-mug   { border-top-color: #1976d2; }
.card-try   { border-top-color: #e53935; }

.stat-num {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #222;
}
.stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: #777;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ADMIN SECTION */
.admin-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a5c2a;
  margin-bottom: 14px;
}

.section-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-header-row .section-title { margin-bottom: 0; }

.record-count {
  font-size: 0.8rem;
  color: #888;
  margin-left: 4px;
}

/* CONFIG */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.config-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.config-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
}
.hint {
  font-weight: 400;
  color: #aaa;
  font-size: 0.75rem;
}

.config-input {
  padding: 10px 12px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
  color: #222;
}
.config-input:focus { border-color: #2e7d32; }

.config-preview {
  background: #f1f8e9;
  border-left: 4px solid #43a047;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 14px;
  line-height: 1.8;
}
.cp-win    { color: #2e7d32; font-weight: 700; }
.cp-lemon  { color: #f9a825; font-weight: 700; }
.cp-mug    { color: #1565c0; font-weight: 700; }
.cp-try    { color: #c62828; font-weight: 700; }

.config-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.btn-save {
  padding: 11px 26px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1a5c2a, #2e7d32);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(46,125,50,0.35);
  transition: transform 0.15s;
  touch-action: manipulation;
}
.btn-save:active { transform: scale(0.96); }

.saved-flash {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2e7d32;
  animation: fadeInOut 2.5s ease forwards;
}

.pool-status {
  font-size: 0.82rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #eee;
}
.pool-status.pool-exhausted {
  background: #fff3e0;
  border-color: #ffcc80;
}
.exhausted-msg {
  font-weight: 700;
  color: #e65100;
}

.btn-reset-pool {
  padding: 5px 14px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-reset-pool:hover { background: #ffe0b2; }

/* ---- Reset Section ---- */
.reset-section {
  border: 2px solid #e0e0e0;
  transition: border-color 0.3s, background 0.3s;
}
.reset-section-alert {
  border-color: #e53935;
  background: #fff5f5;
}
.reset-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reset-counter-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.reset-count-num {
  font-size: 3rem;
  font-weight: 900;
  color: #1a5c2a;
  line-height: 1;
}
.reset-section-alert .reset-count-num {
  color: #e53935;
}
.reset-count-label {
  font-size: 1rem;
  color: #777;
  font-weight: 600;
}
.reset-desc {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
}
.exhausted-desc {
  color: #b71c1c;
  font-weight: 600;
}
.btn-reset-big {
  align-self: flex-start;
  padding: 14px 32px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #e53935, #c62828);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(229,57,53,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
  letter-spacing: 0.5px;
}
.btn-reset-big:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(229,57,53,0.3);
}

/* PASSWORD SECTION */
.pwd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-input-sm {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.95rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input-sm:focus { border-color: #2e7d32; }

/* REFRESH BUTTON */
.btn-refresh {
  padding: 6px 14px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  border-radius: 20px;
  cursor: pointer;
  margin-left: auto;
}
.btn-refresh:hover { background: #c8e6c9; }

/* TABLE */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.players-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 500px;
}

.players-table thead {
  background: linear-gradient(135deg, #1a5c2a, #2e7d32);
  color: #fff;
}

.players-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.players-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.players-table tbody tr:hover     { background: #f9f9f9; }
.players-table tbody tr.row-win   { background: #f1fff4; }
.players-table tbody tr.row-try   { background: #fff8f8; }

.players-table td {
  padding: 11px 14px;
  color: #333;
  vertical-align: middle;
}

.td-num   { color: #aaa; font-size: 0.78rem; width: 40px; }
.td-name  { font-weight: 600; color: #222; }
.td-phone { color: #555; }
.td-date  { color: #888; font-size: 0.78rem; white-space: nowrap; }

.no-data {
  text-align: center;
  color: #bbb;
  padding: 30px;
  font-style: italic;
}

/* BADGE */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.badge-lemon      { background: #fff9c4; color: #f57f17; border: 1px solid #ffe082; }
.badge-mug        { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-try        { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.badge-win-result { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; font-weight: 800; }
.badge-try-result { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; font-weight: 800; }

/* PAGINATION */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 4px;
  flex-wrap: wrap;
}

.pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: all 0.15s;
}
.pg-btn:hover    { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.pg-btn.pg-active { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.pg-btn:disabled { opacity: 0.35; cursor: default; }

/* ================================================================
   ANIMATIONS
   ================================================================ */

/* Page fade in */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo pulse on start page */
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 6px #fff, 0 0 0 10px #d4a800; }
  50%       { box-shadow: 0 8px 50px rgba(0,0,0,0.4),  0 0 0 6px #fff, 0 0 0 14px #f5c518; }
}

/* Pointer pulse */
@keyframes pointerPulse {
  from { transform: translateY(0);    filter: drop-shadow(0 -2px 6px rgba(0,0,0,0.5)); }
  to   { transform: translateY(-5px); filter: drop-shadow(0 -4px 10px rgba(255,215,0,0.7)); }
}

/* Spin center loading indicator */
@keyframes spinDots {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Win entrance */
@keyframes winEntrance {
  from { opacity: 0; transform: scale(0.5) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Win burst text pulse */
@keyframes burstPulse {
  from { transform: scale(1);    text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
  to   { transform: scale(1.06); text-shadow: 0 4px 20px rgba(255,215,0,0.6); }
}

/* Prize bounce in then float */
@keyframes prizeBounce {
  0%   { opacity: 0; transform: scale(0.3) translateY(-60px); }
  60%  { transform: scale(1.15) translateY(10px); }
  80%  { transform: scale(0.95) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Sad shake */
@keyframes sadShake {
  0%   { opacity: 0; transform: scale(0.6); }
  50%  { transform: scale(1.05); }
  70%  { transform: translateX(-8px); }
  80%  { transform: translateX(8px); }
  90%  { transform: translateX(-4px); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* Confetti fall */
@keyframes confettiFall {
  0%   { transform: translateY(-30px) rotate(0deg);    opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(600deg); opacity: 0; }
}

/* Saved flash */
@keyframes fadeInOut {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================================
   NG-ANIMATE PAGE TRANSITIONS
   ================================================================ */
.view-root .ng-enter {
  animation: fadeInUp 0.4s ease both;
}
.view-root .ng-leave {
  animation: fadeOut 0.25s ease both;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ================================================================
   TABLET LANDSCAPE ADJUSTMENTS
   ================================================================ */
@media (orientation: landscape) and (max-height: 600px) {
  .logo-large   { width: 150px; height: 150px; }
  .btn-start    { padding: 14px 50px; font-size: 1.2rem; }
  .tagline      { font-size: 1.4rem; }
  .start-inner  { gap: 14px; }

  #wheel-canvas { width: min(72vh, 520px); height: min(72vh, 520px); }
  .wheel-center { width: min(15vh, 95px);  height: min(15vh, 95px); }
}

/* Prevent text selection during spin interactions */
.page-spin, .page-start {
  user-select: none;
  -webkit-user-select: none;
}
