@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700;800&display=swap');

:root {
  --bg0: #fff7f8;
  --bg1: #ffffff;
  --pink: #e10600;
  --pink2: #ff3b30;
  --cyan: #e10600;
  --text: #1c1c1c;
  --muted: #6d7380;
  --seg-a: #e10600;
  --seg-b: #ffffff;
  --seg-line: #ffd6d6;
  --panel: #ffffff;
  --glow-pink: 0 10px 28px rgba(225,6,0,.28);
  --glow-cyan: 0 0 0 1px rgba(225,6,0,.12);
  --font: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: #fff6f7 url("../assets/jaymart-bg.jpg") center center / cover no-repeat fixed;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body::before { content: none; }

.app {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 8px 12px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* —— Brand —— */
.brand {
  text-align: center;
  animation: fadeDown .65s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero {
  width: min(520px, 100%);
  padding: 4px 12px 0;
  background: none;
}
.brand-logo {
  display: block;
  width: min(200px, 52vw);
  height: auto;
  margin: 0;
  background: transparent;
}
.brand-title {
  display: block;
  width: min(390px, 84vw);
  height: auto;
  margin: 0;
  background: transparent !important;
}
.brand .brand-lead {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c1c1c;
}
.brand-sub,
.brand p {
  margin-top: 2px;
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--muted);
}

/* —— User card —— */
.user-card {
  width: min(560px, 100%);
  padding: 16px 16px 12px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(225,6,0,.08);
  background-clip: padding-box;
  box-shadow:
    0 10px 30px rgba(225,6,0,.08),
    0 2px 8px rgba(0,0,0,.04);
  animation: fadeUp .65s .06s ease both;
}
.user-card label {
  display: block;
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #3a3a3a;
  margin-bottom: 0;
}
.user-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.spins-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff5f6;
  border: 1px solid rgba(225,6,0,.16);
  box-shadow: none;
  color: #e10600;
  line-height: 1;
}
.spins-badge .spins-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #e10600;
}
.spins-badge strong {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #e10600;
  min-width: 1.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.spins-badge .spins-unit {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: #e10600;
}
.spins-badge.is-zero {
  border-color: rgba(255,143,173,.45);
  background: rgba(255,45,106,.12);
}
.spins-badge.is-zero strong { color: #ff8fad; }
.user-row { display: flex; gap: 10px; }
.user-row[hidden] { display: none !important; }
.login-gate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 2px;
}
.login-gate-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.login-gate-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.login-gate-text strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1c1c1c;
  letter-spacing: .01em;
}
.login-gate-text span {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}
.login-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3b30, #e10600);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(225,6,0,.28);
}
.login-gate-btn:hover { filter: brightness(1.06); }
.login-gate-btn:active { transform: scale(.97); }
.login-gate-btn.alt {
  background: #fff;
  color: #e10600;
  box-shadow: none;
  border: 1.5px solid #e10600;
}
.input-wrap input[readonly] {
  opacity: .95;
  cursor: default;
}
.input-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(225,6,0,.16);
  background: #fff7f8;
}
.input-wrap:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,45,106,.18);
}
.input-ico { color: var(--pink2); display: flex; opacity: .9; }
.input-wrap input {
  flex: 1; min-width: 0;
  padding: 12px 0;
  border: none; outline: none;
  background: transparent;
  color: #1c1c1c;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
}
.user-row button {
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff3b30, #e10600);
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(225,6,0,.28);
  border-radius: 999px;
}
.user-row button:active { transform: scale(.97); }
.user-row button.btn-quiet {
  background: #fff;
  color: #e10600;
  box-shadow: none;
  border: 1.5px solid rgba(225,6,0,.35);
}
.user-meta {
  margin-top: 10px;
  min-height: 20px;
  font-size: .88rem;
  color: var(--muted);
}
.user-meta strong,
.user-meta a { color: #e10600; font-weight: 700; }
.user-meta.err { color: #e10600; }

/* —— Play grid —— */
.play-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-items: center;
  align-items: center;
  animation: fadeUp .7s .12s ease both;
}

.wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 22px;
}

