:root{
    --red:#b91c1c;
    --dark:#161616;
    --gold:#f5b301;
    --cream:#fffaf0;
    --line:#eadfce;
    --muted:#667085;
}
*{
    box-sizing:border-box;
}
html{
    scroll-behavior:smooth;
}
body{
    margin:0;
    font-family:Arial,"Noto Sans SC",sans-serif;
    color:#232323;
    background:#f7f8fa;
    line-height:1.65;
}
a{
    color:inherit;
    text-decoration:none;
}
button,select{
    font:inherit;
}
.container{
    width:min(1180px,92%);
        margin:auto;
}
.header{
    position:sticky;
    top:0;
    z-index:20;
    background:#fff;
    border-bottom:1px solid #eee;
}
.header-inner{
    height:74px;
    display:flex;
    align-items:center;
    gap:24px;
}
.logo{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:800;
}
.logo img{
    width:54px;
    height:54px;
    object-fit:contain;
}
.logo span{
    color:var(--red);
    font-size:20px;
}
nav{
    margin-left:auto;
    display:flex;
    gap:20px;
    font-weight:700;
}
nav a:hover,nav a.active{
    color:var(--red);
}
.hero{
    background:linear-gradient(135deg,#1a1a1a,#4a0b0b);
    color:#fff;padding:64px 0;
}.hero-grid{
    display:grid;
    grid-template-columns:1.4fr .8fr;
    gap:36px;
    align-items:center;
}
.badge{
    display:inline-block;
    background:var(--gold);
    color:#111;
    padding:7px 13px;
    border-radius:999px;
    font-weight:800;
}
h1{
    font-size:clamp(34px,5vw,60px);
    line-height:1.12;
    margin:18px 0;
}
h1 span{
    color:#ffd24c;
}
.hero p{
    font-size:18px;
    color:#f2e8e8;
    max-width:720px;
}
.hero-card{
    background:#fff;
    color:#222;
    border-radius:24px;
    padding:26px;
    box-shadow:0 20px 60px #0006;
}
.hero-card strong{
    font-size:44px;
    color:var(--red);
}
.hero-card div{
    border-bottom:1px dashed #ddd;padding:12px 0;
}
.hero-card div:last-child{
    border:0;
}
.stats{
    margin-top:-22px;
    position:relative;
}
.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    background:#fff;
    border-radius:18px;
    box-shadow:0 10px 30px #0001;
    overflow:hidden;
}
.stat{
    padding:22px;
    text-align:center;
    border-right:1px solid #eee;
}
.stat:last-child{
    border:0;
}.stat b{
    display:block;
    font-size:28px;
    color:var(--red);
}
.layout
{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:26px;
    padding:42px 0 70px;
}
.sidebar{
    position:sticky;
    top:96px;
    align-self:start;
    background:#fff;
    border:1px solid #eee;
    border-radius:18px;
    padding:18px;
}
.sidebar h2{
    font-size:18px;
    margin:0 0 12px
}.lesson-select{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
}
.lesson-list{
    max-height:65vh;
    overflow:auto;
    margin-top:12px;
    display:grid;
    gap:7px;
}
.lesson-link{
    text-align:left;
    border:0;
    background:#f7f7f7;
    padding:10px 12px;
    border-radius:10px;
    cursor:pointer;
}
.lesson-link.active,.lesson-link:hover{
    background:var(--red);
    color:#fff;
}
.content{
    min-width:0
}
.lesson-unit{
    scroll-margin-top:96px;
    margin-bottom:14px;
    background:#fff;
    border:1px solid #e8e8e8;
    border-radius:18px;
    overflow:hidden;
    transition:box-shadow .25s ease,border-color .25s ease;
}
.lesson-unit.open{
    border-color:#e4b4b4;
    box-shadow:0 16px 40px #00000012;
}
.lesson-divider{
    display:none;
}
.lesson-toggle{
    width:100%;
    border:0;
    background:#fff;
    padding:20px 22px;
    display:flex;
    align-items:center;
    gap:16px;
    text-align:left;
    cursor:pointer;
    transition:background .2s ease;
}
.lesson-toggle:hover{
    background:#fff9f2;
}
.lesson-unit.open .lesson-toggle{
    background:linear-gradient(90deg,#fff8eb,#fff);
}
.lesson-number{
    flex:0 0 46px;
    width:46px;
    height:46px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:var(--red);
    color:#fff;
    font-weight:900;
}
.lesson-toggle-copy{
    min-width:0;
    flex:1;
}
.lesson-toggle-copy small{
    display:block;
    color:var(--red);
    font-weight:800;
}
.lesson-toggle-copy strong{
    display:block;
    font-size:20px;
    line-height:1.3;
}.lesson-toggle-copy span{
    display:block;
    color:var(--muted);
    font-size:14px;
    margin-top:3px;
}
.lesson-toggle-icon{
    font-size:24px;
    font-weight:700;
    color:var(--red);
    transition:transform .28s ease;
}
.lesson-unit.open .lesson-toggle-icon{
    transform:rotate(180deg);
}
.lesson-body{
    display:grid;
    grid-template-rows:0fr;
    transition:grid-template-rows .38s ease;
}
.lesson-body-inner{
    min-height:0;
    overflow:hidden;
}
.lesson-unit.open .lesson-body{
    grid-template-rows:1fr;
}
.lesson-body-content{
    padding:0 22px 26px;
}.lesson-head{
    background:#fff;border-radius:18px;
    padding:26px;
    border:1px solid #eee;
}
.lesson-kicker{
    font-weight:800;
    color:var(--red);
}
h2{
    line-height:1.25;
}
.lesson-head h2{
    font-size:34px;
    margin:8px 0;
}
.goal-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-top:20px;
}
.goal{
    background:var(--cream);
    border:1px solid #f0dfb6;
    padding:16px;
    border-radius:14px;
}
.section{
    background:#fff;
    border:1px solid #eee;
    border-radius:22px;
    padding:28px;
    margin-top:22px;
}
.section-title{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}
.section-title i{
    font-style:normal;
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    background:var(--red);
    color:#fff;
    border-radius:12px;
}
.section-title h3{
    margin:0;
    font-size:25px;
}
.word-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px
}
.word-card{
    border:1px solid var(--line);
    border-radius:16px;
    padding:18px;
    background:#fffdfa;
}
.word-top{
    display:flex;
    justify-content:space-between;
    gap:10px;
}
.hanzi{
    font-size:32px;
    font-weight:800;
}
.pinyin{
    color:var(--red);
    font-weight:800;
}
.meaning{
    font-weight:700;
}
.speak{
    border:0;
    background:#fff0e8;
    border-radius:50%;
    width:42px;
    height:42px;
    cursor:pointer;
}
.example{
    margin-top:12px;
    padding-top:12px;
    border-top:1px dashed #ddd;
    color:#444;
}
.example-item{
    padding:9px 0;
    border-bottom:1px dotted #e7e0d6;
}
.example-item:last-child{
    border-bottom:0;
}
.sentence-pinyin{
    color:var(--red);
    font-size:14px;
    font-weight:700;
    margin:2px 0;
}
.sentence-vi{
    color:#555;
}
.usage-note{
    margin-top:8px;
    padding:9px 10px;
    background:#fff8e8;
    border-radius:9px;
    font-size:13px;
    color:#5f4b22;
}
.flash .back{
    overflow:auto;
}
.flash-detail{
    font-size:13px;
    line-height:1.45;
}
.flash-detail b{
    font-size:16px;
    color:var(--red);
}
.grammar-box{
    background:#fff7e2;
    border-left:5px solid var(--gold);
    padding:20px;border-radius:12px;
}
.patterns{
    display:grid;
    gap:10px;
}
.pattern{
    padding:14px;
    border:1px solid #eee;
    border-radius:12px
}
.cn{
    font-size:20px;
    font-weight:800;
}
.dialogue{
    display:grid;
    gap:12px;
}
.bubble{
    max-width:80%;
    padding:14px 17px;
    border-radius:18px;
    background:#f1f3f5;
}
.bubble.b{
    margin-left:auto;
    background:#fff0e8;
}
.practice-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}
.practice{border:1px solid #eee;
    padding:18px;
    border-radius:14px;
}
.writing-row{
    font-size:32px;
    letter-spacing:16px;
    color:#aaa;
    border-bottom:1px dashed #ccc;padding:10px 0;
}
.quiz-option{
    display:block;
    width:100%;
    text-align:left;
    border:1px solid #ddd;
    background:#fff;
    padding:12px;
    margin:8px 0;
    border-radius:10px;
    cursor:pointer;
}
.quiz-option.correct{
    background:#e8f8ed;
    border-color:#31a354;
}
.quiz-option.wrong{
    background:#fff0f0;
    border-color:#dc2626;
}
.flashcards{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:12px;
}
.flash{
    min-height:145px;
    perspective:800px;
    cursor:pointer;
}
.flash-inner{
    position:relative;
    width:100%;
    height:100%;
    min-height:145px;
    transition:.5s;
    transform-style:preserve-3d;
}
.flash.flip .flash-inner{
    transform:rotateY(180deg);
}
.face{
    position:absolute;
    inset:0;backface-visibility:hidden;
    border-radius:15px;
    display:grid;
    place-items:center;
    text-align:center;
    padding:15px;
    border:1px solid #eee;
    background:#fff;
}
.back{
    transform:rotateY(180deg);
    background:#fff7e2;
}
.nav-buttons{
    display:flex;
    justify-content:flex-end;
    gap:10px;margin-top:20px;
    padding-top:18px;border-top:1px solid #eee;
}.btn{
    border:0;
    border-radius:12px;
    padding:13px 18px;
    font-weight:800;
    cursor:pointer;
    transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px #0002;
}
.btn:active{
    transform:translateY(0);
}
.primary{
    background:var(--red);
    color:#fff;
}
.light{
    background:#fff;
    border:1px solid #ddd;
}
.lesson-image{
    margin-top:22px;
    position:relative;
    overflow:hidden;
    border-radius:20px;
    min-height:280px;
    background:linear-gradient(135deg,#fff5dc,#ffe5e5);
    border:1px solid #f0dfc3;
}
.lesson-image img{
    display:block;
    width:100%;
    height:320px;
    object-fit:cover;
    transition:transform .55s ease;
}
.lesson-image:hover img{
    transform:scale(1.025);
}
.lesson-image-overlay{
    position:absolute;
    inset:auto 0 0 0;
    padding:28px 24px 20px;
    color:#fff;
    background:linear-gradient(transparent,rgba(0,0,0,.82));
}
.lesson-image-overlay b{
    display:block;
    font-size:24px;
}
.lesson-image-overlay span{
    display:block;
    color:#f5f5f5;
}
.image-placeholder{
    height:320px;
    display:grid;
    place-items:center;
    text-align:center;
    padding:25px;
    color:#7a5415;
    font-weight:700;
}
.progress-wrap{position:fixed;top:74px;left:0;right:0;height:4px;z-index:30;background:transparent}.progress-bar-page{height:100%;width:0;background:linear-gradient(90deg,var(--gold),var(--red));transition:width .12s linear}.lesson-unit.is-current{box-shadow:0 0 0 3px rgba(185,28,28,.10),0 18px 45px #0001}.floating-top{position:fixed;right:22px;bottom:92px;width:48px;height:48px;border:0;border-radius:50%;background:var(--dark);color:#fff;font-size:20px;cursor:pointer;box-shadow:0 10px 25px #0003;opacity:0;pointer-events:none;transform:translateY(10px);transition:.25s;z-index:25}.floating-top.show{opacity:1;pointer-events:auto;transform:none}.footer{background:#171717;color:#ddd;padding:36px 0;text-align:center}
@media(max-width:900px){
.hero-grid,.layout{
    grid-template-columns:1fr}.sidebar{position:static}.stats-grid{grid-template-columns:repeat(2,1fr)}.goal-grid,.word-grid{grid-template-columns:1fr}.flashcards{grid-template-columns:repeat(2,1fr)}nav{display:none}}
@media(max-width:560px){
    .practice-grid{grid-template-columns:1fr}.lesson-toggle{padding:16px}.lesson-number{width:40px;height:40px;flex-basis:40px}.lesson-toggle-copy strong{font-size:17px}.lesson-body-content{padding:0 12px 18px}.lesson-head,.section{padding:20px}.flashcards{grid-template-columns:1fr}.lesson-image img,.image-placeholder{height:230px}.lesson-image{min-height:230px}.lesson-image-overlay{padding:45px 16px 14px}.nav-buttons{justify-content:space-between}.btn{padding:11px 13px;font-size:14px}}
