/* 中文教室 — Chinese Red & Gold Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', 'Noto Sans SC', sans-serif;
    background: #0a0e17; color: #d4d4d4; line-height: 1.7;
}
.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-bottom: 2px solid #8b1a1a; flex-wrap: wrap; gap: 10px;
}
.site-logo { font-size: 1.3rem; font-weight: 700; color: #e63946; text-decoration: none; }
.site-logo:hover { color: #ff6b6b; }
.site-nav { display: flex; gap: 16px; }
.site-nav a { color: #888; text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.site-nav a:hover { color: #e63946; }
main { padding: 30px 0; min-height: 60vh; }
.post-card {
    background: #121826; border: 1px solid #2a2a3a; border-radius: 10px;
    padding: 20px; margin-bottom: 16px; transition: border-color 0.2s;
}
.post-card:hover { border-color: #e63946; }
.post-meta {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    font-size: 0.82rem; color: #888; margin-bottom: 8px;
}
.post-lesson-no { color: #e63946; font-weight: 600; background: #1a0808; padding: 2px 10px; border-radius: 10px; }
.post-category { color: #f0c040; background: #1a1508; padding: 2px 8px; border-radius: 10px; }
.post-audio-badge { color: #4ecdc4; background: #082a28; padding: 2px 8px; border-radius: 10px; font-size: 0.78rem; }
.post-title { font-size: 1.15rem; margin-bottom: 8px; }
.post-title a { color: #d4d4d4; text-decoration: none; }
.post-title a:hover { color: #e63946; }
.post-excerpt { color: #888; font-size: 0.92rem; margin-bottom: 10px; }
.post-audio-preview { margin: 8px 0; }
.post-audio-preview audio { border-radius: 6px; background: #0a0e17; }
.post-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82rem; color: #555; margin-top: 8px;
}
.like-btn {
    cursor: pointer; color: #888; font-size: 0.85rem;
    padding: 2px 10px; border-radius: 12px; border: 1px solid #2a2a3a;
    transition: all 0.2s; user-select: none;
}
.like-btn:hover { color: #ff6b6b; border-color: #ff6b6b; background: #1a0808; }
.like-btn.liked { color: #ff6b6b; border-color: #ff6b6b; background: #1a0808; }
.like-count { font-weight: 600; margin-left: 2px; }
.post-title-single { font-size: 1.5rem; margin: 16px 0; color: #f0f0f0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lesson-badge {
    display: inline-block; background: #e63946; color: #fff; padding: 2px 14px;
    border-radius: 14px; font-size: 0.85rem; font-weight: 600;
}
.post-audio-player {
    background: #121826; border: 1px solid #2a2a3a; border-radius: 8px;
    padding: 16px; margin-bottom: 20px;
}
.audio-label { font-size: 0.9rem; color: #e63946; margin-bottom: 8px; font-weight: 600; }
.play-all-btn { font-size: 1rem; background: linear-gradient(135deg, #8b1a1a, #e63946); color: #fff; padding: 8px 16px; border-radius: 8px; text-align: center; cursor: default; }
.vocab-playlist { background: #121826; border: 1px solid #2a2a3a; border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.playlist-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.playlist-header span { color: #d4d4d4; font-size: 0.9rem; font-weight: 600; }
.playlist-play-all-btn { background: #e63946; color: #fff; border: none; border-radius: 6px; padding: 6px 16px; font-size: 0.85rem; cursor: pointer; transition: background 0.2s; }
.playlist-play-all-btn:hover { background: #ff6b6b; }
.playlist-items { max-height: 400px; overflow-y: auto; }
.playlist-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; transition: background 0.15s; font-size: 0.85rem; }
.playlist-item:hover { background: #0f1420; }
.playlist-item.playing { background: #1a0808; }
.pl-num { color: #555; min-width: 20px; text-align: right; font-size: 0.75rem; }
.pl-play-btn { background: none; border: 1px solid #5a2a20; color: #e63946; border-radius: 50%; width: 24px; height: 24px; font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.pl-play-btn:hover { background: #e63946; color: #fff; }
.pl-zh { color: #ff8c8c; font-weight: 600; min-width: 60px; font-size: 0.9rem; }
.pl-pinyin { color: #888; font-style: italic; min-width: 80px; font-size: 0.8rem; }
.pl-thai-read { color: #ffb347; min-width: 80px; font-size: 0.8rem; }
.pl-th { color: #4ecdc4; font-size: 0.8rem; }
.post-audio-player audio { width: 100%; border-radius: 6px; }
.audio-download { margin-top: 8px; text-align: right; }
.audio-download a { color: #4ecdc4; text-decoration: none; font-size: 0.85rem; }
.audio-download a:hover { text-decoration: underline; }
.post-content {
    background: #121826; border: 1px solid #2a2a3a; border-radius: 8px;
    padding: 24px; font-size: 1rem; line-height: 1.85; color: #d4d4d4;
    margin-bottom: 20px;
}
.post-content p { margin-bottom: 14px; }
.post-content .zh { color: #ff8c8c; font-size: 1.1rem; font-weight: 600; }
.post-content .story-line { margin-bottom: 16px; padding: 10px 14px; background: #0f1420; border-left: 3px solid #e63946; border-radius: 4px; }
.post-content .story-line p { margin-bottom: 2px; }
.post-content .story-line .thai-read { color: #ffb347; font-size: 0.9rem; }
.post-content .lesson-intro { background: #1a0808; border: 1px solid #5a2a20; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; }
.post-content .lesson-tip { background: #0a1a14; border: 1px solid #1a5a3a; border-radius: 8px; padding: 16px 20px; margin-top: 20px; }
.post-content .lesson-tip p { margin-bottom: 6px; color: #7ecdc4; }
.post-content hr { border: none; border-top: 1px solid #2a2a3a; margin: 24px 0; }
.post-content .thai-read { color: #ffb347; font-size: 0.9rem; font-style: normal; }
.post-content .pinyin { color: #888; font-size: 0.85rem; font-style: italic; }
.post-content .th { color: #4ecdc4; }
.post-content .vocab-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.post-content .vocab-table td, .post-content .vocab-table th {
    border: 1px solid #2a2a3a; padding: 8px 12px; text-align: left;
}
.post-content .vocab-table th { background: #1a0808; color: #e63946; }
.post-content .vocab-table td { background: #121826; }
.post-notice {
    background: #1a0a08; border: 1px solid #5a2a20; border-radius: 8px;
    padding: 14px 20px; font-size: 0.85rem; color: #c9a090; margin-bottom: 20px;
}
.post-nav {
    display: flex; justify-content: space-between; gap: 12px; margin: 24px 0;
}
.nav-link {
    color: #e63946; text-decoration: none; font-size: 0.9rem; max-width: 45%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-link:hover { text-decoration: underline; }
.category-grid { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.category-card {
    background: #121826; border: 1px solid #2a2a3a; border-radius: 10px;
    padding: 20px 24px; text-decoration: none; color: #d4d4d4;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 160px; transition: border-color 0.2s;
}
.category-card:hover { border-color: #e63946; }
.cat-icon { font-size: 2rem; }
.cat-name { font-size: 1.1rem; font-weight: 600; }
.cat-count { font-size: 0.8rem; color: #888; }
.about-page h1 { margin-bottom: 20px; color: #f0f0f0; }
.about-content { background: #121826; border: 1px solid #2a2a3a; border-radius: 8px; padding: 24px; }
.about-content p { margin-bottom: 12px; }
.about-content ul { margin: 12px 0 12px 20px; }
.about-content li { margin-bottom: 6px; }
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 12px; }
.btn {
    display: inline-block; margin-top: 16px; padding: 10px 24px;
    background: #8b1a1a; color: #fff; text-decoration: none; border-radius: 6px;
    font-size: 0.95rem; transition: background 0.2s;
}
.btn:hover { background: #e63946; }
.site-footer {
    text-align: center; padding: 24px 0; border-top: 1px solid #2a2a3a;
    font-size: 0.82rem; color: #555;
}
.footer-disclaimer {
    color: #8a5a40; font-size: 0.78rem; margin-top: 6px;
}
.pagination {
    display: flex; justify-content: center; gap: 8px; margin: 24px 0;
}
.pagination a, .pagination span {
    padding: 6px 12px; border: 1px solid #2a2a3a; border-radius: 4px;
    color: #d4d4d4; text-decoration: none; font-size: 0.9rem;
}
.pagination a:hover { border-color: #e63946; color: #e63946; }
.pagination .current { background: #8b1a1a; border-color: #8b1a1a; color: #fff; }
@media (max-width: 600px) {
    .site-header { flex-direction: column; align-items: flex-start; }
    .post-nav { flex-direction: column; }
    .nav-link { max-width: 100%; }
    .playlist-item { flex-wrap: wrap; gap: 4px; }
    .playlist-item .pl-num { min-width: 16px; }
    .playlist-item .pl-zh { min-width: 40px; font-size: 0.85rem; }
    .playlist-item .pl-pinyin { min-width: 60px; }
    .playlist-item .pl-thai-read { min-width: 60px; }
    .playlist-header { flex-direction: column; align-items: stretch; }
    .playlist-play-all-btn { width: 100%; text-align: center; }
}