.wheel-stage {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  aspect-ratio: 1;
  container-type: inline-size;
}

.wheel-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(225,6,0,.18) 70%, transparent 82%);
  filter: blur(1px);
  animation: spinSlow 18s linear infinite;
  pointer-events: none;
}

.wheel-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.35), transparent 28%),
    linear-gradient(160deg, #ff4a42, #e10600 46%, #b00000);
  box-shadow:
    0 0 0 4px #fff,
    0 16px 36px rgba(180,0,0,.28),
    inset 0 0 0 10px rgba(255,255,255,.12);
}

.wheel-lights {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}
.wheel-lights span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  transform-origin: center center;
  /* รัศมีตั้งจาก JS ให้ตรงวงจริง — อย่าใส่ translateX หลัง rotate */
  animation: lightBlink 1.1s calc(var(--i) * .05s) ease-in-out infinite;
}
.wheel-lights span:nth-child(odd) {
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 12px rgba(255,255,255,.8);
}
.wheel-lights span:nth-child(even) {
  background: #ffe08a;
  box-shadow: 0 0 8px #ffe08a, 0 0 12px rgba(255,224,138,.7);
}

.wheel {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 30s cubic-bezier(.2, .9, .3, 1);
  background: conic-gradient(
    from 0deg,
    #e10600 0deg 40deg,
    #ffffff 40deg 80deg,
    #e10600 80deg 120deg,
    #ffffff 120deg 160deg,
    #e10600 160deg 200deg,
    #ffffff 200deg 240deg,
    #e10600 240deg 280deg,
    #ffffff 280deg 320deg,
    #ffc21a 320deg 360deg
  );
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55);
}
.wheel.spinning { pointer-events: none; }

#segLabels {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* แผ่นหมุนเต็มวง — หมุนรอบศูนย์กลางจริง แล้ววางป้ายชิดขอบนอกกลางช่อง */
.seg-label {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.seg-label-inner {
  position: absolute;
  left: 50%;
  /* โซนขอบนอกกลางแผ่น — ใส่รูปรางวัล */
  top: 4%;
  width: 62px;
  width: 17cqw;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  text-align: center;
  box-sizing: border-box;
}
.seg-box {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  font-size: .6rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.seg-box.on-light {
  color: #1c1c1c;
  text-shadow: none;
}
.seg-box .seg-name {
  width: 100%;
  font-family: var(--font-display);
  font-size: 10px;
  font-size: clamp(8.5px, 2.6cqw, 11px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.seg-box.on-light .seg-name { color: #1c1c1c; text-shadow: none; }
.acct-ico, .gift-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: center / contain no-repeat;
}
.acct-ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e10600' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5 19c1.4-3 3.8-4.5 7-4.5S17.6 16 19 19' stroke-linecap='round'/%3E%3C/svg%3E");
}
.gift-ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e10600'%3E%3Cpath d='M4 10h16v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9zm0-2h16V6H4v2zm6 2v10h4V10h-4zM12 4c.8 0 2 .7 2 2h-2V4zm0 0c-.8 0-2 .7-2 2h2V4z'/%3E%3C/svg%3E");
}
.seg-box img,
.seg-box .seg-img {
  display: block;
  width: 50px;
  height: 50px;
  width: 13cqw;
  height: 13cqw;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.32));
  mix-blend-mode: normal;
}
.seg-img-ph {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1.5px dashed rgba(255,255,255,.28);
  box-shadow: none;
}

.pointer {
  position: absolute;
  top: -12px; left: 50%;
  width: 54px;
  transform: translateX(-50%);
  z-index: 5;
  background: transparent;
  filter: drop-shadow(0 6px 6px rgba(160,0,0,.28));
  animation: pointerBob 2.2s ease-in-out infinite;
  pointer-events: none;
}
.pointer img { display: block; width: 100%; height: auto; }
.wheel-stand { display: none; }

