:root {
  color-scheme: dark;
  --chrome: #1c2733;
  --bg: #080d15;
  --panel: #111824;
  --panel-2: #1a2530;
  --text: #f8fbff;
  --muted: #8794a6;
  --blue: #25bdf3;
  --blue-2: #5d68ff;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 16%, rgba(51, 70, 134, 0.22), transparent 34%),
    linear-gradient(180deg, #0b111b 0%, #060a11 100%);
  letter-spacing: 0;
}

button {
  font: inherit;
}

.telegram-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 52px 1fr 48px 44px;
  align-items: center;
  width: min(100%, 480px);
  height: 70px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  background: var(--chrome);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.telegram-bar h1 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 750;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.app-shell {
  width: min(100%, 460px);
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: 14px 14px max(24px, env(safe-area-inset-bottom));
}

.tg-native .telegram-bar {
  display: none;
}

.tg-native .app-shell {
  min-height: 100vh;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.intro {
  padding: 42px 0 34px;
}

.intro h2 {
  margin: 0;
  background: linear-gradient(100deg, #24aef0, #f370ff);
  background-clip: text;
  color: transparent;
  font-size: 2.9rem;
  font-weight: 400;
  line-height: 1;
}

.intro p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.55rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #242c3a;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.video-card:active {
  transform: scale(0.985);
}

.video-card:focus-visible {
  outline: 2px solid rgba(37, 189, 243, 0.9);
  outline-offset: 3px;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    #242c3a;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(0, 0, 0, 0.44);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-ad {
  min-height: 330px;
  margin: 0 24px 42px;
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 52%, rgba(255, 255, 255, 0.26), transparent 18%),
    linear-gradient(135deg, #0c1220, #070b13);
}

.banner-ad strong,
.banner-ad span,
.banner-ad small {
  display: block;
}

.banner-ad strong {
  font-size: 2.25rem;
  letter-spacing: 0;
}

.banner-ad span {
  margin-top: 14px;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.17;
}

.banner-ad button {
  margin-top: 24px;
  border: 0;
  border-radius: 6px;
  padding: 10px 22px;
  color: #fff;
  background: #08a757;
  font-weight: 800;
}

.banner-ad small {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.82);
}

.ad-screen {
  padding-top: 0;
}

.ad-creative {
  position: relative;
  height: 480px;
  margin: 0 -16px;
  overflow: hidden;
  padding: 28px 22px;
  background:
    radial-gradient(circle at 70% 14%, rgba(81, 246, 255, 0.58), transparent 18%),
    radial-gradient(circle at 72% 70%, rgba(140, 31, 255, 0.58), transparent 34%),
    linear-gradient(135deg, #027ce8, #140d68);
}

.ad-logo {
  color: #fff4a6;
  font-size: 3rem;
  font-weight: 1000;
}

.phone-stack {
  position: absolute;
  inset: 100px 20px auto 20px;
  height: 320px;
}

.phone-stack span {
  position: absolute;
  bottom: 0;
  width: 34%;
  height: 78%;
  border-radius: 18px;
  background: linear-gradient(180deg, #161a24, #090b11);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.phone-stack span:nth-child(1) {
  left: 0;
  transform: rotate(-4deg);
}

.phone-stack span:nth-child(2) {
  left: 33%;
  height: 100%;
  transform: scale(1.12);
  background: linear-gradient(180deg, #3514a8, #181827 40%, #8b27f0 60%, #151923);
}

.phone-stack span:nth-child(3) {
  right: 0;
  transform: rotate(4deg);
}

.ad-creative strong {
  position: absolute;
  left: 160px;
  top: 240px;
  font-size: 1.7rem;
  line-height: 1.1;
  text-align: center;
}

.ad-copy-card,
.advertiser-card {
  margin: -16px 6px 0;
  border-radius: 20px;
  background: var(--panel-2);
}

.ad-copy-card {
  position: relative;
  padding: 22px;
}

.ad-copy-card h2 {
  margin: 0;
  font-size: 1.72rem;
  font-weight: 500;
}

.ad-copy-card p {
  margin: 16px 0 0;
  font-size: 1.42rem;
  line-height: 1.3;
}

.ad-copy-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  text-align: right;
  font-size: 1.05rem;
}

.advertiser-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  margin-top: 3px;
  padding: 14px 16px;
}

.advertiser-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff4a6;
  background: #040609;
  font-weight: 1000;
}

.advertiser-card span {
  color: #8b95a3;
  font-size: 1.55rem;
}

.progress-shell {
  position: relative;
  height: 68px;
  margin: 26px 6px 0;
  overflow: hidden;
  border-radius: 16px;
  background: #87949f;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #52aee9;
  transition: width 600ms ease;
}

.progress-shell strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 500;
}

.timer-badge,
.ad-source {
  width: max-content;
  max-width: 100%;
  margin: 86px auto 0;
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(26, 37, 48, 0.9);
  font-size: 1.35rem;
}

