.demo-body { background: #f4f4f0; }
.demo-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(16,16,21,.14); background: rgba(244,244,240,.92); backdrop-filter: blur(18px); }
.demo-header-inner { min-height: 76px; display: flex; align-items: center; gap: 28px; flex-wrap: nowrap; }
.demo-nav { display: flex; gap: 7px; margin-left: 20px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nav-link { border: 0; border-radius: 999px; padding: 10px 15px; background: transparent; cursor: pointer; font-weight: 700; }
.nav-link.active { background: #101015; color: white; }
.student-pill { display: flex; align-items: center; gap: 10px; margin-left: 2px; border: 1px solid rgba(16,16,21,.18); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 800; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ff6b31; }
.demo-exit { min-height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 4px 4px 4px 16px; border: 1px solid #101015; border-radius: 999px; background: #101015; color: white; font-size: 13px; font-weight: 800; }
.demo-exit b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #d9ff43; color: #101015; font-size: 24px; line-height: 1; font-weight: 500; transition: transform .2s ease; }
.demo-exit:hover b { transform: rotate(90deg); }
.demo-main { min-height: calc(100vh - 76px); }
.view { display: none; }
.view.active { display: block; }
.demo-shell { width: min(1440px, 100%); margin: 0 auto; padding: 34px 32px 72px; }
.home-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.hero-panel { min-height: 430px; border-radius: 30px; padding: 42px; background: #3557ff; color: white; position: relative; overflow: hidden; }
.hero-panel::after { content: ""; position: absolute; width: 330px; height: 330px; border: 60px solid #d9ff43; border-radius: 50%; right: -120px; bottom: -130px; }
.hero-panel h1 { max-width: 760px; margin: 20px 0 18px; font-size: clamp(52px, 6.3vw, 94px); line-height: .9; letter-spacing: -.07em; text-transform: uppercase; }
.hero-panel p { max-width: 560px; font-size: 19px; color: rgba(255,255,255,.78); }
.hero-panel .button { position: relative; z-index: 1; margin-top: 22px; }
.continue-panel { min-height: 430px; border-radius: 30px; padding: 28px; background: #101015; color: white; display: flex; flex-direction: column; }
.continue-top { display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.65); font-size: 13px; }
.continue-panel h2 { margin: auto 0 22px; max-width: 500px; font-size: clamp(38px, 4vw, 58px); line-height: .98; letter-spacing: -.055em; }
.continue-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mini-progress { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; }
.mini-progress span { display: block; width: 68%; height: 100%; background: #d9ff43; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 64px 0 24px; }
.section-head h2 { margin: 0; font-size: clamp(36px, 4vw, 58px); line-height: 1; letter-spacing: -.055em; }
.section-head p { max-width: 520px; margin: 0; color: #686969; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter { border: 1px solid rgba(16,16,21,.18); border-radius: 999px; padding: 9px 14px; background: white; cursor: pointer; font-weight: 700; }
.filter.active { background: #d9ff43; border-color: #101015; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.course-card { min-height: 430px; display: flex; flex-direction: column; border: 1px solid rgba(16,16,21,.14); border-radius: 26px; overflow: hidden; background: white; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(25,25,35,.11); }
.course-visual { min-height: 220px; padding: 22px; color: white; position: relative; overflow: hidden; }
.course-visual::after { content: attr(data-code); position: absolute; right: -8px; bottom: -25px; font-size: 112px; line-height: 1; font-weight: 900; letter-spacing: -.08em; opacity: .22; }
.course-visual.blue { background: #3557ff; }
.course-visual.orange { background: #ff6b31; }
.course-visual.ink { background: #101015; }
.course-visual.lime { background: #d9ff43; color: #101015; }
.course-badge { display: inline-flex; width: fit-content; border: 1px solid currentColor; border-radius: 99px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.course-body { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.course-body h3 { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.04em; }
.course-body p { margin: 14px 0 24px; color: #696a6a; }
.course-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.course-price { font-size: 25px; font-weight: 900; }
.course-rating { font-size: 13px; color: #696a6a; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: start; }
.detail-main { border-radius: 30px; overflow: hidden; background: #101015; color: white; }
.detail-cover { min-height: 380px; padding: 42px; background: #3557ff; position: relative; overflow: hidden; }
.detail-cover::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: #d9ff43; right: -100px; top: -90px; }
.detail-cover h1 { position: relative; z-index: 1; max-width: 820px; margin: 30px 0 0; font-size: clamp(50px, 7vw, 94px); line-height: .9; letter-spacing: -.07em; text-transform: uppercase; }
.detail-content { padding: 36px 42px 46px; }
.detail-content h2 { margin: 0 0 16px; font-size: 34px; }
.detail-content p { color: rgba(255,255,255,.7); max-width: 800px; }
.curriculum { margin-top: 1px solid rgba(255,255,255,.15); margin-top: 34px; border-top: 1px solid rgba(255,255,255,.15); }
.module-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 19px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.module-row b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); }
.module-row span { color: rgba(255,255,255,.55); font-size: 13px; }
.buy-card { position: sticky; top: 100px; border: 1px solid rgba(16,16,21,.15); border-radius: 26px; padding: 26px; background: white; }
.buy-price { font-size: 48px; line-height: 1; font-weight: 900; letter-spacing: -.055em; }
.buy-card ul { list-style: none; padding: 0; margin: 26px 0; }
.buy-card li { padding: 12px 0; border-bottom: 1px solid rgba(16,16,21,.1); }
.buy-card .button { width: 100%; }

.dashboard-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; margin-bottom: 32px; }
.dashboard-head h1 { margin: 0; font-size: clamp(50px, 7vw, 96px); line-height: .9; letter-spacing: -.07em; text-transform: uppercase; }
.dashboard-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-card { border-radius: 22px; padding: 22px; background: white; }
.summary-card:nth-child(2) { background: #d9ff43; }
.summary-card:nth-child(3) { background: #ff6b31; }
.summary-card strong { display: block; font-size: 38px; }
.learning-list { display: grid; gap: 12px; }
.learning-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 22px; align-items: center; border: 1px solid rgba(16,16,21,.14); border-radius: 22px; padding: 14px; background: white; }
.learning-thumb { height: 100px; border-radius: 15px; background: #3557ff; display: grid; place-items: center; color: white; font-size: 34px; font-weight: 900; }
.learning-row h3 { margin: 0 0 8px; font-size: 23px; }
.learning-row p { margin: 0 0 12px; color: #6f706f; font-size: 14px; }
.row-progress { max-width: 520px; height: 7px; border-radius: 99px; background: #e5e5e0; overflow: hidden; }
.row-progress span { display: block; height: 100%; background: #3557ff; }

.lesson-shell { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 330px 1fr; }
.lesson-sidebar { border-right: 1px solid rgba(16,16,21,.14); padding: 28px 20px; background: #fff; }
.lesson-back { display: inline-flex; margin-bottom: 26px; font-weight: 800; }
.lesson-sidebar h2 { margin: 0 8px 18px; font-size: 24px; letter-spacing: -.035em; }
.lesson-item { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; border: 0; border-radius: 14px; padding: 12px; background: transparent; text-align: left; cursor: pointer; }
.lesson-item.active { background: #d9ff43; }
.lesson-number { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(16,16,21,.18); border-radius: 50%; font-size: 12px; font-weight: 900; }
.lesson-item span:last-child { font-size: 14px; font-weight: 700; }
.lesson-content { padding: 34px 42px 72px; }
.lesson-content h1 { max-width: 900px; margin: 18px 0 26px; font-size: clamp(44px, 5.6vw, 78px); line-height: .95; letter-spacing: -.06em; }
.video-wrap { max-width: 1050px; border-radius: 28px; overflow: hidden; background: #101015; }
.video-wrap video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #101015; }
.lesson-bottom { max-width: 1050px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; margin-top: 28px; }
.lesson-bottom p { color: #626363; max-width: 720px; }
.lesson-tabs { max-width: 1050px; display: flex; gap: 8px; margin-top: 28px; padding-bottom: 12px; border-bottom: 1px solid rgba(16,16,21,.14); overflow-x: auto; }
.lesson-tab { flex: none; border: 1px solid rgba(16,16,21,.16); border-radius: 999px; padding: 10px 16px; background: white; cursor: pointer; font-weight: 800; }
.lesson-tab.active { background: #101015; color: white; }
.lesson-panel { display: none; max-width: 1050px; }
.lesson-panel.active { display: block; }
.homework-card { margin-top: 24px; display: grid; grid-template-columns: .85fr 1.15fr; gap: 32px; border-radius: 24px; padding: 28px; background: white; border: 1px solid rgba(16,16,21,.14); }
.homework-card h2 { margin: 16px 0 12px; font-size: 32px; line-height: 1; letter-spacing: -.045em; }
.homework-card p { color: #656666; }
.homework-card form { display: flex; flex-direction: column; gap: 14px; }
.upload-field { display: flex; align-items: center; gap: 12px; border: 1px dashed rgba(16,16,21,.24); border-radius: 15px; padding: 12px; cursor: pointer; }
.upload-field span { flex: none; border-radius: 999px; padding: 7px 11px; background: #d9ff43; font-size: 12px; font-weight: 900; }
.upload-field input { position: absolute; opacity: 0; pointer-events: none; }
.upload-field b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6a6b6b; font-size: 13px; }
.homework-success { grid-column: 1 / -1; display: none; align-items: center; gap: 14px; border-radius: 16px; padding: 16px; background: #d9ff43; }
.homework-success.show { display: flex; }
.homework-success > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #101015; color: white; font-weight: 900; }
.homework-success p { margin: 3px 0 0; color: #454642; }
.materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.materials-grid article { display: grid; grid-template-columns: 54px 1fr 42px; gap: 15px; align-items: center; border: 1px solid rgba(16,16,21,.14); border-radius: 20px; padding: 18px; background: white; }
.materials-grid article > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 13px; background: #3557ff; color: white; font-size: 12px; font-weight: 900; }
.materials-grid h3 { margin: 0 0 5px; font-size: 18px; }
.materials-grid p { margin: 0; color: #6b6c6c; font-size: 13px; }
.materials-grid button { width: 42px; height: 42px; border: 1px solid rgba(16,16,21,.16); border-radius: 50%; background: transparent; cursor: pointer; font-size: 18px; }

.checkout-card { display: flex; gap: 18px; align-items: center; margin: 24px 0; padding: 16px; border-radius: 18px; background: white; }
.checkout-thumb { width: 92px; height: 92px; flex: none; border-radius: 15px; background: #3557ff; display: grid; place-items: center; color: white; font-size: 28px; font-weight: 900; }
.checkout-card h3 { margin: 0 0 8px; }
.checkout-card p { margin: 0; }
.checkout-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkout-fields .field:first-child { grid-column: 1 / -1; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; transform: translateY(130%); border-radius: 16px; padding: 15px 19px; background: #101015; color: white; font-weight: 800; transition: transform .3s ease; }
.toast.show { transform: translateY(0); }

@media (max-width: 1020px) {
  .home-hero, .detail-layout { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr 1fr; }
  .buy-card { position: static; }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-sidebar { border-right: 0; border-bottom: 1px solid rgba(16,16,21,.14); }
  .lesson-items { display: flex; overflow-x: auto; gap: 6px; }
  .lesson-item { min-width: 220px; }
}
@media (max-width: 760px) {
  .demo-header-inner { min-height: 68px; gap: 12px; }
  .demo-shell { padding: 22px 18px 54px; }
  .demo-nav { position: fixed; z-index: 36; left: 12px; right: 12px; bottom: 12px; margin: 0; justify-content: center; border-radius: 999px; padding: 6px; background: #101015; box-shadow: 0 14px 50px rgba(0,0,0,.25); }
  .nav-link { flex: 1; color: white; font-size: 13px; padding-inline: 8px; }
  .nav-link.active { background: #d9ff43; color: #101015; }
  .student-pill { display: none; }
  .header-actions { gap: 6px; }
  .lang-switch button { min-width: 35px; }
  .demo-exit { min-height: 42px; padding: 3px; border-radius: 50%; }
  .demo-exit span { display: none; }
  .demo-exit b { width: 36px; height: 36px; }
  .case-label { display: none; }
  .hero-panel, .continue-panel { min-height: 390px; padding: 26px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 390px; }
  .dashboard-head { grid-template-columns: 1fr; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .learning-row { grid-template-columns: 82px 1fr; }
  .learning-thumb { height: 82px; }
  .learning-row .button { grid-column: 1 / -1; }
  .detail-cover, .detail-content { padding: 26px; }
  .detail-cover { min-height: 330px; }
  .lesson-content { padding: 24px 18px 110px; }
  .lesson-bottom { grid-template-columns: 1fr; }
  .homework-card { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: 1fr; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-fields .field:first-child { grid-column: auto; }
}