.spin-btn {
  position: absolute;
  left: 50%; top: 50%;
  width: 92px; height: 92px;
  width: 22cqw; height: 22cqw;
  transform: translate(-50%, -50%);
  border: none; border-radius: 50%; padding: 0;
  cursor: pointer; z-index: 4;
  background: radial-gradient(circle at 35% 30%, #ff5a52, #e10600 52%, #9d0000);
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 9px #e10600,
    0 10px 22px rgba(180,0,0,.35);
  transition: transform .15s ease, filter .2s;
}
.spin-btn::after {
  content: 'SPIN';
  position: absolute;
  left: 50%; top: 50%; bottom: auto;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-size: clamp(.85rem, 4.4cqw, 1.15rem);
  font-weight: 800;
  letter-spacing: .12em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.05);
  filter: brightness(1.08);
}
.spin-btn:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(.96);
}
.spin-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(.2) brightness(.8);
  opacity: .78;
}

/* —— Winners —— */
.winners-card {
  width: 100%;
  height: min(400px, 88vw);
  max-height: 400px;
  padding: 16px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(225,6,0,.08);
  box-shadow: 0 10px 28px rgba(225,6,0,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.winners-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(225,6,0,.1);
}
.winners-head .trophy { font-size: 1.15rem; filter: drop-shadow(0 0 8px rgba(255,45,106,.5)); }
.winners-head h2 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.winners-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.winners-list::-webkit-scrollbar { width: 4px; }
.winners-list::-webkit-scrollbar-thumb { background: rgba(255,45,106,.4); border-radius: 4px; }

.winner-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff7f8;
  border: 1px solid rgba(225,6,0,.08);
}
.winner-rank {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,45,106,.15);
  border: 1px solid rgba(255,45,106,.35);
  font-size: .78rem;
  font-weight: 800;
  color: var(--pink2);
}
.winner-user {
  font-size: .88rem;
  font-weight: 700;
  color: #1c1c1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.winner-prize {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--cyan);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.winner-prize .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  box-shadow: 0 0 8px rgba(255,45,106,.6);
  flex-shrink: 0;
}
.winners-empty {
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  padding: 28px 8px;
}

/* —— Footer bits —— */
.info-bar {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(225,6,0,.1);
  box-shadow: 0 8px 22px rgba(225,6,0,.06);
  animation: fadeUp .7s .2s ease both;
}
.info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #1c1c1c;
  font-family: var(--font-display);
  font-size: clamp(.74rem, 2.4vw, .84rem);
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  text-align: center;
  line-height: 1.25;
}
.info-btn span {
  display: block;
}
.info-btn:hover {
  background: rgba(255,45,106,.14);
  box-shadow: inset 0 0 0 1px rgba(255,45,106,.25);
}
.info-btn:active { transform: scale(.98); }
.info-btn i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  flex-shrink: 0;
  margin-top: 1px;
}

