/* ── Колесо фортуны (страница /wheel) ─────────────────────────────────────── */

.fw-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(1100px 700px at 50% -12%, #45195f 0%, #2a0f45 42%, #170830 68%, #0b0418 100%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

.fw-topbar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 6px;
  box-sizing: border-box;
}

.fw-back {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}
.fw-back:hover { color: #fff; }

.fw-title {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(180deg, #ffe9a3 0%, #f7c948 45%, #c98a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(247, 201, 72, 0.35));
}

.fw-settings-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.fw-settings-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.fw-settings-btn:disabled { opacity: 0.45; cursor: default; }

/* ── Колесо ── */

.fw-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 34px);
  padding: clamp(8px, 2vh, 20px) 16px 40px;
}

.fw-wheel-wrap {
  position: relative;
  width: min(76vmin, 580px);
  height: min(76vmin, 580px);
  filter: drop-shadow(0 18px 60px rgba(0, 0, 0, 0.55));
}

.fw-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fw-rotor {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.fw-sector-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  fill: #fff;
  paint-order: stroke;
  stroke: rgba(20, 6, 40, 0.5);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* Свечение постоянное, мигание — только прозрачностью:
   анимация filter заставляла перерисовывать слой каждый кадр во время вращения */
.fw-bulb {
  fill: #fff7d6;
  filter: drop-shadow(0 0 6px rgba(255, 240, 170, 0.95));
  animation: fwBulb 1.3s ease-in-out infinite;
}
.fw-bulb.fw-bulb-odd { animation-delay: 0.65s; }
.fw-spinning .fw-bulb { animation-duration: 0.4s; }

@keyframes fwBulb {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.fw-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffffff 0%, #f2f2f6 55%, #d8d8e2 100%);
  box-shadow:
    0 0 0 4px #f7c948,
    0 0 0 7px #9a6d0e,
    inset 0 -8px 18px rgba(0, 0, 0, 0.12),
    inset 0 6px 14px rgba(255, 255, 255, 0.9),
    0 6px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.fw-hub img {
  width: 76%;
  max-height: 60%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.fw-pointer {
  position: absolute;
  left: 50%;
  top: -3.2%;
  transform: translateX(-50%);
  width: 13%;
  z-index: 5;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

.fw-empty-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18%;
  font-size: clamp(14px, 2.4vmin, 19px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  z-index: 3;
}

/* ── Кнопки скорости ── */

.fw-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.fw-spin-btn {
  font-family: inherit;
  font-size: clamp(15px, 2vmin, 18px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  min-width: 205px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, filter 0.15s;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.45);
}
.fw-spin-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); filter: brightness(1.08); }
.fw-spin-btn:active:not(:disabled) { transform: translateY(1px); }
.fw-spin-btn:disabled { opacity: 0.45; cursor: default; }

.fw-btn-slow   { background: linear-gradient(180deg, #4fd08c 0%, #1b8a50 60%, #14683c 100%); }
.fw-btn-medium { background: linear-gradient(180deg, #ffd76a 0%, #e0a417 60%, #b07f0a 100%); }
.fw-btn-fast   { background: linear-gradient(180deg, #ff7a6b 0%, #d3271a 60%, #a01b10 100%); }

.fw-error {
  min-height: 22px;
  font-size: 14px;
  font-weight: 600;
  color: #ffb3ab;
  text-align: center;
}

/* ── Экран выигрыша ── */

.fw-win-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 2, 20, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fwFadeIn 0.35s ease-out;
  overflow: hidden;
}

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

.fw-win-card {
  position: relative;
  text-align: center;
  padding: 24px;
  animation: fwPop 0.45s cubic-bezier(0.18, 1.4, 0.4, 1);
  max-width: min(92vw, 760px);
}

@keyframes fwPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.fw-win-emoji {
  font-size: clamp(56px, 11vmin, 96px);
  animation: fwBounce 1.1s ease-in-out infinite;
  display: inline-block;
}

@keyframes fwBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-14px) scale(1.08); }
}

.fw-win-title {
  margin: 6px 0 14px;
  font-size: clamp(34px, 7vmin, 60px);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff3c4 0%, #f7c948 50%, #cf9214 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(247, 201, 72, 0.4));
}

.fw-win-sub {
  font-size: clamp(16px, 3vmin, 22px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.fw-win-prize {
  font-size: clamp(26px, 5.4vmin, 44px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 30px;
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.25);
  overflow-wrap: anywhere;
}

.fw-continue-btn {
  font-family: inherit;
  font-size: clamp(16px, 2.6vmin, 20px);
  font-weight: 700;
  color: #3a2703;
  background: linear-gradient(180deg, #ffe9a3 0%, #f7c948 55%, #dfa41f 100%);
  border: none;
  border-radius: 999px;
  padding: 16px 54px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 6px rgba(0, 0, 0, 0.15),
    0 10px 30px rgba(247, 201, 72, 0.35);
}
.fw-continue-btn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.05); }

.fw-confetti {
  position: absolute;
  top: -12vh;
  border-radius: 2px;
  animation: fwConfetti linear infinite;
  pointer-events: none;
}

@keyframes fwConfetti {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(125vh) rotate(720deg); }
}

/* ── Настройки (внутренности модалки; каркас — глобальные .modal-*) ── */

.fw-settings-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin: 18px 0 10px;
}
.fw-settings-section-title:first-child { margin-top: 0; }

.fw-prize-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fw-prize-row input[type="text"],
.fw-prize-row input[type="number"] {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
}
.fw-prize-row input[type="text"] { flex: 1; min-width: 0; }
.fw-prize-row input[type="number"] { width: 88px; }
.fw-prize-row input:focus { border-color: #7B2C8E; }

.fw-prize-row .fw-qty-zero { color: #b91c1c; font-weight: 600; }

.fw-mini-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.fw-mini-btn:hover:not(:disabled) { background: #f3f4f6; }
.fw-mini-btn:disabled { opacity: 0.45; cursor: default; }
.fw-mini-btn.fw-danger { color: #b91c1c; border-color: #fecaca; }
.fw-mini-btn.fw-danger:hover:not(:disabled) { background: #fef2f2; }
.fw-mini-btn.fw-save { color: #7B2C8E; border-color: #e9d5f2; }
.fw-mini-btn.fw-save:hover:not(:disabled) { background: #faf5fc; }

.fw-spins-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #f0f1f4;
  border-radius: 12px;
  padding: 6px 0;
}
.fw-spin-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  font-size: 14px;
  color: #1f2937;
}
.fw-spin-item:not(:last-child) { border-bottom: 1px solid #f6f7f9; }
.fw-spin-item .fw-spin-date { color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }

.fw-settings-empty {
  font-size: 14px;
  color: #9ca3af;
  padding: 10px 2px;
}

/* ── Адаптив ── */

@media (max-width: 800px) {
  .fw-topbar { flex-wrap: wrap; justify-content: center; }
  .fw-controls { gap: 10px; }
  .fw-spin-btn { min-width: 170px; padding: 14px 20px; }
}
