:root {
  --bg: #020807;
  --panel: #071310;
  --panel-2: #101814;
  --line: rgba(226, 239, 232, 0.28);
  --line-bright: rgba(255, 255, 255, 0.82);
  --text: #f5f7f5;
  --muted: #a7b1ad;
  --green: #19c987;
  --green-2: #5ee8aa;
  --red: #ff767a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -12%, rgba(203, 190, 126, 0.17), transparent 38%),
    linear-gradient(180deg, #11150f 0%, var(--bg) 45%, #000 100%);
  color: var(--text);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif;
  letter-spacing: 0;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  width: min(100%, 650px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 0;
  overflow: hidden;
}

.phone-frame {
  position: relative;
  min-height: calc(100vh - 16px);
  padding: 36px 20px 18px;
  border: 2px solid rgba(232, 244, 239, 0.18);
  border-radius: 38px 38px 0 0;
  background:
    linear-gradient(90deg, rgba(43, 215, 150, 0.2), transparent 5%, transparent 95%, rgba(43, 215, 150, 0.2)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(5, 18, 15, 0.98) 40%, #020807 100%);
  box-shadow:
    inset 0 0 0 16px rgba(255, 255, 255, 0.03),
    inset 0 -24px 42px rgba(37, 226, 150, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.8);
}

.language-toggle {
  position: fixed;
  z-index: 30;
  top: max(12px, env(safe-area-inset-top));
  right: calc(50% - min(50vw, 325px) + 12px);
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(4, 12, 14, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.language-toggle span {
  color: #29a9ff;
  font-size: 35px;
  line-height: 1;
}

.language-panel {
  position: fixed;
  z-index: 29;
  top: max(85px, calc(env(safe-area-inset-top) + 84px));
  right: calc(50% - min(50vw, 325px) + 16px);
  width: min(282px, calc(100vw - 34px));
  max-height: min(72vh, 810px);
  overflow-y: auto;
  padding: 16px 10px;
  border: 2px solid rgba(208, 216, 216, 0.2);
  border-radius: 18px;
  background: rgba(3, 10, 10, 0.94);
  box-shadow: -12px 18px 36px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
}

.language-panel button {
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}

.language-panel button.is-active {
  background: rgba(20, 196, 127, 0.25);
  color: #fff;
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(231, 239, 236, 0.22);
  border-radius: 24px;
  background: #111;
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.5),
    0 14px 30px rgba(0, 0, 0, 0.28);
}

.video-card {
  aspect-ratio: 16 / 9;
}

.hero-video,
.image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  width: 116px;
  height: 116px;
  margin: auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: #67ddb0;
  box-shadow: 0 0 0 18px rgba(188, 193, 190, 0.72);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 19px solid transparent;
  border-bottom: 19px solid transparent;
  border-left: 29px solid #061310;
}

.video-card.is-playing .play-button {
  opacity: 0;
  pointer-events: none;
}

.image-card {
  height: clamp(310px, 55vh, 480px);
  margin-top: 18px;
}

.image-card img {
  object-position: center top;
}

.image-action {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 118px;
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(26, 27, 24, 0.7), rgba(44, 47, 42, 0.95));
  border-top: 1px solid rgba(255, 88, 88, 0.6);
  color: #fff;
  font-size: clamp(21px, 4.1vw, 28px);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.chevron {
  width: 22px;
  height: 22px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(45deg) translateY(-5px);
}

.copy-block {
  padding: 24px 0 14px;
  text-align: center;
}

.copy-block h1 {
  margin: 0 0 16px;
  color: #f7f8f5;
  font-size: clamp(31px, 6vw, 39px);
  font-weight: 950;
  line-height: 1.08;
}

.copy-block p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(245, 250, 247, 0.78);
  font-size: clamp(18px, 3.7vw, 23px);
  font-weight: 600;
  line-height: 1.42;
}

.reward-button {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 18px;
  border: 2px solid rgba(148, 255, 204, 0.95);
  border-radius: 22px;
  background: linear-gradient(135deg, #45e69b, #08bf78);
  color: #061210;
  font-size: clamp(23px, 4.4vw, 31px);
  font-weight: 950;
  box-shadow:
    0 0 0 16px rgba(37, 199, 130, 0.18),
    inset 0 -8px 20px rgba(0, 105, 69, 0.16);
}

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.status-modal {
  position: relative;
  width: min(586px, 100%);
  min-height: 292px;
  padding: 44px 24px 34px;
  border: 2px solid var(--line-bright);
  border-radius: 28px;
  background: rgba(7, 18, 17, 0.92);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.status-modal h2 {
  margin: 26px 0 16px;
  font-size: clamp(27px, 5.2vw, 35px);
  font-weight: 950;
  line-height: 1.15;
}

.status-modal p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 3.8vw, 24px);
}

.spinner {
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border: 7px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--green-2);
  border-right-color: rgba(25, 201, 135, 0.7);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.error-state {
  border-color: rgba(238, 247, 244, 0.25);
}

.alert-icon {
  display: grid;
  width: 90px;
  height: 90px;
  margin: 0 auto;
  place-items: center;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 58px;
  font-weight: 950;
  line-height: 1;
}

.error-state h2 {
  color: #ff8b8f;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 440px;
  margin: 28px auto 0;
}

.modal-actions button {
  min-height: 74px;
  border-radius: 16px;
  font-size: clamp(21px, 4.2vw, 28px);
  font-weight: 950;
}

.secondary-button {
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

.retry-button {
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(83, 18, 30, 0.62);
  color: #ffb0b3;
}

[hidden] {
  display: none !important;
}

html[dir="rtl"] .language-panel button,
html[dir="rtl"] .copy-block {
  direction: rtl;
}

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

@media (max-width: 420px) {
  .page-shell {
    padding: 12px 10px 0;
  }

  .phone-frame {
    padding: 36px 18px 14px;
    border-radius: 32px 32px 0 0;
  }

  .language-toggle {
    right: 10px;
    width: 54px;
    height: 54px;
  }

  .language-panel {
    right: 16px;
    width: calc(100vw - 48px);
  }

  .image-card {
    height: 43vh;
    min-height: 300px;
  }

  .image-action {
    min-height: 106px;
  }
}