.info-modal-box {
  width: min(440px, 100%);
  text-align: left;
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.info-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.info-modal-head h2 {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin: 0 !important;
  line-height: 1.35;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.info-modal-box .info-modal-x {
  flex-shrink: 0;
  width: 36px !important;
  height: 36px;
  min-width: 36px;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06) !important;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.info-modal-box .info-modal-x:hover {
  background: rgba(255,45,106,.2) !important;
  border-color: rgba(255,45,106,.45);
}
.info-modal-body {
  overflow-y: auto;
  flex: 1;
  font-size: .9rem;
  color: rgba(255,255,255,.86);
  line-height: 1.55;
  padding: 14px 16px 16px;
}
.info-modal-foot {
  padding: 0 16px 16px;
  flex-shrink: 0;
}
.info-modal-foot .info-ok {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), #ff5a8c);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255,45,106,.35);
}
.info-modal-body .prize-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.info-modal-body .prize-row {
  display: grid;
  grid-template-columns: 36px 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.info-modal-body .prize-row .n {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,45,106,.18);
  color: var(--pink2);
  font-weight: 800;
  font-size: .8rem;
}
.info-modal-body .prize-row img {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.info-modal-body .prize-row .ph {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.35);
  font-size: .7rem;
}
.info-modal-body .cond-text {
  white-space: pre-wrap;
  background: rgba(0,0,0,.25);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.06);
  line-height: 1.65;
}
.info-modal-body .hist-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .86rem;
}
.info-modal-body .hist-row:last-child { border-bottom: none; }
.info-modal-body .muted { color: var(--muted); font-size: .82rem; }
.info-modal-body .empty-msg {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px 12px;
  line-height: 1.55;
}
.info-modal-body .empty-state {
  text-align: center;
  padding: 18px 8px 8px;
}
.info-modal-body .empty-state .ico {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,45,106,.12);
  border: 1px solid rgba(255,45,106,.3);
  font-size: 1.35rem;
}
.info-modal-body .empty-state b {
  display: block;
  color: #fff;
  font-size: .98rem;
  margin-bottom: 6px;
}
.info-modal-body .empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  text-decoration: none;
  color: #e10600;
  text-shadow: none;
  animation: fadeUp .7s .25s ease both;
}
.cta span {
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(46,240,234,.7);
  transition: transform .2s;
}
.cta:hover span { transform: translateX(4px); }

.admin-link {
  font-size: .78rem;
  color: rgba(46,240,234,.7);
  text-decoration: none;
}
.admin-link:hover { color: var(--cyan); text-decoration: underline; }

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5,3,10,.75);
  backdrop-filter: blur(8px);
}
.modal.open {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.modal-box {
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 28px 22px 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(225,6,0,.12);
  box-shadow: 0 18px 50px rgba(180,0,0,.16);
  text-align: center;
  animation: popIn .35s cubic-bezier(.2,1.2,.4,1);
}
.result-modal-box {
  position: relative;
  overflow: hidden;
  width: min(380px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.result-modal-box .result-glow {
  position: absolute;
  left: 50%;
  top: -30%;
  width: 140%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(255,45,106,.35), transparent 62%);
  pointer-events: none;
}
.result-eyebrow {
  position: relative;
  width: 100%;
  margin: 0 0 14px !important;
  font-family: var(--font-display);
  font-size: .76rem !important;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan) !important;
  text-align: center;
  text-shadow: 0 0 14px rgba(46,240,234,.35);
}
.result-prize-visual {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.14), transparent 50%),
    linear-gradient(160deg, rgba(255,45,106,.25), rgba(46,240,234,.1));
  box-shadow:
    0 0 0 3px rgba(255,45,106,.55),
    0 0 0 8px rgba(46,240,234,.14),
    0 14px 36px rgba(0,0,0,.45),
    inset 0 0 24px rgba(0,0,0,.25);
  animation: resultPop .45s cubic-bezier(.2,1.2,.4,1) both;
}
.result-prize-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  background: transparent;
}
.result-prize-ph {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.15);
}
.result-modal-box h2 {
  position: relative;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 1.7rem) !important;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.25;
  margin: 0 0 6px !important;
  color: #e10600;
  text-align: center;
  filter: drop-shadow(0 0 18px rgba(46,240,234,.35));
}
.result-meta-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 12px;
}
.result-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(46,240,234,.1);
  border: 1px solid rgba(46,240,234,.35);
  color: #5c6370;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
}
.result-chip strong {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--cyan);
  min-width: 1.2ch;
  text-align: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.result-note {
  position: relative;
  width: 100%;
  margin: 0 0 18px !important;
  font-size: .74rem !important;
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.55;
  color: #6d7380 !important;
  text-align: center !important;
}
.modal-box .trophy {
  width: 72px; height: 72px; margin: 0 auto 12px;
  border-radius: 16px; object-fit: contain;
  background: rgba(255,255,255,.06);
}
.modal-box h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: 6px;
}
.modal-box .prize-name {
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 6px 0 4px;
  text-align: center;
}
.modal-box p { color: var(--muted); font-size: .9rem; font-weight: 400; letter-spacing: .015em; line-height: 1.5; margin-bottom: 18px; text-align: center; }
.modal-box > button#closeModal {
  width: 100%;
  max-width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), #ff5a8c);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255,45,106,.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@keyframes resultPop {
  from { opacity: 0; transform: scale(.72); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(255,45,106,.45), 0 0 28px rgba(46,240,234,.2); }
  50% { box-shadow: 0 0 28px rgba(255,45,106,.75), 0 0 40px rgba(46,240,234,.4); }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes lightBlink {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}
