:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 24px 80px rgba(15, 23, 42, 0.75);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.7),
      transparent
    );
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  color: #e5e7eb;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.nav-link {
  color: var(--text-muted);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.hero {
  padding: 0;
}

/* YouTube как фон: контейнер и слой видео */
.hero-with-video {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* iframe растягиваем так, чтобы видео всегда перекрывало высоту (16:9, центр по горизонтали) */
.hero-video-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100vh;
  aspect-ratio: 16 / 9;
  width: auto;
  min-width: 100vw;
  transform: translate(-50%, -50%);
  border: none;
  pointer-events: none;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 22, 0.75),
    rgba(5, 8, 22, 0.5),
    rgba(5, 8, 22, 0.85)
  );
  pointer-events: none;
}

.wheel-layer {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.wheel-wrapper {
  position: relative;
  width: min(75vh, 800px);
  max-width: 100%;
}

@media (max-width: 768px) {
  .wheel-wrapper {
    width: min(80vh, 375px);
  }
}

.wheel-image {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}

.wheel-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18%;
  height: auto;
  pointer-events: none;
}

.spin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30.5px 48.8px;
  min-width: 412px;
  height: 80px;

  background: #04aa1a;
  box-shadow: 0 0 32px rgba(11, 217, 39, 0.45);
  border-radius: 8px;
  border-color: #04aa1a;

  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 36.6px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.spin-button:hover {
  background: #05b71d;
  border-color: #05b71d;
  box-shadow: 0 0 40px rgba(11, 217, 39, 0.65);
}

.spin-button:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
}

.hidden {
  display: none !important;
}

/* Модалка выигрыша поверх всего экрана */
.win-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.win-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.win-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.win-modal-inner {
  position: relative;
  width: 100%;
  max-width: 841px;
  padding: 0 16px;
}

.win-svg-wrap {
  position: relative;
  width: 100%;
}

.win-svg-image {
  display: block;
  width: 100%;
  height: auto;
}

.win-svg-wrap .win-banner-cta {
  position: absolute;
  left: 50%;
  bottom: 19%;
  transform: translateX(-50%);
}

@media (max-width: 480px) {
  .win-svg-wrap .win-banner-cta {
    width: 210px;
    min-width: 210px;
    height: 42px;
    padding: 8px 16px;
    font-size: 14px;
  }
}

.win-banner-card {
  position: relative;
  margin: 0 auto;
  padding: 40px 32px 36px;
  border-radius: 32px;
  box-shadow: 0 0 56px rgba(10, 10, 10, 0.72);
  border: 3px solid #f4d27a;
  background: radial-gradient(
    124.05% 81.77% at 49.17% 38.29%,
    rgba(13, 13, 13, 0.7) 0%,
    rgba(13, 13, 13, 0.9) 40.57%,
    #0d0d0d 100%
  );
  overflow: hidden;
}

.win-banner-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 20px;
  background: radial-gradient(circle at top, #451010, #220707 60%, #050101 100%);
  opacity: 0.96;
}

.win-banner-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.win-banner-subtitle {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f4d27a;
}

.win-banner-title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffd65c;
}

.win-banner-cta {
  margin-top: 4px;
  padding: 14px 40px;
  min-width: 368px;
  height: 80px;
  border-radius: 10px;
  border: none;
  background: #04aa1a;
  box-shadow: 0 0 32px rgba(11, 217, 39, 0.55);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  cursor: pointer;
}

.win-banner-cta:hover {
  background: #05b71d;
  box-shadow: 0 0 40px rgba(11, 217, 39, 0.7);
}

.scratch-section {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

.scratch-title-wrap {
  display: flex;
  justify-content: center;
}

.scratch-title-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 841px;
  height: 180px;
  padding: 0 24px;
  border-radius: 20px;
  border: 2px solid #f4d27a;
  background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.9),
      rgba(0, 0, 0, 0.9)
    ),
    radial-gradient(circle at top, rgba(0, 0, 0, 0.4), transparent 60%);
}

.scratch-title-text {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 67px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffd65c;
}

