:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(21, 21, 21, 0.85);
  --panel-soft: rgba(41, 41, 41, 0.6);
  --panel-line: rgba(255, 255, 255, 0.1);
  --text: #fdfdfd;
  --muted: #a2a2a2;
  --orange: #ff4d29;
  --orange-glow: rgba(255, 77, 41, 0.4);
  --gold: #f6d39e;
  --brown: #54331d;
  --blue: #13b6ed;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #000;
  color: var(--text);
  font-family:
    'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
}

button:active:not([disabled]) {
  transform: scale(0.96);
}

button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.player-screen,
.video-player,
.video-scrim,
.overlay {
  position: absolute;
  inset: 0;
}

.player-screen {
  min-height: 100svh;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background:
    linear-gradient(160deg, rgba(50, 24, 17, 0.45), rgba(0, 0, 0, 0.85)),
    #171717;
}

.video-scrim {
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 18%, transparent 72%, #000 98%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.08));
}

.top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 18px 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brand-mark,
.coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b3d, #ff4d29);
  color: #fff;
  font-weight: 900;
}

.brand-mark {
  box-shadow: inset -8px 0 rgba(0, 0, 0, 0.22);
}

.play-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 52%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-button:active:not([disabled]) {
  transform: translate(-50%, -50%) scale(0.92);
}

.video-player.is-loading {
  opacity: 0.5;
  filter: blur(2px);
}

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

.play-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.play-button[disabled]::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.play-button[disabled] svg {
  display: none;
}

.play-button.is-playing {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: none;
}

.play-button svg {
  width: 44px;
  height: 44px;
  fill: #fff;
}

.episode-bar {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.85) 0%, rgba(15, 15, 15, 0.6) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
  color: #bbb;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.episode-bar strong {
  color: #fff;
}

.episode-bar svg {
  width: 24px;
  height: 24px;
  margin-left: auto;
  stroke: #aaa;
  stroke-width: 3;
  fill: none;
}

.stack-icon {
  position: relative;
  width: 28px;
  height: 28px;
  margin-right: 4px;
}

.stack-icon span {
  position: absolute;
  left: 2px;
  width: 22px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 3px;
  transform: rotate(-30deg);
}

.stack-icon span:nth-child(1) {
  top: 5px;
}

.stack-icon span:nth-child(2) {
  top: 12px;
}

.stack-icon span:nth-child(3) {
  top: 19px;
}

.sheet,
.overlay {
  z-index: 8;
  background: rgba(19, 19, 19, 0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.sheet[aria-hidden="true"],
.overlay[aria-hidden="true"] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  max-height: 82svh;
  padding: 46px 16px 24px;
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: var(--glass-border);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6), var(--shadow);
  transform: translateY(0);
}

.sheet[aria-hidden="true"] {
  transform: translateY(26px);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0), var(--shadow);
}

.close-button,
.round-close {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.close-button:hover,
.round-close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.close-button:active,
.round-close:active {
  transform: scale(0.92);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  z-index: 10;
}

.close-button svg,
.round-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.drama-cover {
  display: block;
  width: 96px;
  height: 136px;
  margin: 0 auto 20px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--panel-soft);
}

.episode-sheet h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}

.description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.description.expanded {
  display: block;
}

.text-link {
  display: inline;
  margin-left: 4px;
  padding: 0;
  background: transparent;
  color: var(--orange);
  font-size: 17px;
}

.divider {
  height: 1px;
  margin: 24px 0;
  background: var(--panel-line);
}

.sheet h2 {
  margin: 0 0 20px;
  color: #f2f2f2;
  font-size: 22px;
  line-height: 1.35;
}

.checkout-content h2 {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #ddd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.range-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 20px;
}

.range-tab {
  padding: 0;
  background: transparent;
  color: #8f8f8f;
  font-size: 18px;
  font-weight: 700;
}

.range-tab.is-active {
  color: #fff;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 14px;
}

.episode-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 12px;
  background: rgba(45, 45, 45, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border 0.2s ease;
}

.episode-tile:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.15);
}

.episode-tile:active {
  transform: scale(0.94);
}

.episode-tile.is-active {
  background: linear-gradient(135deg, rgba(255, 77, 41, 0.25), rgba(0, 0, 0, 0.3)), rgba(41, 41, 41, 0.85);
  border: 1px solid #ffba52;
  box-shadow: 0 4px 20px rgba(255, 77, 41, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #fff;
}

.episode-tile.is-trailer {
  color: #a5a5a5;
  font-weight: 800;
}

.lock-badge {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 0 7px 0 8px;
  background: var(--orange);
}

.lock-badge svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.locked-screen {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 77, 41, 0.1), transparent 50%),
    linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95)),
    var(--locked-bg, #111);
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lock-panel {
  position: absolute;
  left: 32px;
  right: 32px;
  top: 40%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.lock-episode-label {
  margin: 0;
  color: #ffba52;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lock-back {
  margin-top: 4px;
  font-size: 16px;
}

.big-lock {
  width: 88px;
  height: 88px;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: rgba(0, 0, 0, 0.2);
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.15));
}

.lock-panel h2 {
  max-width: 720px;
  margin: 0;
  font-size: 25px;
  line-height: 1.42;
}

.primary-button,
.light-button,
.checkout-cta {
  min-height: 56px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
}

.primary-button {
  width: min(622px, 100%);
  background: linear-gradient(135deg, #ff8c69, #ff4d29);
  box-shadow: 0 10px 25px rgba(255, 77, 41, 0.35);
  color: #fff;
  border: none;
  transition: all 0.2s ease;
}

.primary-button:active {
  transform: scale(0.97);
  box-shadow: 0 5px 15px rgba(255, 77, 41, 0.2);
}

.offer-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 32px;
  background:
    radial-gradient(circle at 50% 48%, rgba(190, 123, 32, 0.28), transparent 28%),
    linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.84)),
    var(--locked-bg, #111);
  background-size: cover;
  background-position: center;
}

