:root {
  --navy: #543ee8; --navy-dark: #4330c9; --gold: #ffcd20; --gold-dark: #a37b00; --bg: #faf9f6; --panel: #fff; --line: #e9e6df; --text: #3a4543; --muted: #6f7775; --ink: #011c1a;
  --green: #1e8e4b; --red: #d73b3e; --amber: #d98b00; --radius: 18px; --shadow: 0 1px 2px rgba(1,28,26,.03), 0 10px 30px -14px rgba(1,28,26,.14);
  --display: "Albert Sans", "Poppins", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Poppins, "Segoe UI", system-ui, sans-serif; font-size: 15px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.65; }
a { color: var(--navy); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; letter-spacing: -.02em; font-family: var(--display); color: var(--ink); font-weight: 700; }
::selection { background: var(--gold); color: var(--ink); }
h1 { font-size: 34px; } h2 { font-size: 26px; } h3 { font-size: 18px; }
p { margin: 0 0 1em; } .muted { color: var(--muted); }
img { max-width: 100%; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
.page { padding: 52px 24px 20px; }
.page-title { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; margin: 0 0 24px; }
.serif { font-family: Merriweather, Georgia, serif; }

/* Buttons & forms */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--navy); color: #fff; border: 1.5px solid var(--navy); border-radius: 52px; padding: 12px 26px; font: 500 15px/1.25 Poppins, sans-serif; cursor: pointer; transition: background-color .3s, border-color .3s, color .3s, transform .2s, box-shadow .3s; white-space: nowrap; box-shadow: 0 10px 24px -14px rgba(84,62,232,.8); }
.btn:hover { background: var(--ink); border-color: var(--ink); text-decoration: none; color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(255,205,32,1); } .btn-gold:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; box-shadow: none; } .btn-ghost:hover { background: #efecff; border-color: #efecff; color: var(--navy); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: none; } .btn-light:hover { background: #fff; border-color: var(--navy); color: var(--navy); }
.btn-success { background: var(--green); border-color: var(--green); box-shadow: none; } .btn-success:hover { background: #176f3b; border-color: #176f3b; }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; justify-content: center; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; margin-bottom: 7px; font-size: 14px; color: var(--ink); }
.input { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 18px; font: inherit; background: #fff; color: var(--ink); transition: border-color .25s, box-shadow .25s; }
select.input { cursor: pointer; }
.input:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(84,62,232,.14); }
textarea.input { resize: vertical; min-height: 90px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; } .check input { accent-color: var(--navy); width: 16px; height: 16px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; margin: 16px 0; border: 1px solid; }
.alert i { font-size: 18px; }
.alert-success { background: #ecfdf3; border-color: #a7f0c1; color: #0f6a37; } .alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; } .alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; } .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Cards */
.card { background: var(--panel); border: 1px solid #f0eee8; border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card-title { font: 700 19px/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grid { display: grid; gap: 22px; } .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-side { grid-template-columns: 2fr 1fr; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-blue { background: #efecff; color: #4330c9; } .badge-green { background: #dcf3e6; color: #15803d; } .badge-gold { background: var(--gold); color: var(--ink); } .badge-gray { background: #eceff4; color: #4b5563; } .badge-red { background: #fde2e2; color: #b91c1c; } .badge-purple { background: #ede6f7; color: #6a1b9a; }
.progress { height: 8px; background: #ebe9f7; border-radius: 999px; overflow: hidden; }
.progress b { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), #8372f3); border-radius: 999px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.progress.gold b { background: linear-gradient(90deg, #f2bd00, var(--gold)); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 13px 24px; border-radius: 52px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: .25s; z-index: 200; font-weight: 600; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.gold { background: var(--gold); color: var(--ink); } .toast.error { background: var(--red); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); } .empty i { font-size: 30px; width: 72px; height: 72px; border-radius: 50%; background: #efecff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; } .empty h3 { margin-bottom: 4px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; } .pagination a, .pagination span { padding: 7px 15px; border: 1px solid var(--line); border-radius: 52px; background: #fff; font-size: 13.5px; } .pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); } .pagination .total { border: 0; background: none; color: var(--muted); margin-left: auto; }

/* Hero / home */
.hero { background: radial-gradient(900px 500px at 85% 0%, #1b55b8 0%, var(--navy) 45%, var(--navy-dark) 100%); color: #fff; padding: 70px 0 80px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: rgba(216,166,0,.12); }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; }
.hero .kicker { color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; margin-bottom: 12px; display: block; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-family: Merriweather, Georgia, serif; font-weight: 900; margin-bottom: 16px; }
.hero p { color: #d6e0f5; font-size: 17px; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 18px 20px; backdrop-filter: blur(4px); }
.hero-stat b { font-size: 28px; display: block; font-weight: 800; } .hero-stat span { color: #c8d4ee; font-size: 13.5px; }
.section { padding: 56px 0; } .section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head .kicker { color: var(--muted); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; font-size: 14px; display: block; margin-bottom: 6px; }
.section-head .count { color: var(--muted); font-size: 15px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid #f0eee8; border-radius: 52px; padding: 5px; box-shadow: 0 6px 30px -12px rgba(1,28,26,.18); }
.filters .input { border: 0; background: transparent; box-shadow: none; padding: 9px 16px; width: auto; border-radius: 52px; } .filters .input:focus { box-shadow: none; } .filters input.input { width: 220px; } .filters .sep { width: 1px; height: 22px; background: var(--line); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.feature i { font-size: 26px; color: var(--navy); background: #eef2fb; width: 50px; height: 50px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature h3 { font-size: 16px; } .feature p { color: var(--muted); font-size: 14px; margin: 0; }
.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: st; }
.steps-row div { text-align: center; padding: 18px 10px; }
.steps-row div::before { counter-increment: st; content: counter(st); width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #1f2937; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; margin-bottom: 10px; }
.steps-row strong { display: block; margin-bottom: 4px; } .steps-row span { color: var(--muted); font-size: 13.5px; }

/* Course cards */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course-card { display: flex; flex-direction: column; background: #f5f5f5; border-radius: 14px; overflow: hidden; color: inherit; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background-color .35s; }
.course-card:hover { text-decoration: none; transform: translateY(-8px); background: #fff; box-shadow: 0 30px 60px -28px rgba(1,28,26,.35); }
.cc-thumb { position: relative; overflow: hidden; border-radius: 14px 14px 0 0; background: #e6e3dc; }
.cc-img { display: block; width: 100%; height: auto; aspect-ratio: auto 1 / 1; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.course-card:hover .cc-img { transform: scale(1.04); }
.cc-level { position: absolute; left: 14px; top: 14px; background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 400; padding: 5px 16px; border-radius: 52px; }
.cc-body { padding: 26px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.cc-body h3 { font-size: 20px; line-height: 1.4; margin-bottom: 8px; transition: color .25s; } .course-card:hover h3 { color: var(--navy); }
.cc-body p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.cc-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 14px; } .cc-meta i { color: var(--ink); margin-right: 3px; }
.cc-progress { margin-bottom: 16px; } .cc-progress small { color: var(--muted); display: block; margin-top: 6px; font-size: 12.5px; }
.cc-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid #e4e2dc; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.cc-foot strong { font: 700 20px/1 var(--display); color: var(--navy); } .cc-foot i { color: var(--ink); margin-right: 3px; }

/* Course detail */
.course-detail { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 34px; align-items: start; }
.course-media { border-radius: 14px; overflow: hidden; background: #e6e3dc; margin-bottom: 28px; position: relative; }
.course-media img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.course-media .cc-level { font-size: 14px; }
.course-detail h2.title { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.course-detail .lead { font-size: 17px; line-height: 1.75; color: var(--muted); margin-bottom: 18px; }
.course-detail .meta { display: flex; gap: 10px 22px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; margin-bottom: 30px; } .course-detail .meta i { color: var(--navy); margin-right: 4px; }
.course-detail h3.sub { font-size: 22px; margin: 34px 0 14px; }
.info-box { background: #f5f5f5; border-radius: 14px; padding: 30px 28px; margin-bottom: 24px; position: sticky; top: 86px; }
.info-box h3 { font-size: 20px; margin-bottom: 8px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid #e2e0da; font-size: 15px; }
.info-row span:first-child { font-weight: 600; color: var(--ink); } .info-row span:last-child { color: var(--muted); text-align: right; } .info-row span.price { color: var(--navy); font: 700 18px/1.2 var(--display); }
.info-box .cta { margin-top: 22px; display: grid; gap: 10px; }
.info-box ul { list-style: none; padding: 0; margin: 20px 0 0; color: var(--muted); font-size: 14px; } .info-box li { padding: 5px 0; display: flex; gap: 10px; align-items: center; } .info-box li i { color: var(--navy); }
.side-box { background: #f5f5f5; border-radius: 14px; padding: 26px 28px; margin-bottom: 24px; } .side-box h3 { font-size: 19px; margin-bottom: 12px; }
.side-course { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e2e0da; color: var(--ink); font-size: 14.5px; font-weight: 500; line-height: 1.4; } .side-course:last-child { border: 0; } .side-course img { width: 62px; height: auto; border-radius: 8px; flex: none; } .side-course:hover { color: var(--navy); text-decoration: none; }
.outline .module { border: 1px solid #ebe9e3; border-radius: 14px; margin-bottom: 12px; background: #fff; overflow: hidden; transition: box-shadow .3s; } .outline .module[open] { box-shadow: var(--shadow); }
.outline .module summary { padding: 17px 22px; font: 600 16px/1.35 var(--display); color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; background: #f5f5f5; transition: color .25s; } .outline .module summary:hover, .outline .module[open] summary { color: var(--navy); }
.outline .module summary::-webkit-details-marker { display: none; }
.outline .module summary small { color: var(--muted); font: 400 13.5px/1.3 Poppins, sans-serif; white-space: nowrap; }
.outline .lesson-row { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid #f0eee8; font-size: 14.5px; transition: background-color .2s; } .outline .lesson-row:hover { background: #faf9f6; }
.outline .lesson-row i.type { color: var(--navy); width: 18px; text-align: center; }
.outline .lesson-row .free { margin-left: auto; font-size: 12px; color: var(--green); font-weight: 700; }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: 6px 0 6px 28px; position: relative; } .checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--navy); font-weight: 800; }

/* Dashboard */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid #f0eee8; border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.stat i { font-size: 22px; color: #fff; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--navy); }
.stat.gold i { background: var(--gold); } .stat.green i { background: var(--green); } .stat.red i { background: var(--red); } .stat.purple i { background: #8372f3; }
.stat b { font-size: 22px; display: block; line-height: 1.1; } .stat span { color: var(--muted); font-size: 12.5px; }
.continue-card { display: grid; grid-template-columns: 180px 1fr auto; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.continue-card img { width: 100%; height: auto; border-radius: 10px; }
.continue-card h3 { font-size: 17px; margin-bottom: 4px; } .continue-card .muted { font-size: 13.5px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.badge-item { text-align: center; font-size: 12px; } .badge-item .ic { width: 60px; height: 60px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; margin-bottom: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.badge-item.locked .ic { background: #e5e8ef !important; color: #b8c0d0; box-shadow: none; } .badge-item.locked { color: var(--muted); }
.leader-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.leader-row .rank { width: 30px; font-weight: 800; color: var(--muted); font-size: 15px; } .leader-row .rank.top { color: var(--gold-dark); font-size: 18px; }
.leader-row img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; } .leader-row.me { background: #fff8dc; margin: 0 -10px; padding: 10px; border-radius: 10px; }
.announcement { border-left: 4px solid var(--gold); padding: 10px 14px; background: #fff; border-radius: 0 10px 10px 0; margin-bottom: 10px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.announcement strong { display: block; } .announcement small { color: var(--muted); }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; } .notif.unread { background: #f3f1ff; } .notif i { color: var(--navy); font-size: 18px; } .notif small { color: var(--muted); display: block; }

/* Auth */
.auth-wrap { max-width: 480px; margin: 70px auto 20px; padding: 0 16px; position: relative; }
.auth-card { background: #fff; border: 1px solid #f0eee8; border-radius: 22px; padding: 40px 38px; box-shadow: 0 30px 70px -30px rgba(1,28,26,.28); position: relative; }
.auth-wrap::before { content: ""; position: absolute; width: 92px; height: 92px; left: -34px; top: -30px; background-image: radial-gradient(#62c594 2.2px, transparent 2.6px); background-size: 18px 18px; }
.auth-wrap::after { content: ""; position: absolute; width: 74px; height: 74px; right: -22px; bottom: -22px; border-radius: 50%; border: 12px solid var(--gold); z-index: 0; }
.auth-card { z-index: 1; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; } .auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- Course player ---------- */
body.player-mode { background: #f4f3ef; }
.player { display: grid; grid-template-columns: 340px 1fr; min-height: calc(100vh - 68px); }
.player-side { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 68px); position: sticky; top: 0; }
.ps-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.ps-head a.back { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ps-head h2 { font-size: 16px; margin-bottom: 8px; } .ps-head .pct { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.ps-module { border-bottom: 1px solid var(--line); }
.ps-module > button { width: 100%; text-align: left; background: #f7f6f2; border: 0; padding: 12px 20px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text); }
.ps-module > button small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.ps-module > button i.chev { transition: transform .2s; color: var(--muted); } .ps-module.open > button i.chev { transform: rotate(180deg); }
.ps-module ul { list-style: none; margin: 0; padding: 4px 0; display: none; } .ps-module.open ul { display: block; }
.ps-lesson { display: flex; gap: 10px; align-items: center; padding: 9px 20px 9px 18px; font-size: 13.5px; color: var(--text); border-left: 3px solid transparent; }
.ps-lesson:hover { background: var(--bg); text-decoration: none; }
.ps-lesson.current { background: #f3f1ff; border-left-color: var(--navy); font-weight: 600; color: var(--navy); }
.ps-lesson .st { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd5e0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; color: #fff; }
.ps-lesson.done .st { background: var(--green); border-color: var(--green); }
.ps-lesson.locked { color: var(--muted); } .ps-lesson.locked .st { border-style: dashed; }
.ps-lesson .ti { flex: 1; } .ps-lesson .ty { color: var(--muted); font-size: 12px; }
.player-main { padding: 26px 32px 60px; max-width: 1000px; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.lesson-head h1 { font-size: 24px; margin: 4px 0 0; }
.lesson-head .crumbs { font-size: 13px; color: var(--muted); }
.lesson-head .tools { display: flex; gap: 6px; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; transition: .2s; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--text); }
.icon-btn:hover { border-color: var(--navy); color: var(--navy); } .icon-btn.active { color: var(--ink); border-color: var(--gold); background: var(--gold); }
.content-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.video-wrap { position: relative; background: #000; aspect-ratio: 16/9; } .video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-wrap { height: 78vh; min-height: 520px; } .pdf-wrap iframe { width: 100%; height: 100%; border: 0; }
.pdf-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #f7f6f2; font-size: 13.5px; flex-wrap: wrap; }
.article { padding: 32px 38px; font-size: 16.5px; line-height: 1.75; max-width: 820px; }
.article h1, .article h2, .article h3 { margin-top: 1.4em; } .article img { border-radius: 8px; } .article p { margin-bottom: 1.1em; } .article blockquote { border-left: 4px solid var(--gold); margin: 1.2em 0; padding: 6px 18px; background: #fff8dc; border-radius: 0 12px 12px 0; }
.audio-wrap { padding: 40px; text-align: center; } .audio-wrap audio { width: 100%; max-width: 640px; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.lesson-nav .complete { display: flex; align-items: center; gap: 10px; }
.lesson-nav .timer { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 28px 0 18px; overflow-x: auto; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button.active { color: var(--navy); border-color: var(--navy); }
.tab-pane { display: none; } .tab-pane.active { display: block; }
.locked-box { padding: 60px 30px; text-align: center; } .locked-box i { font-size: 48px; color: #b8c0d0; display: block; margin-bottom: 10px; }

/* Discussion */
.post { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.post .pb { flex: 1; min-width: 0; } .post .ph { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; } .post .ph strong { font-size: 14px; }
.post .body { white-space: pre-wrap; margin: 6px 0; font-size: 14.5px; }
.post .acts { display: flex; gap: 12px; font-size: 13px; } .post .acts button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; display: inline-flex; gap: 5px; align-items: center; } .post .acts button.liked { color: var(--navy); font-weight: 700; }
.post .replies { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); } .post .replies .post { padding: 10px 0; border: 0; } .post .replies .post img { width: 30px; height: 30px; }
.reply-form { margin-top: 8px; display: none; } .reply-form.open { display: block; }

/* Quiz */
.quiz-intro { padding: 36px; text-align: center; } .quiz-intro .facts { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 18px 0; color: var(--muted); font-size: 14px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #f7f6f2; font-size: 13.5px; }
.quiz-top .timer { font-weight: 700; color: var(--navy); } .quiz-top .timer.low { color: var(--red); }
.q-card { padding: 26px 30px; }
.q-card .qn { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.q-card h3 { font-size: 19px; line-height: 1.4; margin-bottom: 18px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid #e2dfd7; border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; cursor: pointer; transition: .15s; font-size: 15px; background: #fff; }
.opt:hover { border-color: #ab9efb; transform: translateX(3px); } .opt.selected { border-color: var(--navy); background: #f3f1ff; }
.opt.correct { border-color: var(--green); background: #ecfdf3; } .opt.wrong { border-color: var(--red); background: #fef2f2; }
.opt input { margin-top: 3px; accent-color: var(--navy); }
.opt .mark { margin-left: auto; font-weight: 800; }
.feedback { border-radius: 10px; padding: 12px 16px; margin-top: 12px; font-size: 14.5px; }
.feedback.ok { background: #ecfdf3; color: #0f6a37; } .feedback.bad { background: #fef2f2; color: #991b1b; } .feedback .exp { display: block; margin-top: 4px; color: var(--text); }
.q-nav { display: flex; justify-content: space-between; gap: 10px; padding: 16px 30px 24px; }
.match-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.match-row .left { padding: 10px 14px; border: 1.5px solid #e2dfd7; border-radius: 10px; background: #f7f6f2; }
.order-list { list-style: none; padding: 0; margin: 0; } .order-list li { display: flex; gap: 10px; align-items: center; border: 1.5px solid #e2dfd7; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.order-list li .mv { margin-left: auto; display: flex; gap: 4px; } .order-list li .mv button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.scale-row { display: flex; gap: 8px; flex-wrap: wrap; } .scale-row label { flex: 1; min-width: 90px; text-align: center; border: 1.5px solid #e2dfd7; border-radius: 10px; padding: 10px 6px; cursor: pointer; font-size: 13px; } .scale-row label.selected { border-color: var(--navy); background: #f3f1ff; font-weight: 600; } .scale-row input { display: none; }
.quiz-result { padding: 40px 30px; text-align: center; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; margin-bottom: 14px; background: conic-gradient(var(--c, var(--navy)) calc(var(--p) * 1%), #ebe9f7 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 12px; background: #fff; border-radius: 50%; } .score-ring span { position: relative; }
.quiz-review { text-align: left; max-width: 760px; margin: 24px auto 0; }
.quiz-review .q-card { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 18px 22px; }
.quiz-review h3 { font-size: 16px; margin-bottom: 10px; }

/* Flashcards */
.fc-wrap { padding: 30px; text-align: center; }
.fc-counter { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.fc-scene { perspective: 1200px; max-width: 640px; margin: 0 auto; height: 320px; }
.fc-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s; cursor: pointer; }
.fc-card.flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; font-size: 20px; line-height: 1.5; box-shadow: 0 24px 50px -20px rgba(84,62,232,.45); }
.fc-front { background: linear-gradient(135deg, var(--navy), #7462f0); color: #fff; }
.fc-back { background: #fff; border: 2px solid var(--gold); transform: rotateY(180deg); color: var(--text); }
.fc-face small { position: absolute; top: 14px; left: 18px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.fc-face img { max-height: 140px; border-radius: 10px; margin-bottom: 12px; }
.fc-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.fc-done { padding: 40px; }

/* Certificate */
.cert-page { background: var(--bg); padding: 50px 0 20px; }
.certificate { --navy: #0b3d91; --gold: #d8a600; --gold-dark: #b58b00; background: #fff; width: 1000px; max-width: 100%; margin: 0 auto; padding: 56px 70px; border: 14px double var(--navy); position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.18); font-family: Merriweather, Georgia, serif; text-align: center; color: #1f2937; }
.certificate::before { content: ""; position: absolute; inset: 10px; border: 2px solid var(--gold); pointer-events: none; }
.certificate img.logo { height: 90px; margin-bottom: 8px; }
.certificate .org { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--navy); font-weight: 700; }
.certificate h1 { font-size: 40px; color: var(--navy); margin: 18px 0 6px; font-weight: 900; }
.certificate .sub { font-style: italic; color: var(--muted); font-family: Poppins, sans-serif; }
.certificate .name { font-size: 38px; margin: 22px 0 6px; color: #1f2937; border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 30px 6px; }
.certificate .course { font-size: 22px; color: var(--navy); margin: 14px 0 6px; }
.certificate .date { font-family: Poppins, sans-serif; color: var(--muted); font-size: 14px; }
.certificate .sigs { display: flex; justify-content: space-around; margin-top: 46px; }
.certificate .sig { width: 260px; border-top: 1.5px solid #1f2937; padding-top: 8px; font-family: Poppins, sans-serif; font-size: 13px; }
.certificate .sig strong { display: block; font-size: 15px; }
.certificate .seal { position: absolute; right: 60px; bottom: 50px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--gold) 0%, var(--gold-dark) 100%); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; font-family: Poppins, sans-serif; font-weight: 700; letter-spacing: .08em; box-shadow: 0 6px 20px rgba(0,0,0,.25); padding: 10px; }
.certificate .code { position: absolute; left: 50px; bottom: 30px; font-family: Poppins, sans-serif; font-size: 11px; color: var(--muted); }
.cert-actions { text-align: center; margin: 20px 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media print { body * { visibility: hidden; } .certificate, .certificate * { visibility: visible; } .certificate { position: absolute; left: 0; top: 0; margin: 0; width: 100%; box-shadow: none; } @page { size: landscape; margin: 0; } }

@media (max-width: 1100px) { .features, .grid-4 { grid-template-columns: 1fr 1fr; } .steps-row, .stats-row { grid-template-columns: 1fr 1fr 1fr; } .course-grid, .grid-3 { grid-template-columns: 1fr 1fr; } .player { grid-template-columns: 300px 1fr; } .course-detail { grid-template-columns: 1fr; } .info-box { position: static; } }
@media (max-width: 860px) {
  .hero .container, .grid-2, .grid-side, .course-grid, .grid-3 { grid-template-columns: 1fr; } .features { grid-template-columns: 1fr; } .steps-row, .stats-row { grid-template-columns: 1fr 1fr; }
  .page { padding: 34px 18px 10px; } .page-title { margin-bottom: 18px; } .card { padding: 22px 20px; } .auth-card { padding: 30px 22px; } .auth-wrap { margin-top: 44px; } .filters { border-radius: 22px; } .filters input.input { width: 100%; flex: 1; }
  .player { grid-template-columns: 1fr; } .player-side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); } .player-main { padding: 18px 16px 50px; } .article { padding: 22px 18px; font-size: 16px; } .continue-card { grid-template-columns: 1fr; }
  .certificate { padding: 36px 20px; } .certificate .sigs { flex-direction: column; gap: 24px; align-items: center; } .certificate .seal { position: static; margin: 20px auto 0; } .certificate .code { position: static; display: block; margin-top: 10px; }
}
