/* ============ style.css — Unit 2 複習簡報樣式 ============ */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:"Microsoft JhengHei",system-ui,sans-serif;background:#f0f4f8;color:#1e293b}
#app{display:flex;height:100vh;overflow:hidden}
#toc{width:220px;background:#0f172a;color:#fff;overflow-y:auto;flex-shrink:0;border-right:1px solid #1e293b}
#toc .home-btn{display:block;padding:14px 16px;color:#38bdf8;text-decoration:none;border-bottom:1px solid #1e293b;font-weight:700;font-size:14px;background:#0f172a}
#toc ul,#toc-list{list-style:none}
#toc li a{display:block;padding:9px 16px;color:#94a3b8;text-decoration:none;border-left:3px solid transparent;transition:.15s;font-size:13px}
#toc li a:hover,#toc li a.active{background:#1e293b;border-left-color:#38bdf8;color:#f8fafc;font-weight:600}
#toc .ch-head{padding:12px 16px 4px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
#stage{flex:1;display:flex;flex-direction:column;overflow:hidden}
#hdr{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
#hdr .eyebrow{font-size:12px;color:#64748b;font-weight:500}
#hdr h1{font-size:18px;color:#0f172a}
#slide{flex:1;overflow-y:auto;padding:24px 20px}
.card{background:#fff;border-radius:14px;padding:24px;max-width:920px;margin:0 auto;box-shadow:0 3px 12px rgba(15,23,42,.06)}
.badge{display:inline-block;font-size:12px;font-weight:700;padding:3px 12px;border-radius:20px}
.card h2{font-size:20px;margin-bottom:14px;color:#0f172a;line-height:1.4}
.points{margin:10px 0;padding-left:20px}
.points li{margin:8px 0;font-size:15px;line-height:1.7;color:#334155}
.points li b{color:#0f172a}
.points li .k{background:#fef08a;padding:2px 6px;border-radius:4px;font-weight:600;color:#854d0e}
.visual{margin:16px 0}
.hint{font-size:13px;color:#64748b;margin-top:6px;line-height:1.5}

/* 按鈕與互動元件 */
button{cursor:pointer;border:none;border-radius:8px;padding:8px 16px;font-size:14px;font-family:inherit;transition:.15s}
.btn-play{background:#e0f2fe;color:#0369a1;padding:6px 14px;font-size:13px;font-weight:600;border-radius:20px}
.btn-play:hover{opacity:.9}
.btn-play.active{box-shadow:0 2px 6px rgba(0,0,0,.15)}
.btn-reset{background:#f1f5f9;color:#475569;font-weight:600}
.btn-reset:hover{background:#e2e8f0}
.btn-next{background:#0284c7;color:#fff;font-weight:700}
.btn-next:hover{background:#0369a1}
.nav{display:flex;justify-content:space-between;align-items:center;padding:12px 24px;background:#fff;border-top:1px solid #e2e8f0;flex-shrink:0}
#counter{font-size:13px;color:#64748b;font-weight:600}

/* 配對互動 */
.match-board{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0}
.match-col{display:flex;flex-direction:column;gap:8px}
.match-cell{padding:12px 14px;border-radius:10px;border:2px solid #e2e8f0;background:#f8fafc;font-size:15px;text-align:center;cursor:pointer;transition:.15s;user-select:none;font-weight:500}
.match-cell:hover{border-color:#38bdf8;background:#f0f9ff}
.match-cell.selected{border-color:#0284c7;background:#e0f2fe;color:#0369a1;font-weight:700;box-shadow:0 0 0 2px #bae6fd}
.match-cell.matched{border-color:#22c55e;background:#dcfce7;color:#15803d;cursor:default;font-weight:700}
.match-cell.wrong{border-color:#ef4444;background:#fee2e2;color:#b91c1c;animation:shake .35s}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

/* 測驗元件 */
.quiz-card{margin:14px 0;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:16px}
.quiz-q{font-size:16px;font-weight:700;margin-bottom:12px;color:#0f172a;line-height:1.5}
.quiz-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quiz-opt{padding:10px 14px;border:2px solid #cbd5e1;background:#fff;border-radius:10px;cursor:pointer;font-size:15px;text-align:left;transition:.15s;color:#1e293b}
.quiz-opt:hover{border-color:#38bdf8;background:#f0f9ff}
.quiz-opt.correct{border-color:#22c55e;background:#dcfce7;color:#15803d;font-weight:700}
.quiz-opt.wrong{border-color:#ef4444;background:#fee2e2;color:#b91c1c}

/* 例題與提示 */
.example-box{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:14px;margin-top:14px}
.example-box .q{font-weight:700;margin-bottom:6px;color:#854d0e;font-size:15px}
.example-box .steps{margin:6px 0 6px 16px;font-size:14px;color:#475569;line-height:1.6}
.example-box .ans{font-weight:700;color:#15803d;margin-top:6px;font-size:15px}

/* 音檔播放器 */
.audio-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:14px;margin-top:14px}
.audio-card audio{width:100%;max-width:440px;margin-top:8px}

@media(max-width:768px){
  #toc{display:none}
  .match-board{grid-template-columns:1fr}
  .quiz-opts{grid-template-columns:1fr}
}