.offer-copy {
  width: 100%;
  text-align: center;
}

.offer-copy h2 {
  margin: 0 0 20px;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffba52, #ff4d29);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: #ffba52;
  font-size: 18px;
  font-weight: 700;
}

.countdown span {
  display: inline-block;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 186, 82, 0.12);
  color: #ffba52;
  border: 1px solid rgba(255, 186, 82, 0.2);
}

.offer-card {
  width: min(532px, 100%);
  min-height: auto;
  padding: 28px 24px;
  border: 1.5px solid rgba(255, 186, 82, 0.35);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(28, 20, 14, 0.98), rgba(8, 6, 5, 0.99));
  color: #fdfdfd;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(255, 186, 82, 0.15);
}

.offer-card h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
}

.offer-card p {
  margin: 0 0 20px;
  color: #bbb;
  font-size: 16px;
}

.offer-card strong {
  display: block;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.offer-card s {
  display: block;
  margin: 4px 0 24px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
}

.light-button {
  width: 100%;
  background: linear-gradient(135deg, #ffe5be, #e5b95c);
  color: #4a2d10;
  box-shadow: 0 8px 24px rgba(229, 185, 92, 0.3);
  border: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.light-button:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(229, 185, 92, 0.25);
}

.round-close {
  width: 48px;
  height: 48px;
  margin-top: 36px;
  border-radius: 50%;
}

.checkout-sheet {
  display: flex;
  flex-direction: column;
  max-height: 86svh;
  padding: 0;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.85) 0%, rgba(12, 12, 12, 0.95) 100%);
}

.balance-row {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 22px 68px 18px 24px;
  border-bottom: var(--glass-border);
  background: rgba(20, 20, 20, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  font-size: 24px;
}

.coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe094, #d4af37);
  color: #5c4308;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  font-family: inherit;
}

.balance-row .coin,
.coin-pack .coin {
  margin: 0;
}

.checkout-content {
  padding: 26px 16px 88px;
}

.plan-card,
.coin-pack,
.payment-option {
  position: relative;
  width: 100%;
  border-radius: 14px;
  background: rgba(30, 30, 30, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.plan-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  margin-bottom: 16px;
  padding: 22px 118px 0 18px;
  overflow: hidden;
}

.plan-card.selected {
  border: 1.5px solid #ffba52;
  background: linear-gradient(135deg, rgba(255, 186, 82, 0.08) 0%, rgba(255, 186, 82, 0.02) 100%), rgba(45, 38, 30, 0.35);
  box-shadow: 0 12px 32px rgba(255, 186, 82, 0.15), 0 0 0 1px rgba(255, 186, 82, 0.3) inset;
  transform: translateY(-2px);
}

.plan-card strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.plan-card small {
  color: #b3b3b3;
  font-size: 14px;
  line-height: 1.35;
}

.plan-card.selected small,
.plan-card.selected strong,
.plan-card.selected .benefits {
  color: #f8d49d;
}

.plan-price {
  position: absolute;
  top: 24px;
  right: 18px;
  color: #f4f4f4;
  font-size: 20px;
  font-weight: 800;
  text-align: right;
}

.plan-price s {
  display: block;
  margin-top: 6px;
  color: #b7a18b;
  font-size: 14px;
  font-weight: 600;
}

.discount {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px 12px;
  border-radius: 0 0 0 12px;
  background: linear-gradient(135deg, #ff5e62, #ff9966);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 11px;
  text-transform: uppercase;
  box-shadow: -2px 2px 10px rgba(255, 94, 98, 0.2);
}

.benefits {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 14px -118px 0 -18px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #bbb;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.benefits b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

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

.coin-grid {
  margin: 16px 0 42px;
}

.coin-pack.selected {
  border: 1.5px solid #ffba52;
  background: linear-gradient(135deg, rgba(255, 186, 82, 0.08) 0%, rgba(255, 186, 82, 0.02) 100%), rgba(45, 38, 30, 0.35);
  box-shadow: 0 12px 32px rgba(255, 186, 82, 0.15), 0 0 0 1px rgba(255, 186, 82, 0.3) inset;
  transform: translateY(-2px);
}

.coin-pack.selected strong {
  color: #f8d49d;
}

.payment-grid {
  margin-bottom: 78px;
}

.payment-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 56px;
  padding: 8px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #ddd;
}

.payment-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.payment-option.selected {
  background: rgba(255, 255, 255, 0.06);
  border-color: #ffba52;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 186, 82, 0.1);
}

.google-g {
  color: #4285f4;
}

.tips {
  margin: 0;
  color: #9f9f9f;
  font-size: 16px;
  line-height: 1.28;
}

.checkout-cta {
  position: sticky;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 16px 16px 24px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  transition: all 0.2s ease;
}

.checkout-cta:active {
  transform: scale(0.97);
  box-shadow: 0 5px 15px rgba(2, 132, 199, 0.25);
}

.coin.blue {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: none;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 520px) {
  body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: #101010;
  }

  .app-shell {
    width: min(100vw, 430px);
    height: min(100vh, 932px);
    min-height: min(100vh, 932px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.7);
  }

  .player-screen {
    min-height: auto;
  }

  .brand {
    font-size: 19px;
  }

  .sheet {
    max-height: 82%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .episode-grid {
    gap: 12px;
  }

  .episode-tile {
    min-height: 62px;
    font-size: 20px;
  }

  .description,
  .text-link,
  .range-tab {
    font-size: 19px;
  }

  .episode-sheet h1,
  .sheet h2,
  .checkout-content h2 {
    font-size: 23px;
  }
}
