/* ── «Колесо подарков» ─────────────────────────────────────────────
   Использует переменные и компоненты из style.css (цвета, .btn, .section, .step-card).
──────────────────────────────────────────────────────────────────── */

.gw-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + 48px) 0 80px;
  background:
    radial-gradient(ellipse 60% 50% at 25% 45%, rgba(255, 193, 7, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(29, 114, 243, 0.25), transparent 70%),
    linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #12386b 100%);
  color: var(--color-white);
}

.gw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}

.gw-hero .container {
  position: relative;
}

.gw-hero__head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}

.gw-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 100px;
}

.gw-hero__title {
  color: var(--color-white);
  font-size: clamp(1.75rem, 4.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.gw-hero__title span {
  color: var(--color-accent);
}

.gw-hero__desc {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: rgba(255, 255, 255, 0.75);
}

.gw-hero__new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-accent);
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3);
}

.gw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
}

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

.gw-wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gw-wheel {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.gw-wheel::before {
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.28), transparent 65%);
  opacity: 0.6;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.gw-wheel.is-spinning::before,
.gw-wheel.is-won::before {
  opacity: 1;
  animation: gwGlow 1.2s ease-in-out infinite alternate;
}

@keyframes gwGlow {
  from { transform: scale(0.97); }
  to   { transform: scale(1.04); }
}

.gw-wheel svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}

.gw-wheel__label {
  font-family: var(--font-sans);
  pointer-events: none;
  user-select: none;
}

.gw-wheel__label-main {
  font-weight: 800;
}

.gw-wheel__label-sub {
  font-weight: 600;
}

.gw-bulb {
  fill: #FFE69A;
  transition: fill 0.2s;
  animation: gwBulb 1.6s steps(1, end) infinite;
}

.gw-bulb:nth-of-type(even) {
  animation-delay: 0.8s;
}

.gw-wheel.is-spinning .gw-bulb {
  animation-duration: 0.3s;
}

.gw-wheel.is-spinning .gw-bulb:nth-of-type(even) {
  animation-delay: 0.15s;
}

@keyframes gwBulb {
  0%   { fill: #FFF6D5; filter: drop-shadow(0 0 4px #FFC107); }
  50%  { fill: #B8860B; filter: none; }
}

.gw-sector-win {
  fill: rgba(255, 255, 255, 0);
  stroke: #FFF;
  stroke-width: 0;
  pointer-events: none;
}

.gw-wheel.is-won .gw-sector-win {
  animation: gwWinSector 0.9s ease-in-out infinite alternate;
}

@keyframes gwWinSector {
  from { fill: rgba(255, 255, 255, 0.05); stroke-width: 3; }
  to   { fill: rgba(255, 255, 255, 0.35); stroke-width: 6; }
}

.gw-pointer {
  transform-origin: 250px 6px;
  transition: transform 0.08s ease-out;
}

.gw-pointer.is-tick {
  animation: gwTick 0.16s ease-out;
}

@keyframes gwTick {
  0%   { transform: rotate(0); }
  35%  { transform: rotate(-16deg); }
  100% { transform: rotate(0); }
}

.gw-hub {
  cursor: default;
}

.gw-wheel__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20%;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* ── Действия под колесом ── */

.gw-actions {
  width: 100%;
  max-width: 540px;
  margin-top: 28px;
  text-align: center;
}

.gw-spin-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  padding: 20px 32px;
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.4);
  animation: gwPulse 1.8s ease-in-out infinite;
}

html[lang="kk"] .gw-spin-btn {
  letter-spacing: 0.02em;
  font-size: 1.0625rem;
}

.gw-spin-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  animation: gwShine 2.6s ease-in-out infinite;
}

.gw-spin-btn:disabled {
  cursor: default;
  animation: none;
  opacity: 0.85;
  transform: none;
}

.gw-spin-btn:disabled::after {
  display: none;
}

@keyframes gwPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 193, 7, 0.35), 0 0 0 0 rgba(255, 193, 7, 0.55); }
  50%      { box-shadow: 0 10px 30px rgba(255, 193, 7, 0.5), 0 0 0 14px rgba(255, 193, 7, 0); }
}

@keyframes gwShine {
  0%   { left: -60%; }
  60%, 100% { left: 130%; }
}

