* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.contain { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.contain-wide { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: #1a1a2e;
  color: #fff;
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
}
.site-header .contain-wide {
  display: flex; justify-content: space-between; align-items: center;
}
.site-header .logo { font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.site-header .logo span { color: #ff6b35; }
.site-header nav a {
  color: #ccc; text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; transition: color .2s;
}
.site-header nav a:hover, .site-header nav a.active { color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff; padding: 4rem 0 3rem; text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero .subtitle { font-size: 1.1rem; color: #aaa; margin-bottom: 1.5rem; }
.hero .tagline { font-size: 1rem; color: #ff6b35; font-weight: 500; }

/* Section */
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem;
  padding-bottom: 0.5rem; border-bottom: 3px solid #ff6b35; display: inline-block;
}
.section-light { background: #fff; }
.section-dark { background: #f0f2f5; }

/* Cards */
.card-grid { display: grid; gap: 1.5rem; }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: #fff; border-radius: 8px; padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: #666; }

/* Guest cards */
.guest-card { text-align: center; }
.guest-card .avatar {
  width: 80px; height: 80px; border-radius: 50%; background: #1a1a2e;
  color: #fff; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem; font-size: 1.8rem; font-weight: 700;
}
.guest-card .tag {
  display: inline-block; background: #ff6b35; color: #fff;
  font-size: 0.75rem; padding: 2px 10px; border-radius: 99px; margin-top: 0.5rem;
}

/* Links */
a { color: #0f3460; text-decoration: none; }
a:hover { text-decoration: underline; }
.btn {
  display: inline-block; background: #ff6b35; color: #fff;
  padding: 0.6rem 1.5rem; border-radius: 6px; font-size: 0.9rem;
  transition: background .2s; text-decoration: none;
}
.btn:hover { background: #e55a2b; text-decoration: none; }
.btn-outline {
  background: transparent; color: #ff6b35; border: 1.5px solid #ff6b35;
}
.btn-outline:hover { background: #ff6b35; color: #fff; }

/* Series styles */
.series-group { margin-bottom: 2rem; }
.series-group h3 {
  font-size: 1.2rem; font-weight: 700; color: #1a1a2e;
  margin-bottom: 0.75rem; padding-bottom: 0.3rem; border-bottom: 2px solid #eee;
}
.episode-list { list-style: none; }
.episode-list li {
  padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem;
}
.episode-list li .ep-title { color: #555; }
.episode-list li .ep-link { color: #0f3460; font-size: 0.8rem; white-space: nowrap; }

/* Breadcrumb */
.bread { font-size: 0.85rem; color: #888; margin-bottom: 1.5rem; padding-top: 1rem; }
.bread a { color: #666; }
.bread span { color: #333; }

/* Footer */
.site-footer {
  background: #1a1a2e; color: #888; text-align: center;
  padding: 2rem 0; font-size: 0.85rem; margin-top: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .site-header .contain-wide { flex-direction: column; gap: 0.5rem; }
  .site-header nav a { margin: 0 0.75rem; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .episode-list li { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

/* Wiki page styles */
.wiki-content h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.wiki-content .subhead { color: #666; margin-bottom: 1.5rem; font-size: 0.95rem; }
.wiki-content h2 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; color: #1a1a2e; }
.wiki-content h3 { font-size: 1.1rem; margin: 1.2rem 0 0.5rem; }
.wiki-content p { margin-bottom: 0.8rem; }
.wiki-content ul, .wiki-content ol { margin: 0 0 1rem 1.5rem; }
.wiki-content li { margin-bottom: 0.3rem; }
.wiki-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.wiki-content th, .wiki-content td { border: 1px solid #ddd; padding: 0.5rem 0.75rem; text-align: left; }
.wiki-content th { background: #f5f5f5; font-weight: 600; }
.wiki-content strong { color: #1a1a2e; }
.wiki-content hr { margin: 2rem 0; border: none; border-top: 1px solid #eee; }
.wiki-content .source { color: #999; font-size: 0.8rem; font-style: italic; }

/* ===== Carousel ===== */
.carousel {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
}
.carousel-visual {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #111;
}
.carousel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.carousel-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.carousel-overlay {
  padding: 0.8rem 1.25rem 0.9rem;
  background: #1a1a2e;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.carousel-overlay-body {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  text-align: center;
}
.carousel-slide-text {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.carousel-slide-text.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "label title button"
    "label desc button";
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.15rem;
  text-align: left;
}
.carousel-label {
  grid-area: label;
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0;
}
.carousel-title {
  grid-area: title;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0;
  color: #fff;
}
.carousel-desc {
  grid-area: desc;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.carousel-btn {
  grid-area: button;
  justify-self: end;
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.carousel-btn:hover {
  background: #e55a2b;
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff; border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(0,0,0,0.6);
}
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }
.carousel-dots {
  position: absolute;
  bottom: 0.75rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 10;
}
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: #ff6b35;
}
@media (max-width: 640px) {
  .carousel-slide-text.active {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "title"
      "desc"
      "button";
    justify-items: center;
    text-align: center;
  }
  .carousel-title { font-size: 1.1rem; }
  .carousel-desc { font-size: 0.8rem; }
  .carousel-btn { justify-self: center; }
  .carousel-overlay { padding: 0.85rem 1rem 1rem; }
  .carousel-prev, .carousel-next { width: 34px; height: 34px; font-size: 1.2rem; }
  .carousel-prev { left: 0.4rem; }
  .carousel-next { right: 0.4rem; }
}

/* Video Detail Page */
.video-player { margin-top: 1.5rem; border-radius: 8px; overflow: hidden; background: #1a1a2e; }
.video-placeholder {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
  color: #667; font-size: 1.1rem;
}
.video-meta .tag {
  display: inline-block; background: #ff6b35; color: #fff;
  font-size: 0.75rem; padding: 2px 10px; border-radius: 99px;
}
.video-meta .video-episode { color: #888; font-size: 0.9rem; }
.video-intro { font-size: 0.95rem; }
