/* ============================================================
   Колесо Фортуны — стили
   Палитра: тёмный фон + золото. Меняется в :root ниже.
   ============================================================ */

:root {
  --bg-1: #0a0a0f;
  --bg-2: #17110a;
  --gold: #f7c948;
  --gold-2: #ffdf7e;
  --gold-dark: #b8860b;
  --text: #f5f1e8;
  --text-dim: #a89f8e;
  --card: rgba(255, 255, 255, 0.045);
  --line: rgba(247, 201, 72, 0.22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-1);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(247, 201, 72, 0.20), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(247, 201, 72, 0.10), transparent 65%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- шапка ---------- */
.topbar { padding: 6px 2px 2px; }

.brand { display: flex; align-items: center; gap: 10px; }

.brand-logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 21px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(247,201,72,0.22), rgba(247,201,72,0.05));
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(247, 201, 72, 0.12);
}

.brand-name { font-size: 15px; font-weight: 800; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* ---------- центр ---------- */
.main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }

.hero { text-align: center; padding-top: 6px; }

.hero-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
  background: linear-gradient(180deg, #fff7dd, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); }

/* ---------- колесо ---------- */
.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin: 4px 0;
}

.wheel-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,201,72,0.30), transparent 68%);
  filter: blur(18px);
  pointer-events: none;
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.55));
  will-change: transform;
}

/* указатель сверху */
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 28px solid var(--gold);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  z-index: 3;
}

.spin-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 27%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.35);
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, var(--gold-dark) 100%);
  color: #2a1c00;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 8px 22px rgba(247, 201, 72, 0.42), inset 0 -3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: pulse 2.1s ease-in-out infinite;
}

.spin-btn:active { transform: translate(-50%, -50%) scale(0.94); }

.spin-btn:disabled {
  cursor: default;
  animation: none;
  filter: grayscale(0.3) brightness(0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(247,201,72,0.42), inset 0 -3px 8px rgba(0,0,0,0.18); }
  50%      { box-shadow: 0 8px 30px rgba(247,201,72,0.72), inset 0 -3px 8px rgba(0,0,0,0.18); }
}

/* ---------- инфо ---------- */
.info {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
}

.info-row { display: flex; align-items: center; justify-content: space-between; }
.info-label { font-size: 12.5px; color: var(--text-dim); }
.info-value { font-size: 15px; font-weight: 800; color: var(--gold-2); }
.info-note { margin: 6px 0 0; font-size: 11px; color: var(--text-dim); }

/* ---------- подвал ---------- */
.footer {
  text-align: center;
  font-size: 10.5px;
  color: #6d6659;
  padding-top: 8px;
}

/* ---------- окно выигрыша ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 4, 2, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.show { opacity: 1; visibility: visible; }

.modal-card {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(180deg, #1d1710, #12100c);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(247, 201, 72, 0.16);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.show .modal-card { transform: translateY(0) scale(1); }

.modal-emoji { font-size: 46px; line-height: 1; animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

.modal-caption { margin-top: 8px; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); }

.modal-title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff7dd, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.promo {
  margin: 16px 0 4px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px dashed rgba(247, 201, 72, 0.5);
  background: rgba(247, 201, 72, 0.07);
}

.promo[hidden] { display: none; }

.promo-label { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }

.promo-value {
  margin-top: 3px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1.6px;
  color: var(--gold-2);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.promo-copy {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.promo-copy:active { background: rgba(247, 201, 72, 0.14); }

.cta {
  width: 100%;
  margin-top: 14px;
  padding: 15px 16px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #2a1c00;
  background: linear-gradient(180deg, #ffe89a, var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 10px 26px rgba(247, 201, 72, 0.36);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.cta:active { transform: scale(0.97); }

.modal-close {
  width: 100%;
  margin-top: 9px;
  padding: 9px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  cursor: pointer;
}

@media (max-height: 680px) {
  .hero-title { font-size: 20px; }
  .brand-sub, .hero-sub { display: none; }
  .wheel-wrap { max-width: 320px; }
}
