:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #2c5282;
  --accent-soft: #ebf4ff;
  --border: #e2ddd6;
  --active: #1a365d;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.series-title {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1rem;
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.panel-heading {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.episode-panel,
.player-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.episode-item {
  margin-bottom: 0.5rem;
}

.episode-button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.episode-button:hover {
  background: var(--accent-soft);
}

.episode-button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.episode-id {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.episode-name {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
}

.now-playing {
  min-height: 4rem;
  margin-bottom: 1rem;
}

.now-playing .placeholder {
  color: var(--text-muted);
  margin: 0;
}

.episode-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.episode-question {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

#audio {
  width: 100%;
  margin-top: 0.5rem;
}

.footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.error-box {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fff5f5;
  color: #9b2c2c;
  border: 1px solid #fed7d7;
}

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

  .episode-list {
    max-height: 40vh;
  }
}
