* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-highlight: #ebf1ff;
  --border: #e2e8f0;
  --border-strong: #cbd5f5;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --shadow-elevated: 0 24px 64px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
}

header {
  padding: 24px 24px 16px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.media-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  isolation: isolate;
  aspect-ratio: 16 / 9;
}

.media-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.05);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  outline: none;
  transition: background 0.3s ease, transform 0.3s ease;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.play-overlay[disabled] {
  cursor: default;
}

.play-overlay:hover {
  background: rgba(15, 23, 42, 0.6);
  transform: scale(1.02);
}

.play-overlay:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45);
}

.play-overlay::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.25);
  mix-blend-mode: screen;
}

.play-overlay .label {
  position: relative;
  z-index: 1;
}

.play-overlay.is-countdown {
  cursor: default;
  background: rgba(15, 23, 42, 0.85);
  transform: none;
}

.play-overlay.is-countdown::after {
  animation: pulse 1s infinite;
}

.play-overlay.is-countdown,
.play-overlay.is-countdown:hover {
  transform: none;
}

@keyframes pulse {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
}

.content {
  padding: 28px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  line-height: 1.75;
  font-size: 0.97rem;
  color: var(--text-secondary);
}

.content > * {
  margin: 0;
}

.content h2,
.content h3 {
  color: var(--text-primary);
  scroll-margin-top: 96px;
}

.content h2 {
  font-size: 1.18rem;
  font-weight: 700;
}

.content h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.content p + h2,
.content p + h3,
.content ul + h2,
.content ol + h2,
.content ul + h3,
.content ol + h3 {
  margin-top: 4px;
}

.content ul,
.content ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content li {
  margin: 0;
}

.content li strong {
  color: var(--text-primary);
}

.content blockquote {
  margin: 0;
  padding: 22px 20px;
  background: var(--surface-muted);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.table-scroll::-webkit-scrollbar {
  height: 7px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.data-table thead {
  background: var(--surface-highlight);
  color: var(--text-primary);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.data-table th:first-child,
.data-table td:first-child {
  width: 32%;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.65);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.page-nav {
  margin-top: auto;
  padding: 20px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.9) 35%, rgba(248, 250, 252, 1) 100%);
}

.page-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.page-nav a:hover {
  background: rgba(37, 99, 235, 0.18);
  color: var(--accent-strong);
}

.page-nav a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 520px) {
  .page {
    min-height: 100dvh;
  }

  .data-table {
    min-width: 360px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 48px 64px;
  }

  .page {
    border-radius: 28px;
  }

  .content {
    padding-bottom: 96px;
  }
}