@media (max-width: 480px) {
  .scratch-title-plate {
    width: 288px;
    height: 58px;
    padding: 0 12px;
  }

  .scratch-title-text {
    font-size: 20px;
  }
}

.scratch-grid {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  justify-items: center;
}

.scratch-card-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 380 / 250;
}

.scratch-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: none;
  background-image: url("assets/Card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.scratch-card.is-revealed {
  opacity: 0;
  pointer-events: none;
}

.scratch-card-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.scratch-card-video.is-playing {
  z-index: 2;
  opacity: 1;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 22, 0.75),
    rgba(5, 8, 22, 0.5),
    rgba(5, 8, 22, 0.85)
  );
  pointer-events: none;
}

.hero-with-video .hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-text {
  max-width: 620px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}

.hero-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.8);
  background: radial-gradient(circle at top left, #4f46e5, #1d4ed8);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.4);
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.55);
  border-color: rgba(165, 180, 252, 0.9);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.button-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: none;
}

.button-outline:hover {
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.85);
}

.section {
  padding: 48px 0;
}

.section-alt {
  background: radial-gradient(circle at top left, #020617, #020617 40%, #050816);
}

.section-title {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.section-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 620px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.feature-card {
  background: radial-gradient(circle at top left, #0b1020, #020617);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.85;
  pointer-events: none;
}

.feature-title {
  position: relative;
  margin: 0 0 6px;
  font-size: 15px;
}

.feature-text {
  position: relative;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cta {
  text-align: center;
}

.cta .section-text {
  margin: 0 auto 18px;
}

.footer {
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background: rgba(2, 6, 23, 0.95);
  padding: 14px 0 18px;
  margin-top: 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-link {
  color: #9ca3ff;
  text-decoration: none;
  font-size: 13px;
}

.footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .spin-button {
    min-width: 258px;
    width: 258px;
    height: 48px;
    padding: 12px 24px;
    font-size: 18px;
  }
}

.scratch-result {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.scratch-result-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
}

.scratch-result-image {
  display: block;
  width: 100%;
  height: auto;
}

.scratch-result-wrap .scratch-result-cta {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
}

@media (max-width: 480px) {
  .scratch-result-wrap .scratch-result-cta {
    width: 210px;
    min-width: 210px;
    height: 42px;
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Модалка регистрации */
.registration-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.registration-modal.hidden {
  display: none;
}

.registration-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.registration-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 16px;
  padding: 32px;
  background: #1f2937;
  border-radius: 16px;
  border: 1px solid #374151;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.registration-modal-tabs {
  display: flex;
  margin-bottom: 24px;
}

.registration-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-size: inherit;
}

.registration-tab:hover {
  color: #fff;
}

.registration-tab.registration-tab--active {
  color: #f97316;
  border-bottom-color: #f97316;
}

.registration-modal-bonus {
  position: relative;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #8b5cf6 100%);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  gap: 12px;
}

.registration-modal-bonus-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.registration-modal-bonus-text {
  flex: 1;
}

.registration-modal-bonus-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.registration-modal-bonus-desc {
  margin: 2px 0 0 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
}

.registration-modal-bonus-badge {
  display: inline-block;
  background: rgba(17, 24, 39, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.registration-modal-error {
  background: #dc2626;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
  color: #fff;
  font-size: 14px;
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.registration-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.registration-field-label {
  color: #d1d5db;
  font-size: 14px;
}

.registration-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.registration-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.registration-password-wrap {
  position: relative;
}

.registration-password-wrap .registration-input {
  padding-right: 44px;
}

.registration-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.registration-password-toggle:hover {
  color: #fff;
}

.registration-field-error {
  color: #ef4444;
  font-size: 12px;
  min-height: 16px;
}

.registration-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: #d1d5db;
  font-size: 12px;
  line-height: 1.4;
}

.registration-checkbox input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #f97316;
  cursor: pointer;
}

.registration-link {
  color: #f97316;
  text-decoration: none;
}

.registration-link:hover {
  text-decoration: underline;
}

.registration-submit {
  width: 100%;
  padding: 12px;
  background: #6b46c1;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, opacity 0.2s;
}

.registration-submit:hover:not(:disabled) {
  background: #553c9a;
}

.registration-submit:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.7;
}
