/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #000;
  --bg-card:   #111;
  --bg-hover:  #1a1a1a;
  --border:    #333;
  --text:      #fff;
  --text-dim:  #999;
  --accent:    #fff;
  --accent-hover: #ccc;
  --header-bg: rgba(0,0,0,.92);
  --max-w:     1100px;
}

[data-theme="light"] {
  --bg:        #fff;
  --bg-card:   #f5f5f5;
  --bg-hover:  #eee;
  --border:    #ddd;
  --text:      #000;
  --text-dim:  #666;
  --accent:    #000;
  --accent-hover: #333;
  --header-bg: rgba(255,255,255,.92);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ── Header / Nav ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
}
.site-logo span { color: var(--accent); }
.site-nav { display: flex; gap: 1.8rem; }
.site-nav a {
  color: var(--text-dim);
  font-size: .9rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Section ── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

/* ── Episode Grid ── */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}
.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  transition: background .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.episode-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.episode-card .ep-number {
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.episode-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .5rem;
  line-height: 1.4;
}
.episode-card .ep-meta {
  font-size: .82rem;
  color: var(--text-dim);
  margin-top: auto;
}

/* ── Episode Page ── */
.episode-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 1rem;
}
.episode-header .breadcrumb {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.episode-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: .6rem;
  line-height: 1.3;
}
.episode-header .meta {
  color: var(--text-dim);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

.video-embed {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}
.video-embed .ratio {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.video-embed .ratio iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.transcript-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
.transcript-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent);
}
.transcript {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  font-size: .95rem;
  line-height: 1.9;
  white-space: pre-wrap;
  max-height: 600px;
  overflow-y: auto;
}
.transcript::-webkit-scrollbar { width: 6px; }
.transcript::-webkit-scrollbar-track { background: var(--bg-card); }
.transcript::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.show-all-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: .6rem 1.4rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
}
.show-all-btn:hover { background: var(--accent-hover); }

/* ── About Page ── */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.about-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.about-content p {
  margin-bottom: 1.2rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.about-content a { color: var(--accent); }

/* ── Episode Nav (prev/next) ── */
.episode-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.episode-nav a {
  padding: .7rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text-dim);
  transition: border-color .2s, color .2s;
}
.episode-nav a:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
}

/* ── Series filter tabs ── */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.filter-tabs button {
  padding: .45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.filter-tabs button:hover,
.filter-tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,255,255,.08);
}

/* ── Header controls (theme + lang) ── */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.theme-toggle, .lang-switch {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .82rem;
  padding: .3rem .6rem;
  font-family: inherit;
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover, .lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: inline; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: inline; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .episode-grid { grid-template-columns: 1fr; }
  .site-header { padding: 1rem; }
  .episode-header h1 { font-size: 1.5rem; }
  .transcript { padding: 1.2rem; }
}
