@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Mono", monospace;
  --bg-top: #efe4cf;
  --bg-bottom: #f6f0e7;
  --ink: #102232;
  --muted: #5a6875;
  --panel: rgba(255, 251, 245, 0.9);
  --line: rgba(16, 34, 50, 0.12);
  --accent: #d0602c;
  --accent-2: #237e76;
  --accent-soft: rgba(208, 96, 44, 0.16);
  --success-soft: rgba(35, 126, 118, 0.16);
  --error-soft: rgba(187, 66, 42, 0.18);
  --shadow: 0 28px 70px rgba(21, 35, 49, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(208, 96, 44, 0.24), transparent 26%),
    radial-gradient(circle at bottom right, rgba(35, 126, 118, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(16, 34, 50, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 34, 50, 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 55%, transparent 94%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 18px;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  gap: 20px;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 70px);
  line-height: 0.92;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.meta-grid div,
.notes div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

#state-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(16, 34, 50, 0.08);
}

#state-badge[data-tone="loading"] {
  background: var(--accent-soft);
}

#state-badge[data-tone="success"] {
  background: var(--success-soft);
}

#state-badge[data-tone="error"] {
  background: var(--error-soft);
}

.player-card {
  gap: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(35, 126, 118, 0.2), transparent 24%),
    linear-gradient(160deg, rgba(16, 34, 50, 0.96), rgba(22, 42, 58, 0.92));
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: transparent;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(16, 34, 50, 0.16), rgba(16, 34, 50, 0.62));
}

.toolbar,
.status-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  min-width: 132px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #e68448);
  box-shadow: 0 18px 36px rgba(208, 96, 44, 0.24);
}

.ghost-button {
  color: var(--ink);
  background: rgba(16, 34, 50, 0.08);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.error-copy {
  color: #a34227;
}

@media (max-width: 720px) {
  .shell {
    padding: 14px;
  }

  .panel {
    padding: 16px;
    border-radius: 22px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .status-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
