/* --- CSS cho các bài học Kaiwa tiếng Nhật --- */
/* Bạn có thể giữ nguyên file này cho tất cả các bài học */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6; 
    margin: 0; 
    background-color: #f3eadc; 
}
.page-header, .page-footer { 
    text-align: center; 
    padding: 20px; 
}
.scene-container { 
    max-width: 900px; 
    margin: 20px auto; 
    position: relative; 
}
.scene-background-image {
    display: block; 
    width: 100%; 
    height: auto; 
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: opacity 0.4s ease;
}
.dialogue-overlay {
    position: relative; 
    margin-top: -80px; 
    margin-left: 20px; 
    margin-right: 20px;
    padding: 25px; 
    background: rgba(200, 180, 140, 0.55);
    border-radius: 15px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
@media (max-width: 600px) {
    .dialogue-overlay { 
        margin-top: -40px; 
        padding: 15px; 
        margin-left: 10px; 
        margin-right: 10px; 
    }
}
.dialogue-display-window { 
    color: #333; 
    min-height: 120px; 
    transition: opacity 0.15s ease; 
}
.speaker-container { 
    display: flex; 
    align-items: center; 
    margin-bottom: 10px; 
}
.speaker { 
    font-weight: 800; 
    font-size: 1.1rem; 
}
.speaker.yamada { color: #34495e; }
.speaker.suzuki { color: #e67e22; }
.speaker.an { color: #e84393; }
.dialogue-content-wrapper { 
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
}
.dialogue-play-btn { 
    background-color: #228B22; 
    border: none; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%;
    font-size: 1.2rem; 
    cursor: pointer; 
    color: white; 
    transition: all 0.2s;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}
.dialogue-texts { 
    flex-grow: 1; 
}
.japanese-text {
    font-size: clamp(1.2rem, 4vw, 1.6rem); 
    line-height: 1.8;
    margin: 0 0 8px 0; 
    color: #2c3e50; 
    font-weight: 500;
}
ruby { 
    ruby-align: center; 
}
rt { 
    font-size: 0.6em; 
    color: #7f8c8d; 
    user-select: none; 
}
.vietnamese-text {
    font-size: 1rem; 
    color: #555; 
    margin-top: 0;
    border-left: 3px solid #228B22; 
    padding-left: 10px; 
}
.highlight-word { 
    background-color: #fffa90; 
    border-radius: 4px; 
}
.grammar-teinei, .grammar-futsuu {
    font-weight: bold; 
    border-bottom: 2px dotted; 
    padding: 0 2px; 
    border-radius: 3px;
}
.grammar-teinei { 
    color: #2980b9; 
    border-color: #2980b9; 
    background-color: rgba(52, 152, 219, 0.05); 
}
.grammar-futsuu { 
    color: #c0392b; 
    border-color: #c0392b; 
    background-color: rgba(231, 76, 60, 0.05); 
}
.controls-wrapper { 
    margin-top: 20px; 
    padding-top: 10px; 
    border-top: 1px solid rgba(0,0,0,0.05); 
}
.scene-nav { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px; 
}
.scene-btn {
    background-color: #f0f0f0; 
    border: 1px solid #ccc; 
    color: #555;
    padding: 5px 15px; 
    border-radius: 15px; 
    cursor: pointer; 
    transition: all 0.2s ease;
}
.scene-btn.active { 
    background-color: #34495e; 
    color: white; 
    border-color: #34495e; 
    font-weight: bold; 
}
.dialogue-nav { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
}
#counter { 
    color: #777; 
    font-weight: 500; 
    min-width: 50px; 
    text-align: center; 
}
.nav-btn {
    background-color: white; 
    border: 1px solid #ccc; 
    color: #333;
    padding: 8px 20px; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.2s ease;
}
.nav-btn:disabled { 
    opacity: 0.5; 
    cursor: default; 
}