:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.09);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg)
}

a {
  color: var(--accent);
}

.page,
.watch-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.page--narrow {
  width: min(760px, calc(100% - 32px));
}

.hero {
  margin-bottom: 28px;
}

.hero--compact {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.subtitle {
  max-width: 62ch;
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.upload-only {
  max-width: 100%;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.uploader,
.preview-panel,
.video-stage {
  padding: 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span,
.progress-row span,
.video-info dt,
.meta-card .label {
  color: var(--muted);
}

.field input[type="file"],
.field input[type="text"] {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}

.field input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
}

.upload-actions {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

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

button:active {
  transform: translateY(0);
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

progress {
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

progress::-webkit-progress-bar {
  background: rgba(148, 163, 184, 0.18);
}

progress::-webkit-progress-value {
  background: var(--accent);
}

progress::-moz-progress-bar {
  background: var(--accent);
}

.status {
  margin: 18px 0 0;
  color: var(--muted);
  min-height: 1.5em;
}

.watch-shell {
  display: grid;
  gap: 18px;
}

.watch-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

a {
  text-decoration: none;
  font-weight: 600;
}

.a:hover {
  text-decoration: underline;
}

.video-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-stage video,
#previewVideo {
  display: block;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 620px);
  object-fit: contain;
  margin: 0 auto;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

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

.meta-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.meta-card .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.meta-card .value {
  font-weight: 700;
  word-break: break-word;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.preview-header h2,
.video-info h3 {
  margin: 0;
}

.video-info {
  margin-top: 22px;
}

.video-info h3 {
  margin-bottom: 14px;
}

.video-info dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.video-info dl div {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.video-info dt {
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.video-info dd {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}

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

  .meta-grid,
  .video-info dl {
    grid-template-columns: 1fr;
  }

  .watch-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page,
  .watch-page {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .uploader,
  .preview-panel,
  .video-stage {
    padding: 18px;
    border-radius: 18px;
  }

  .hero h1 {
    max-width: none;
  }
}