/* ============================================================
   Listen a Minute — Warm Green theme
   暖叶绿主色 + 嫩芽白底 + 橄榄黑文字
   ============================================================ */
:root {
  --bg:        #F5F8EC;   /* 嫩芽白（带黄绿暖意的底色） */
  --surface:   #FFFFFF;
  --ink:       #203019;   /* 橄榄黑 */
  --ink-soft:  #47533A;
  --muted:     #828D72;
  --line:      #E0E8CE;
  --accent:    #5FA324;   /* 暖叶绿（偏黄的绿） */
  --accent-dark:#4A841C;
  --accent-tint:#EDF6DF;
  --accent-ink:#FFFFFF;
  --radius:    14px;
  --radius-sm: 9px;
  --font-display: "Fraunces", Georgia, "Songti SC", serif;
  --font-body: "Nunito", -apple-system, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ---------------- 首页 ---------------- */
.site-header {
  max-width: 1080px; margin: 0 auto; padding: 26px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  display: grid; place-items: center;
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-tld { color: var(--muted); font-weight: 700; }

.hero { max-width: 760px; margin: 64px auto 36px; padding: 0 24px; text-align: center; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08; letter-spacing: -.5px;
}
.hero-sub { margin-top: 16px; color: var(--muted); font-size: 17px; font-weight: 600; }

.search-wrap { position: relative; margin-top: 30px; }
.search-icon {
  position: absolute; left: 20px; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; color: var(--muted); pointer-events: none;
}
#search {
  width: 100%; padding: 17px 52px 17px 52px;
  font: 600 16.5px var(--font-body); color: var(--ink);
  background: var(--surface); border: 2px solid var(--line);
  border-radius: 999px; outline: none; transition: border-color .15s;
}
#search::placeholder { color: #A6B08E; font-weight: 600; }
#search:focus { border-color: var(--accent); }
.search-clear {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--muted);
  display: none; place-items: center;
}
.search-clear:hover { background: var(--accent-tint); color: var(--accent); }
.search-wrap.has-text .search-clear { display: grid; }

/* 继续学习 */
.continue-bar {
  max-width: 1080px; margin: 0 auto 8px; padding: 0 24px;
}
.continue-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--accent-tint); border: 1.5px solid #C8DFA6;
  border-radius: var(--radius); padding: 14px 20px;
  font-weight: 700; transition: transform .15s;
}
.continue-card:hover { transform: translateY(-1px); }
.continue-card .cc-tag {
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  color: var(--accent); background: #fff; border-radius: 6px;
  padding: 3px 8px; flex: none;
}
.continue-card .cc-title { flex: 1; text-align: left; }
.continue-card .cc-go { color: var(--accent); font-size: 14px; flex: none; }

/* 字母条 */
.alpha-bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 248, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  margin-top: 26px;
}
.alpha-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.alpha-inner::-webkit-scrollbar { display: none; }
.alpha-btn {
  flex: none; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: var(--radius-sm);
  font: 800 14px var(--font-body); color: var(--ink-soft);
  text-transform: uppercase; transition: background .12s, color .12s;
}
.alpha-btn:hover { background: var(--accent-tint); color: var(--accent); }
.alpha-btn.active { background: var(--accent); color: #fff; }

.container { max-width: 1080px; margin: 0 auto; padding: 22px 24px 60px; }
.list-meta { font-size: 13.5px; font-weight: 700; color: var(--muted); margin-bottom: 14px; }

.lesson-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.lesson-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px;
  transition: border-color .15s, transform .15s, background .15s;
  text-align: left; width: 100%;
}
.lesson-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
}
.lesson-card:hover .lc-num { color: var(--accent); }
.lc-num {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: #B3BE9B; width: 30px; flex: none; transition: color .15s;
}
.lc-title { font-size: 15.5px; font-weight: 700; flex: 1; line-height: 1.35; min-width: 0; }
.lc-zh {
  display: block; color: var(--muted); font-weight: 600; font-size: 12.5px;
  margin-top: 2px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-bar { width: 34px; height: 4px; border-radius: 2px; background: var(--line); flex: none; overflow: hidden; }
.lc-bar i { display: block; height: 100%; background: var(--accent); width: 0; }

.empty-tip { text-align: center; color: var(--muted); padding: 70px 0; font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center; padding: 26px 16px 40px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}

/* ---------------- 播放器 ---------------- */
.player-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; gap: 10px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 14.5px; color: var(--ink-soft);
  padding: 7px 10px; border-radius: var(--radius-sm);
}
.back-link svg { width: 18px; height: 18px; }
.back-link:hover { background: var(--accent-tint); color: var(--accent); }
.topbar-center { display: flex; align-items: center; gap: 2px; }
.topbar-right { display: flex; gap: 6px; }
.player-counter { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 58px; text-align: center; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
  transition: background .12s, color .12s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--accent-tint); color: var(--accent); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }

