﻿*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #1a0a00;
  color: #fff;
  min-height: 100vh;
}

.landing {
  position: relative;
  width: 100%;
  height: 100vh;
  background-image: url('img/back.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* ── Header ── */
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 20px 32px;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

.info-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  position: relative;
}

.info-btn:hover { background: rgba(255, 255, 255, 0.28); }

.info-btn svg {
  width: 26px;
  height: 26px;
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.header-title .subtitle {
  display: block;
  font-size: 22px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.3;
}

.header-title .title {
  display: block;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Language switcher */
.lang-wrap { position: relative; }

.lang-switcher {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

.lang-switcher:hover { background: rgba(0, 0, 0, 0.5); }

.lang-flag {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.fi {
  width: 24px !important;
  height: 18px !important;
  border-radius: 3px;
  background-size: cover;
}

.lang-code { letter-spacing: 0.03em; }

.lang-arrow {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 2px;
  transition: transform 0.2s;
}

.lang-wrap.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  background: rgba(20, 10, 0, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
  z-index: 100;
}

.lang-wrap.open .lang-dropdown { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: background 0.15s;
  white-space: nowrap;
}

.lang-option:hover  { background: rgba(255, 255, 255, 0.1); }
.lang-option.active { background: rgba(255, 255, 255, 0.07); }

/* Go to site */
.go-to-site {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}

.go-to-site-text { text-align: right; }

.go-to-site-text .hint {
  font-size: 13px;
  opacity: 0.75;
  font-weight: 400;
  display: block;
  margin-bottom: 2px;
}

.go-to-site-text .label {
  font-size: 20px;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.go-to-site-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}

.go-to-site:hover .go-to-site-btn {
  transform: scale(1.08);
  background: #f0f0f0;
}

/* ── Footer ── */
.footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 10;
}

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible { display: flex; }

.modal {
  position: relative;
  background: #121212;
  border-radius: 20px;
  width: min(480px, 92vw);
  padding: 0 28px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: modal-in 0.35s ease;
  overflow: hidden;
}

@keyframes modal-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.22); }

.modal-img {
  width: calc(100% + 56px);
  margin-left: -28px;
  margin-right: -28px;
  pointer-events: none;
  line-height: 0;
  background: #121212;
}

.modal-img img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  line-height: 1.4;
}

.modal-prizes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: -8px;
  margin-bottom: 20px;
}

.modal-prize-item {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
}

.modal-password-wrap { position: relative; }
.modal-password-wrap .modal-input { padding-right: 48px; }

.modal-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 18px;
}

.modal-eye:hover { color: rgba(255,255,255,0.7); }

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.modal-input-row .modal-input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.modal-input {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.modal-input::placeholder { color: rgba(255,255,255,0.4); }
.modal-input:focus { border-color: rgba(255,100,100,0.5); }

.modal-phone-flag {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 52px;
  box-sizing: border-box;
}

.modal-submit {
  width: 100%;
  background: #e02020;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.modal-submit:hover { background: #c01818; }

.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.15);
}

.modal-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.modal-google-btn:hover { background: #f5f5f5; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.modal-google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.info-modal {
  width: min(420px, 92vw);
  padding: 32px 28px 28px;
  text-align: left;
}

.info-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.info-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-modal-body p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.info-modal-body strong {
  color: #e02020;
  font-size: 16px;
}

/* Desktop: hide mobile elements */
.mobile-title { display: none; }

/* ── Wheel ── */
.wheel-area {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.wheel-area .wheel-btn { pointer-events: auto; }

.wheel-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.wheel-logo {
  height: 10vh;
  width: auto;
  position: relative;
  z-index: 6;
  margin-bottom: -3vh;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.7));
}

.wheel-body {
  position: relative;
  width: 54vh;
  aspect-ratio: 1 / 1;
}

.wheel-sections {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: auto;
  object-fit: contain;
  will-change: transform;
  transform-origin: center center;
  margin-top: -43%;
  margin-left: -41%;
  z-index: 1;
}

.wheel-mask {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: auto;
  object-fit: contain;
  margin-top: -43%;
  margin-left: -41%;
  z-index: 2;
  pointer-events: none;
}

.wheel-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 115%;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

