/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #fdf6ec 0%, #fef9f0 45%, #eef7fb 100%);
  min-height: 100vh;
  color: #3d3a50;
}

/* ============ 顶部 ============ */
.site-header {
  text-align: center;
  padding: 2.4rem 1rem 1.2rem;
}
.site-header .logo { font-size: 1.1rem; letter-spacing: 2px; color: #b0874a; }
.site-header h1 {
  font-size: 2.2rem;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, #ff7a59, #f2a541, #ff5e7e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-header .sub { margin-top: 0.6rem; color: #8a87a3; font-size: 0.95rem; }

/* ============ 首页故事卡片 ============ */
.story-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.4rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.story-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(93, 82, 150, 0.12);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.story-card:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(93, 82, 150, 0.2); }
.story-card .thumb { width: 100%; height: 180px; object-fit: cover; display: block; }
.story-card .card-body { padding: 0.9rem 1rem 1rem; }
.story-card .card-title { font-size: 1.12rem; font-weight: 700; }
.story-card .card-en { font-size: 0.85rem; color: #8a87a3; margin-top: 0.25rem; }
.story-card .card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.92); color: #5b5a75;
  font-size: 0.78rem; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ============ 故事详情页 ============ */
.story-page { max-width: 820px; margin: 0 auto; padding: 1.4rem 1.2rem 3.5rem; }
.back-link { display: inline-block; margin-bottom: 1rem; color: #6b6a88; text-decoration: none; font-size: 0.95rem; }
.back-link:hover { color: #ff7a59; }
.story-hero {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(93,82,150,.14);
}
.story-hero img { width: 100%; height: 340px; object-fit: cover; display: block; }
.story-hero .hero-info { padding: 1.1rem 1.4rem 1.3rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; }
.story-hero .hero-title { font-size: 1.5rem; font-weight: 800; }
.story-hero .hero-en { color: #8a87a3; font-size: 0.95rem; margin-top: .25rem; }
.play-all-btn {
  background: linear-gradient(90deg, #ff7a59, #ff5e7e);
  color: #fff; border: none; padding: 0.65rem 1.4rem;
  border-radius: 999px; font-size: 1rem; font-weight: 600;
  cursor: pointer; box-shadow: 0 6px 16px rgba(255,94,126,.35);
  transition: transform .15s;
}
.play-all-btn:active { transform: scale(.96); }

/* 对话列表 */
.dialog { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.line {
  display: flex; align-items: stretch; gap: .7rem;
  background: #fff; border-radius: 18px; padding: .85rem 1rem;
  box-shadow: 0 6px 16px rgba(93,82,150,.08);
  border-left: 5px solid var(--c);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  user-select: none;
}
.line:hover { transform: translateX(4px); box-shadow: 0 10px 22px rgba(93,82,150,.15); }
.line.playing { background: #fff6ef; box-shadow: 0 0 0 2px var(--c) inset; }
.line .avatar {
  flex: 0 0 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff; font-weight: 700; font-size: .85rem;
}
.line .body { flex: 1; min-width: 0; }
.line .speaker-name { font-size: .82rem; color: #9a97b4; margin-bottom: .2rem; }
.line .en { font-size: 1.12rem; font-weight: 600; line-height: 1.45; }
.line .cn { font-size: .85rem; color: #8a87a3; margin-top: .2rem; }
.line .play-icon {
  align-self: center; flex: 0 0 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: #fff; background: var(--c);
}
.line.playing .play-icon { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* 翻页 */
.story-nav {
  margin-top: 1.8rem; display: flex; justify-content: space-between; gap: 1rem;
}
.story-nav a {
  flex: 1; text-align: center; padding: .7rem;
  background: #fff; border-radius: 14px; text-decoration: none;
  color: #6b6a88; font-size: .95rem; box-shadow: 0 4px 12px rgba(93,82,150,.08);
}
.story-nav a:hover { color: #ff7a59; }
.story-nav .disabled { opacity: .4; pointer-events: none; }

/* 页脚 */
.site-footer { text-align: center; padding: 1.6rem 1rem 2.2rem; color: #b1aec9; font-size: .85rem; }

/* 移动端适配 */
@media (max-width: 560px) {
  .site-header h1 { font-size: 1.7rem; }
  .story-hero img { height: 240px; }
  .story-grid { grid-template-columns: 1fr; }
}