.gw-actions__hint {
  margin-top: 12px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.gw-actions__error {
  margin-top: 12px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #FFD7DA;
  background: rgba(230, 57, 70, 0.18);
  border: 1px solid rgba(230, 57, 70, 0.4);
  border-radius: var(--radius-md);
}

.gw-already {
  padding: 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gw-already__title {
  color: var(--color-accent);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.gw-already__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

.gw-already__prize {
  margin: 8px 0 4px;
  color: var(--color-white);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
}

.gw-already__desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.gw-already__meta {
  margin-top: 10px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.gw-already__meta b {
  color: var(--color-white);
  letter-spacing: 0.06em;
}

.gw-already__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.gw-sound {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  cursor: pointer;
}

.gw-sound:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Боковая панель ── */

.gw-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gw-panel__title {
  color: var(--color-white);
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.gw-prizes {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.gw-prize {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.gw-prize.is-won {
  background: rgba(255, 193, 7, 0.16);
  border-color: var(--color-accent);
  transform: scale(1.02);
}

.gw-prize__dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.gw-prize__text {
  min-width: 0;
}

.gw-prize__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-white);
}

.gw-prize__desc {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.6);
}

.gw-rules {
  display: grid;
  gap: 10px;
}

.gw-rules li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

.gw-rules li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A2342' stroke-width='3.5'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 11px;
}

/* ── Модальное окно результата ── */

.gw-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 21, 40, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.gw-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.gw-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: scale(0.7) translateY(40px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.gw-modal.is-open .gw-modal__dialog {
  transform: scale(1) translateY(0);
}

.gw-modal__top {
  position: relative;
  padding: 32px 24px 28px;
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 193, 7, 0.45), transparent 60%),
    linear-gradient(160deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  overflow: hidden;
}

.gw-modal__top::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.07) 0 10deg, transparent 10deg 20deg);
  animation: gwRays 18s linear infinite;
  pointer-events: none;
}

@keyframes gwRays {
  to { transform: rotate(360deg); }
}

.gw-modal__gift {
  position: relative;
  font-size: 64px;
  line-height: 1;
  margin-bottom: 12px;
  animation: gwGiftBounce 1.4s ease-in-out infinite;
}

@keyframes gwGiftBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50%      { transform: translateY(-8px) rotate(4deg) scale(1.08); }
}

.gw-modal__congrats {
  position: relative;
  color: var(--color-accent);
  font-size: clamp(1.25rem, 4.2vw, 1.625rem);
  font-weight: 800;
  line-height: 1.25;
}

.gw-modal__body {
  padding: 24px 24px 28px;
}

.gw-modal__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.gw-modal__prize {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--gw-prize-color, var(--color-accent));
  color: var(--gw-prize-text, var(--color-primary));
  box-shadow: 0 10px 24px rgba(10, 35, 66, 0.18);
  animation: gwPrizeIn 0.7s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.gw-modal__prize-title {
  font-size: clamp(1.375rem, 5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  color: inherit;
}

.gw-modal__prize-desc {
  margin-top: 6px;
  font-size: 1rem;
  opacity: 0.92;
}

.gw-modal__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.gw-modal__meta b {
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

.gw-modal__note {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
  color: var(--color-text);
  background: #FFF8E1;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
}

.gw-modal__buttons {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.gw-modal__buttons .btn {
  width: 100%;
  white-space: normal;
}

.gw-save-btn {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 16px 24px;
}

.gw-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.gw-modal__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.gw-modal__link {
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--color-text-light);
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

.gw-saved {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.gw-saved img {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 10px auto 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.gw-confetti {
  position: fixed;
  inset: 0;
  z-index: 2100;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Промо-блок на главной и ссылка в меню (стили — в style.css) ── */

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

@media (max-width: 1024px) {
  .gw-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gw-panel {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .gw-hero {
    padding: calc(var(--header-height) + 28px) 0 56px;
  }

  .gw-hero__head {
    margin-bottom: 24px;
  }

  .gw-panel {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .gw-spin-btn {
    padding: 18px 20px;
    font-size: 1.0625rem;
  }

  .gw-modal__top {
    padding: 28px 20px 22px;
  }

  .gw-modal__gift {
    font-size: 52px;
  }

  .gw-modal__body {
    padding: 20px 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gw-spin-btn,
  .gw-spin-btn::after,
  .gw-bulb,
  .gw-modal__gift,
  .gw-modal__top::before,
  .gw-wheel::before {
    animation: none !important;
  }
}
