:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e6e8eb;
  --muted: #9aa0aa;
  --accent: #4f8cff;
  --ok: #3ecf8e;
  --fail: #ff5d5d;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9; --panel: #ffffff; --border: #e2e5ea; --text: #1a1d23; --muted: #5c6470;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); padding: 16px;
}
header h1 { margin: 0 0 4px; font-size: 1.6rem; }
.subtitle { color: var(--muted); margin: 0 0 20px; font-size: 0.9rem; }
main { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
section {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
select, button {
  font-size: 1rem; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
}
button { cursor: pointer; background: var(--accent); color: white; border: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.hidden { display: none !important; }
.ders-block { margin-top: 12px; }
.ders-title { font-weight: 600; margin-bottom: 4px; }
.unite-block { margin-left: 12px; margin-bottom: 8px; }
.unite-title { color: var(--muted); font-size: 0.9rem; margin: 6px 0 2px; }
.konu-row { margin-left: 12px; font-size: 0.92rem; }
#action-row { margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.progress-bar { height: 10px; background: var(--border); border-radius: 6px; overflow: hidden; margin: 8px 0; }
#progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.3s; }
#recent-log { list-style: none; padding: 0; margin: 8px 0 0; max-height: 220px; overflow-y: auto; font-size: 0.85rem; }
#recent-log li { padding: 4px 0; border-bottom: 1px solid var(--border); }
#recent-log li.done { color: var(--ok); }
#recent-log li.failed { color: var(--fail); }
#video-list { list-style: none; padding: 0; margin: 8px 0 0; }
#video-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
#video-list a { color: var(--accent); text-decoration: none; }