@keyframes pointerBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .play-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .winners-card {
    width: min(400px, 100%);
    height: auto;
    max-height: 320px;
  }
  .info-bar {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .info-btn { justify-content: flex-start; padding-left: 14px; }
}

@media (max-width: 400px) {
  .wheel { inset: 16px; }
}

.winners-head h2,
.info-modal-head h2 {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #1c1c1c;
  filter: none;
}
.winners-card { width: 100%; height: auto; max-height: 280px; }
.winner-prize { color: #e10600; }
.info-modal-head { border-bottom-color: rgba(225,6,0,.1); }
.info-modal-body { color: #3a3a3a; }
.info-modal-box .info-modal-x {
  border-color: rgba(225,6,0,.16);
  background: #fff5f6 !important;
  color: #e10600;
}
.info-modal-body .prize-row,
.info-modal-body .cond-text {
  background: #fff7f8;
  border-color: rgba(225,6,0,.08);
  color: #1c1c1c;
}
.info-modal-body .hist-row { border-bottom-color: rgba(225,6,0,.1); }
.info-modal-body .empty-state b { color: #1c1c1c; }
.input-wrap {
  border-color: rgba(225,6,0,.16);
  background: #fff7f8;
}
.input-wrap input { color: #1c1c1c; }
.input-ico { color: #e10600; }
.user-row button {
  background: linear-gradient(180deg, #ff3b30, #e10600);
  box-shadow: 0 8px 16px rgba(225,6,0,.22);
}
.user-row button.btn-quiet {
  background: #fff;
  color: #e10600;
  box-shadow: none;
  border: 1.5px solid rgba(225,6,0,.35);
}
.result-chip {
  background: #fff5f6;
  border-color: rgba(225,6,0,.18);
}
.modal-box .prize-name {
  background: none;
  -webkit-background-clip: border-box;
  color: #e10600;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 28px 22px 22px;
  box-shadow: 0 16px 40px rgba(120, 0, 0, .12);
}
.auth-card img {
  display: block;
  width: min(168px, 46vw);
  margin: 0 auto 8px;
}
.auth-card h1 {
  text-align: center;
  font-size: 1.45rem;
  margin: 8px 0 6px;
}
.auth-card .lead {
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 18px;
}
.auth-field { margin-bottom: 12px; }
.auth-field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(225,6,0,.16);
  background: #fff7f8;
  font: inherit;
  font-size: 1rem;
}
.auth-field input:focus {
  outline: none;
  border-color: #e10600;
  box-shadow: 0 0 0 3px rgba(225,6,0,.12);
}
.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3b30, #e10600);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(225,6,0,.28);
}
.auth-err {
  color: #e10600;
  font-size: .88rem;
  font-weight: 700;
  min-height: 1.2em;
  margin: 4px 0 8px;
}
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: .92rem;
}
.auth-switch a { color: #e10600; font-weight: 800; }