.chip-btn {
  font: 800 13px var(--font-body); color: var(--ink-soft);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 13px; transition: all .12s; white-space: nowrap;
}
.chip-btn:hover { border-color: var(--ink); }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.player-stage { max-width: 760px; margin: 0 auto; padding: 0 20px 80px; }

.lesson-head { text-align: center; padding: 40px 0 18px; }
.lesson-num {
  font-family: var(--font-display); font-weight: 600;
  color: var(--accent); font-size: 14px; letter-spacing: 1px;
}
.lesson-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 5vw, 42px); letter-spacing: -.3px; margin-top: 4px;
}

/* 控制条 */
.deck {
  position: sticky; top: 58px; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  background: rgba(245,248,236,.94); backdrop-filter: blur(8px);
  padding: 14px 4px; margin: 0 -4px;
  border-bottom: 1px solid var(--line);
}
.play-btn {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; transition: background .15s, transform .1s;
}
.play-btn:hover { background: var(--accent-dark); }
.play-btn:active { transform: scale(.94); }
.play-btn svg { width: 23px; height: 23px; }
.play-btn .ic-play { margin-left: 2px; }

.time { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 36px; }
#time-now { color: var(--ink-soft); }
.time-dur { text-align: right; }

.progress {
  flex: 1; height: 26px; display: flex; align-items: center;
  cursor: pointer; touch-action: none;
}
.progress::before {
  content: ""; width: 100%; height: 6px; border-radius: 3px;
  background: var(--line);
}
.progress-fill {
  position: absolute; left: 0; height: 6px; border-radius: 3px;
  background: var(--accent); width: 0; pointer-events: none;
}
.progress { position: relative; }
.progress-knob {
  position: absolute; left: 0; width: 15px; height: 15px;
  border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--accent);
  translate: -50% 0; pointer-events: none; opacity: 0; transition: opacity .15s;
}
.progress:hover .progress-knob, .progress.dragging .progress-knob { opacity: 1; }

.speed-btn {
  flex: none; font: 800 13px var(--font-body);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 12px; min-width: 52px; transition: all .12s;
}
.speed-btn:hover { border-color: var(--ink); }

/* 歌词 */
.lyrics { padding: 14px 0 40px; }
.lyrics-loading { text-align: center; color: var(--muted); font-weight: 600; padding: 40px 0; }
.cue {
  padding: 13px 16px; margin: 4px -8px;
  border-left: 3px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s, opacity .25s;
}
.cue:hover { background: var(--surface); }
.cue.en {
  font-size: 19px; font-weight: 600; color: var(--ink);
  line-height: 1.5; letter-spacing: .1px;
}
.cue .zh {
  display: block; margin-top: 4px;
  font-size: 14px; font-weight: 400; color: var(--muted);
}
body.zh-hidden .cue .zh { display: none; }
.cue.past { opacity: .42; }
.cue.active {
  background: var(--accent-tint);
  border-left-color: var(--accent);
  opacity: 1;
}
.cue.active.en { color: var(--ink); }
.cue.active .zh { color: var(--accent-dark); font-weight: 600; }
.cue.intro { text-align: center; }
.cue.intro.en { font-family: var(--font-display); color: var(--muted); font-size: 15px; font-weight: 600; }
.cue.intro .zh { color: #A6B08E; }

@media (max-width: 600px) {
  .hero { margin-top: 40px; }
  .lesson-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .lesson-card { padding: 13px 14px; gap: 9px; }
  .lc-title { font-size: 14px; }
  .lc-bar { display: none; }
  .chip-btn { padding: 6px 10px; font-size: 12px; }
  .back-link span { display: none; }
  .cue.en { font-size: 17px; }
  .icon-btn { width: 34px; height: 34px; }
  .time-dur { display: none; }
}