.ad-source {
  margin-top: 24px;
  color: #72b8eb;
  font-size: 1.1rem;
}

.unlocked-screen {
  min-height: calc(100vh - 70px);
  padding: 34px 0 28px;
  background:
    radial-gradient(circle at 50% 8%, rgba(37, 189, 243, 0.2), transparent 34%),
    radial-gradient(circle at 100% 42%, rgba(255, 112, 215, 0.12), transparent 28%),
    rgba(0, 0, 0, 0.34);
}

.floating-ad {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 150px;
  margin: 0 2px 22px;
  padding: 22px;
  border-radius: 16px;
  background: #4365a6;
  box-shadow: 0 8px 24px rgba(67, 101, 166, 0.32);
}

.floating-ad > button:first-child {
  position: absolute;
  top: 8px;
  right: 14px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 2.2rem;
  cursor: pointer;
}

.wheel-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: #fff;
  color: #ffc02e;
  font-size: 2.5rem;
  font-weight: 900;
}

.floating-ad strong {
  font-size: 1.3rem;
}

.floating-ad span {
  grid-column: 2 / 4;
  font-size: 1.17rem;
}

.floating-ad button:last-child {
  grid-column: 3;
  grid-row: 1;
  min-width: 118px;
  border: 0;
  border-radius: 999px;
  padding: 14px;
  color: #4365a6;
  background: #fff;
  font-weight: 900;
}

.unlock-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 30px 26px 26px;
  border: 1px solid rgba(120, 150, 190, 0.17);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(8, 13, 22, 0.96)),
    rgba(13, 18, 29, 0.92);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
}

.unlock-card::before {
  content: "";
  position: absolute;
  inset: -80px 24px auto;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 189, 243, 0.2), transparent 68%);
  pointer-events: none;
}

.success-pill {
  position: relative;
  width: max-content;
  margin: 0 auto 22px;
  padding: 7px 13px;
  border: 1px solid rgba(16, 228, 154, 0.22);
  border-radius: 999px;
  color: #7dffd1;
  background: rgba(16, 228, 154, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.unlock-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 24px;
  border: 1px solid rgba(16, 228, 154, 0.24);
  border-radius: 22px;
  color: #10e49a;
  background: linear-gradient(180deg, rgba(16, 228, 154, 0.18), rgba(16, 228, 154, 0.08));
  box-shadow: 0 18px 40px rgba(16, 228, 154, 0.1);
}

.unlock-icon svg,
.open-button svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.unlock-card h2 {
  position: relative;
  margin: 0;
  background: linear-gradient(90deg, #36baff, #ff70d7);
  background-clip: text;
  color: transparent;
  font-size: clamp(2.2rem, 12vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.unlock-card p {
  position: relative;
  max-width: 260px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.4;
}

.secure-link-box {
  position: relative;
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(8, 14, 25, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.secure-link-box span {
  display: block;
  margin-bottom: 7px;
  color: #718098;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.unlock-card code {
  display: block;
  overflow-wrap: anywhere;
  color: #2fc4ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.35;
}

.open-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  margin-top: 24px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(100deg, #22aeee, #6364ff);
  box-shadow: 0 18px 36px rgba(50, 128, 255, 0.24);
  font-size: 1.22rem;
  font-weight: 800;
  cursor: pointer;
}

.open-button:disabled {
  opacity: 0.62;
}

.text-button {
  margin-top: 22px;
  border: 0;
  color: #667286;
  background: transparent;
  font-size: 0.95rem;
  cursor: pointer;
}

.bonus-layer[hidden] {
  display: none;
}

.bonus-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 34px max(74px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.18);
}

.bonus-dialog {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  border-radius: 8px;
  color: #282828;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.bonus-dialog > button:first-child {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  color: #8e8e8e;
  background: transparent;
  font-size: 2.1rem;
  cursor: pointer;
}

.money-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 64px;
  margin: 38px auto 30px;
  border-radius: 12px;
  color: #ffdf2e;
  background: #07b94f;
  font-size: 2.6rem;
  font-weight: 900;
  box-shadow: 18px 14px 0 #08a846;
}

.bonus-dialog h2 {
  margin: 0;
  font-size: 2rem;
}

.bonus-dialog p {
  margin: 20px 30px 34px;
  font-size: 1.45rem;
}

.bonus-dialog button:last-child {
  width: 100%;
  min-height: 72px;
  border: 0;
  border-top: 1px solid #e6e6e6;
  color: #e9b100;
  background: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
}

.error-text {
  padding: 12px;
  border: 1px solid rgba(255, 92, 126, 0.35);
  border-radius: 12px;
  color: #ffb9c9;
  background: rgba(255, 92, 126, 0.1);
  font-size: 0.95rem !important;
}

@media (max-width: 380px) {
  .telegram-bar h1 {
    font-size: 1.15rem;
  }

  .video-grid {
    gap: 15px 12px;
  }
}
