:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-hover: #1a1a1a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #316b82;
  --accent-hover: #4a8ba5;
  --border: #222;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* Password gate */
.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.gate-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 320px;
}
.gate-form h1 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 20px;
}
.gate-form input {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.gate-form button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}
.gate-form button:hover { background: var(--accent-hover); }
.gate-error { color: #e0633a; font-size: 0.85rem; margin-top: 8px; }

#app { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: 300px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar h1 {
  font-size: 1rem;
  font-weight: 700;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.episode-list-item {
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.episode-list-item:hover { background: var(--bg-card); }
.episode-list-item.active { background: var(--bg-card); border-left: 3px solid var(--accent); }

.episode-list-item .ep-num {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.episode-list-item .ep-title {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status dots */
.status-dots {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.status-dot.ok { background: var(--accent); }

/* Main panel */
.main-panel {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
}

.placeholder {
  color: var(--text-muted);
  text-align: center;
  margin-top: 100px;
}

/* Episode detail */
.episode-detail h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.episode-detail .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.episode-detail .meta a {
  color: var(--accent);
  text-decoration: none;
}

.section {
  margin-bottom: 32px;
}

.section h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h3 .copy-btn {
  font-size: 0.75rem;
  font-weight: 400;
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}

.section h3 .copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.copyable {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  font-family: -apple-system, sans-serif;
  line-height: 1.6;
}

.copyable.transcript-box {
  max-height: 600px;
}

.transcript-para {
  margin-bottom: 12px;
  padding-left: 0;
}

.transcript-para .ts {
  display: inline-block;
  min-width: 48px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* Media preview */
.media-preview {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.media-preview img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.media-preview .media-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* Status section */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.status-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-item .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-item .indicator.yes { background: var(--accent); }
.status-item .indicator.no { background: var(--border); }

.status-item .label { color: var(--text-muted); }