:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e8eef7;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-hover: #5ca0ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.loading, .empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.course {
  margin-bottom: 2rem;
}

.course h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.course .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.lecture-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lecture-list li + li {
  border-top: 1px solid var(--border);
}

.lecture-list li {
  position: relative;
}

.lecture-list .lecture-title {
  font-weight: 500;
  padding-right: 4.5rem;
}

.lecture-list .poli-link {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.lecture-list .poli-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.external-link {
  color: var(--accent);
  text-decoration: none;
}

.external-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.lecture-list a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.lecture-list a:hover {
  background: var(--surface);
}

.lecture-list .date {
  color: var(--muted);
  font-size: 0.8rem;
}

.player-page {
  max-width: 1100px;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover { color: var(--accent-hover); }

.video-wrap {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

video {
  width: 100%;
  max-height: 70vh;
  display: block;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.controls label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-right: 0.25rem;
}

.controls button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.controls button:hover {
  border-color: var(--accent);
}

.controls button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.player-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.player-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  main { padding: 1rem; }
  .controls button { flex: 1 1 calc(50% - 0.5rem); }
}
