:root {
  color-scheme: dark;
  --bg: #0f1117;
  --surface: #161b26;
  --surface-2: #1f2532;
  --text: #ebedf2;
  --muted: #97a0c1;
  --accent: #5b9fff;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: radial-gradient(circle at top, #1d2332 0%, #0f1117 45%, #090b10 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  padding: 28px 0 16px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.player-panel {
  display: grid;
  gap: 22px;
}

.controls {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 14px 16px;
  width: 100%;
}

button {
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #6b92ff, #3278ff);
  color: white;
  cursor: pointer;
  padding: 0 22px;
  min-height: 48px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hint,
.status-message {
  margin: 14px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.status-message.error {
  color: #ff8a8a;
}

.video-wrapper {
  display: grid;
  gap: 12px;
}

#player {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}

.download-row {
  display: flex;
  justify-content: flex-end;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
}

.examples {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.examples h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.examples ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.examples .example {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.examples .example:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 600px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
