:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #1f2d3d;
  --muted: #68778a;
  --line: #d7e2ee;
  --line-strong: #c5d4e4;
  --blue: #1c7ed6;
  --blue-dark: #1769b3;
  --blue-soft: #eaf4ff;
  --success: #1f9d55;
  --success-soft: #ecf9f1;
  --shadow: 0 8px 24px rgba(40, 72, 102, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(to bottom, #eef5fc 0, #f8fbfe 140px, var(--bg) 140px, var(--bg) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  width: 100%;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe2f5;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.layout-wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.badge,
.file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cfe2f5;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtext {
  max-width: 740px;
  margin: 14px auto 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.main-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 360px);
  gap: 20px;
  align-items: start;
}

.left-col,
.right-col {
  min-width: 0;
}

.panel,
.video-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  overflow: hidden;
  background: #dfeaf5;
}

.cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-size: cover;
  background-position: center;
}

.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.72), rgba(245,249,253,0.88));
}

.cover-content {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  text-align: center;
  padding: 26px 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(197, 212, 228, 0.95);
}

.cover h2 {
  margin: 14px 0 8px;
  font-size: clamp(24px, 3.8vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cover p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.player-shell {
  position: absolute;
  inset: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #000;
  z-index: 1;
}

.player-shell.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#youtube-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#youtube-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.video-overlay.hidden {
  opacity: 0;
}

.status-panel,
.info-panel {
  padding: 18px;
}

.info-panel {
  margin-top: 16px;
  background: var(--surface-soft);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-title,
.info-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.timer {
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  text-align: center;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--blue-dark);
}

.timer small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #edf3f8;
  overflow: hidden;
  border: 1px solid #e1ebf3;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to right, #61a5ea, var(--blue));
  transition: width 1s linear;
}

.steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--muted);
  font-size: 14px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c9d6e5;
  flex: 0 0 auto;
}

.step.active,
.step.done {
  color: var(--text);
  border-color: #bfd6ec;
  background: var(--blue-soft);
}

.step.active .step-dot {
  background: var(--blue);
}

.step.done {
  border-color: #bfe1ce;
  background: var(--success-soft);
}

.step.done .step-dot {
  background: var(--success);
}

.cta-area {
  margin-top: 18px;
}

.reveal-btn,
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--blue-dark);
  border-radius: 10px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.reveal-btn:hover,
.download-btn.enabled:hover {
  background: var(--blue-dark);
}

.reveal-btn {
  max-width: 240px;
  margin-top: 18px;
}

.download-btn {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.download-btn.enabled {
  opacity: 1;
  pointer-events: auto;
}

.helper {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.info-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.error-box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #ffffff;
  color: var(--text);
}

@media (max-width: 900px) {
  .main-card {
    grid-template-columns: 1fr;
  }

  .info-panel {
    margin-top: 14px;
  }
}

@media (max-width: 640px) {
  .brand,
  .layout-wrap {
    width: min(100% - 24px, 1080px);
  }

  .layout-wrap {
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .hero {
    margin-bottom: 16px;
  }

  .video-wrap {
    min-height: 220px;
  }

  .cover,
  .status-panel,
  .info-panel {
    padding: 14px;
  }

  .cover-content {
    padding: 18px 16px;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .timer {
    width: 100%;
  }

  .reveal-btn {
    max-width: none;
  }

  .video-overlay {
    display: none !important;
  }
}