.wheel-btn-pos {
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26%;
  aspect-ratio: 1 / 1;
  z-index: 4;
}

.wheel-btn-pos.pulsing { animation: pulse-btn 1.2s ease-in-out infinite; }

.wheel-btn {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-image: url('img/spin_btn.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  outline: none;
  border: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
  transition: filter 0.15s;
}

.wheel-btn:hover { background-image: url('img/spin_btn_hover.png'); }
.wheel-btn:active { filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6)) brightness(0.9); }

@keyframes pulse-btn {
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ── Attempts counter ── */
.attempts-wrap {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  width: 28vh;
  z-index: 10;
}

.attempts-frame {
  width: 100%;
  height: auto;
  display: block;
}

.attempts-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.attempts-remained {
  display: block;
  font-size: 1vh;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.attempts-bottom {
  display: block;
  font-size: 2vh;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1.1;
  white-space: nowrap;
}

/* ── Result badges ── */
.result-badge {
  position: absolute;
  width: 22vh;
  height: auto;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transform: scale(0.6) translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.result-badge.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.badge-left  { left: 22%; top: 20%; }
.badge-right { right: 22%; top: 20%; }

/* ── Characters ── */
.char {
  position: absolute;
  bottom: 0;
  height: 70vh;
  width: auto;
  pointer-events: none;
  z-index: 3;
}

.char-left  { left: 0; }
.char-right { right: 0; }

/* ── v6: двухслойный фон ── */
.landing {
  background-image: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.bg-layer-1 {
  z-index: 0;
  background-image: url('img/bg_left.png');
}

.bg-layer-2 {
  z-index: 1;
  background-image: url('img/bg_right.png');
}

/* ── Responsive ── */
@media (max-width: 1439px) {
  .header-title .subtitle { font-size: 20px; }
  .header-title .title    { font-size: 34px; }
}

@media (max-width: 1279px) {
  header { padding: 16px 24px; }
  .logo img { height: 48px; }
  .header-title .subtitle { font-size: 18px; }
  .header-title .title    { font-size: 30px; }
  .go-to-site-text .label { font-size: 17px; }
}

@media (max-width: 768px) {
  .landing {
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
  }

  header {
    position: relative;
    top: auto; left: auto; right: auto;
    order: 1;
    flex: 0 0 auto;
    padding: 12px 16px;
    justify-content: space-between;
  }

  .footer {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    font-size: 12px;
    z-index: 10;
  }

  .header-title, .go-to-site, .lang-wrap { display: none !important; }
  .header-right { margin-left: 0; gap: 8px; }
  .logo { gap: 8px; }
  .logo img { height: 40px; }
  .info-btn { width: 28px; height: 28px; border-radius: 10px; margin-left: 4px; }
  .info-btn svg { width: 18px; height: 18px; }

  /* Mobile title */
  .mobile-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    order: 2;
    flex: 0 0 auto;
    padding: 4px 16px 0;
  }
  .mobile-subtitle { font-size: 15px; font-weight: 500; color: #fff; opacity: 0.9; }
  .mobile-heading  { font-size: 24px; font-weight: 800; color: #fff; line-height: 1.2; }

  .mobile-title { position: relative; z-index: 10; }

  /* Wheel */
  .wheel-area {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 5 !important;
    pointer-events: none !important;
  }

  .wheel-wrap {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: translateY(5%) !important;
  }

  .wheel-body { width: 76vw !important; }

  .wheel-logo {
    height: 18vw;
    margin-bottom: -5vw;
  }

  /* Characters — in front of wheel, bottom */
  .char { height: 55vw; z-index: 8; }
  .char-left  { left: -5vw; bottom: 0; }
  .char-right { right: -5vw; bottom: 0; }

  /* Badges */
  .result-badge { width: 28vw; }
  .badge-left  { left: 1%; top: 35%; bottom: auto; }
  .badge-right { right: 1%; top: 35%; bottom: auto; }

  /* Attempts — absolute, below wheel */
  .attempts-wrap {
    position: absolute;
    top: 68%;
    left: 50%;
    bottom: auto;
    transform: translateX(-50%);
    width: 50vw;
    z-index: 9;
  }
  .attempts-remained { font-size: 2.5vw; }
  .attempts-bottom   { font-size: 4.5vw; }
}

