/* ============================================================
   Teach Me Now  ·  NOVA design system
   Original work. Fonts: Alexandria + Readex Pro (SIL OFL 1.1), self-hosted.
   ============================================================ */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@property --pct { syntax: '<number>'; initial-value: 0; inherits: false; }

:root {
  --bg: #05060e; --bg-2: #0b0d1b; --bg-3: #12152a;
  --ink: #f4f5ff; --ink-2: rgba(244,245,255,.68); --ink-3: rgba(244,245,255,.42);
  --vio: #7b5cff; --vio-hi: #a08bff; --vio-lo: #4a2ee8;
  --cy: #18e0ff; --lime: #ccff3d; --rose: #ff4d8d; --amber: #ffb23d; --mint: #3dffb5;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --glass: rgba(255,255,255,.045); --glass-2: rgba(255,255,255,.08);
  --grad: linear-gradient(120deg, #7b5cff 0%, #18e0ff 100%);
  --grad-warm: linear-gradient(120deg, #ff4d8d 0%, #ffb23d 100%);
  --shadow: 0 24px 70px -20px rgba(0,0,0,.7);
  --f-head: 'Alexandria', 'Readex Pro', system-ui, sans-serif;
  --f-body: 'Readex Pro', 'Alexandria', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r: 26px;

  /* map the older tokens onto the new palette so every old component re-colors */
  --clr-bg-deep: var(--bg); --clr-bg-mid: var(--bg-2); --clr-bg-surface: var(--bg-3);
  --clr-accent-blue: var(--vio-hi); --clr-accent-gold: var(--amber); --clr-accent-teal: var(--cy);
  --clr-accent-glow: rgba(123,92,255,.22);
  --glass-bg: var(--glass); --glass-border: var(--line); --glass-hover: var(--glass-2); --glass-active: rgba(123,92,255,.16);
  --txt-primary: var(--ink); --txt-secondary: var(--ink-2); --txt-muted: var(--ink-3); --txt-accent: var(--vio-hi);
  --clr-success: #36e6a0; --clr-warning: var(--amber); --clr-danger: #ff5d7a; --clr-info: var(--cy);
  --font-ar: var(--f-body); --font-en: var(--f-body); --font-active: var(--f-body);
  --r-md: 16px; --r-lg: 22px; --r-xl: 30px;
  --ease-out: var(--ease); --ease-spring: var(--spring);
  --shadow-sm: 0 4px 20px rgba(0,0,0,.4); --shadow-md: var(--shadow); --shadow-lg: 0 30px 90px -20px rgba(0,0,0,.8);
  --shadow-glow: 0 0 60px rgba(123,92,255,.28);
  --nav-h: 0px; --bottomnav-h: 0px;
}
[data-theme="light"] {
  --bg: #f1f0ff; --bg-2: #e8e6ff; --bg-3: #ffffff;
  --ink: #0c0c24; --ink-2: rgba(12,12,36,.7); --ink-3: rgba(12,12,36,.46);
  --vio: #5b3df5; --vio-hi: #5b3df5; --vio-lo: #3a22c4;
  --line: rgba(12,12,36,.1); --line-2: rgba(12,12,36,.18);
  --glass: rgba(255,255,255,.72); --glass-2: rgba(255,255,255,.95);
  --shadow: 0 24px 60px -24px rgba(60,40,160,.35);
  --clr-accent-glow: rgba(91,61,245,.14);
  --shadow-sm: 0 4px 18px rgba(60,40,160,.12); --shadow-md: var(--shadow); --shadow-lg: 0 30px 80px -24px rgba(60,40,160,.4);
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body { font-family: var(--f-body); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body, input, select, textarea, button { font-family: var(--f-body); }
h1, h2, h3, h4, .section-title, .su-q, .modal-title, .stat-value, .nv-display { font-family: var(--f-head); letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
::selection { background: var(--vio); color: #fff; }
* { -webkit-tap-highlight-color: transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: linear-gradient(var(--vio), var(--cy)); border-radius: 99px; border: 3px solid var(--bg); } ::-webkit-scrollbar-track { background: var(--bg); }

/* animated atmosphere that sits behind every screen */
.nv-atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
.nv-atmos i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; mix-blend-mode: screen; animation: nvDrift 26s ease-in-out infinite alternate; }
.nv-atmos i:nth-child(1) { background: radial-gradient(circle, #5b3df5 0%, transparent 62%); top: -22vmax; inset-inline-start: -14vmax; }
.nv-atmos i:nth-child(2) { background: radial-gradient(circle, #18e0ff 0%, transparent 62%); bottom: -26vmax; inset-inline-end: -16vmax; animation-delay: -9s; opacity: .32; }
.nv-atmos i:nth-child(3) { background: radial-gradient(circle, #ff4d8d 0%, transparent 62%); top: 38vh; inset-inline-start: 38vw; width: 40vmax; height: 40vmax; animation-delay: -16s; opacity: .2; }
.nv-atmos::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0, transparent 72%); mask-image: radial-gradient(ellipse at 50% 30%, #000 0, transparent 72%); }
[data-theme="light"] .nv-atmos i { mix-blend-mode: multiply; opacity: .25; }
[data-theme="light"] .nv-atmos i:nth-child(2) { opacity: .2; } [data-theme="light"] .nv-atmos i:nth-child(3) { opacity: .12; }
[data-theme="light"] .nv-atmos::after { background-image: radial-gradient(rgba(12,12,36,.12) 1px, transparent 1.4px); }
@keyframes nvDrift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.15) rotate(40deg); } }
.nv-grain { position: fixed; inset: -50%; z-index: 9990; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: nvGrain 1.2s steps(6) infinite; }
@keyframes nvGrain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-2%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* scroll progress + cursor glow */
.nv-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 9999; transform-origin: 0 50%; background: var(--grad); transform: scaleX(0); }
[dir="rtl"] .nv-progress { transform-origin: 100% 50%; }
.nv-cursor { position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; z-index: -1; pointer-events: none; background: radial-gradient(circle, rgba(123,92,255,.22), transparent 62%); transition: opacity .4s; opacity: 0; will-change: transform; }
@media (hover: hover) { .nv-cursor.on { opacity: 1; } }

/* preloader: curtain that opens */
.nv-pre { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; background: var(--bg); transition: clip-path 1s var(--ease), opacity .4s .8s; clip-path: circle(150% at 50% 50%); }
.nv-pre.go { clip-path: circle(0% at 50% 50%); opacity: 0; pointer-events: none; }
.nv-pre svg { width: 92px; height: 92px; overflow: visible; }
.nv-pre path { fill: none; stroke: url(#nvg); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 240; stroke-dashoffset: 240; animation: nvDraw .8s var(--ease) forwards; }
.nv-pre path:nth-child(2) { animation-delay: .15s; }
.nv-pre.go svg { transform: scale(.6); opacity: 0; transition: .5s; }
@keyframes nvDraw { to { stroke-dashoffset: 0; } }

/* ---------- reveal vocabulary ---------- */
[data-rv] { opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease), clip-path 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); will-change: transform, opacity; }
[data-rv="up"] { transform: translateY(46px); }
[data-rv="blur"] { filter: blur(18px); transform: scale(.96); }
[data-rv="scale"] { transform: scale(.82); }
[data-rv="left"] { transform: translateX(-60px); } [data-rv="right"] { transform: translateX(60px); }
[data-rv="mask"] { clip-path: inset(0 0 100% 0 round 24px); transform: translateY(20px); opacity: 1; }
[data-rv="tilt"] { transform: perspective(900px) rotateX(24deg) translateY(50px); transform-origin: 50% 100%; }
[data-rv].in { opacity: 1; transform: none; filter: none; clip-path: inset(-60px round 24px); }
.nv-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.nv-split .w > span { display: inline-block; transform: translateY(115%) rotate(6deg); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms + 150ms); }
.nv-split.in .w > span { transform: none; }

/* ---------- buttons ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; font: 600 .95rem var(--f-body); padding: 13px 26px; border-radius: 18px 18px 18px 6px; transition: transform .35s var(--spring), box-shadow .35s, background .3s; letter-spacing: 0; }
[dir="rtl"] .btn { border-radius: 18px 18px 6px 18px; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-130%) skewX(-20deg); transition: transform .8s var(--ease); }
.btn:hover::before { transform: translateX(130%) skewX(-20deg); }
.btn::after { display: none; }
.btn:hover { transform: translateY(-3px); } .btn:active { transform: translateY(0) scale(.96); transition-duration: .1s; }
.btn-primary { background: var(--lime); color: #101400; box-shadow: 0 10px 30px -8px rgba(204,255,61,.55), inset 0 -3px 0 rgba(0,0,0,.14); }
.btn-primary:hover { box-shadow: 0 18px 40px -8px rgba(204,255,61,.7), inset 0 -3px 0 rgba(0,0,0,.14); }
.btn-primary svg { stroke: currentColor; }
.btn-gold { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -8px rgba(123,92,255,.6); }
.btn-gold svg { stroke: #fff; }
.btn-glass { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-danger { background: rgba(255,93,122,.14); color: var(--clr-danger); box-shadow: inset 0 0 0 1px rgba(255,93,122,.4); }
.btn-sm { padding: 9px 18px; font-size: .82rem; } .btn-lg { padding: 17px 34px; font-size: 1.04rem; }
[data-theme="light"] .btn-primary { background: #0c0c24; color: var(--lime); box-shadow: 0 12px 30px -10px rgba(12,12,36,.6); }
.nv-ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: nvRip .7s ease-out forwards; pointer-events: none; z-index: -1; }
@keyframes nvRip { to { transform: scale(1); opacity: 0; } }
.btn .nv-arrow { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.14); display: grid; place-items: center; transition: transform .4s var(--spring); }
.btn:hover .nv-arrow { transform: translateX(-4px) rotate(-12deg); } [dir="ltr"] .btn:hover .nv-arrow { transform: translateX(4px) rotate(12deg); }

/* ---------- inputs: floating label, living border ---------- */
.nv-field { position: relative; display: block; margin-bottom: 16px; }
.nv-field input, .nv-field select, .nv-field textarea { width: 100%; height: 58px; padding: 22px 18px 6px 18px; padding-inline-end: 52px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--glass); color: var(--ink); font: 500 1rem var(--f-body); outline: 0; transition: border-color .3s, box-shadow .4s var(--ease), background .3s, transform .3s var(--spring); }

.nv-field label { position: absolute; top: 19px; inset-inline-start: 18px; color: var(--ink-3); pointer-events: none; font-size: .95rem; transition: all .35s var(--ease); transform-origin: 100% 0; }
.nv-field input:focus + label, .nv-field input:not(:placeholder-shown) + label, .nv-field select:focus + label, .nv-field select.has + label { top: 8px; font-size: .68rem; color: var(--vio-hi); letter-spacing: .04em; }
.nv-field input:focus { border-color: var(--vio); box-shadow: 0 0 0 5px rgba(123,92,255,.18), 0 14px 34px -14px rgba(123,92,255,.55); background: var(--glass-2); transform: translateY(-2px); }
.nv-field .ic { position: absolute; top: 50%; inset-inline-end: 16px; width: 22px; height: 22px; margin-top: -11px; color: var(--ink-3); transition: color .3s, transform .4s var(--spring); }
.nv-field:focus-within .ic { color: var(--cy); transform: scale(1.18) rotate(-8deg); }
.nv-field.pw input { padding-inline-end: 88px; } .nv-field .eye { position: absolute; top: 50%; inset-inline-end: 44px; margin-top: -16px; width: 32px; height: 32px; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 50%; display: grid; place-items: center; transition: .3s; }
.nv-field .eye:hover { color: var(--ink); background: var(--glass-2); }
.nv-field .bar { position: absolute; bottom: 0; inset-inline: 18px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .5s var(--ease); transform-origin: 100% 50%; }
.nv-field:focus-within .bar { transform: scaleX(1); }
.nv-field.bad input { border-color: var(--clr-danger); animation: nvShake .5s; }
@keyframes nvShake { 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
.form-input, .form-select, .notes-area, #todo-input, #chat-input { border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--glass); color: var(--ink); transition: border-color .3s, box-shadow .4s var(--ease), transform .3s var(--spring), background .3s; }
.form-input:focus, .form-select:focus, .notes-area:focus, #todo-input:focus, #chat-input:focus { border-color: var(--vio); box-shadow: 0 0 0 5px rgba(123,92,255,.18), 0 14px 34px -14px rgba(123,92,255,.55); outline: 0; transform: translateY(-2px); background: var(--glass-2); }
.form-input::placeholder { color: var(--ink-3); }
select option { background: var(--bg-3); color: var(--ink); }

/* ---------- cards ---------- */
.glass-card, .stat-card, .course-card, .forum-post, .mini-course-card, .grade-banner, .mistakes-banner, .todo-item, .notif-item, .modal, .sidebar, .cp-unit, .quick-action-btn, .mistake-card, .profile-card, .wallet-card, .chat-msg-bubble {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
}
.course-card:hover, .stat-card:hover, .quick-action-btn:hover, .mini-course-card:hover, .forum-post:hover, .cp-unit:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
/* spotlight that follows the pointer (set by nova.js) */
[data-spot] { --mx: 50%; --my: 50%; }
[data-spot]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(123,92,255,.22), transparent 70%); }
[data-spot]:hover::after { opacity: 1; }
/* rotating conic hairline border */
.nv-ring { position: relative; }
.nv-ring::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang), transparent 0 55%, var(--vio) 70%, var(--cy) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: nvSpin 6s linear infinite; pointer-events: none; }
@keyframes nvSpin { to { --ang: 360deg; } }
.badge, .course-badge { border-radius: 99px; font-weight: 600; letter-spacing: 0; }
.skeleton { background: linear-gradient(100deg, var(--glass) 30%, var(--glass-2) 50%, var(--glass) 70%); background-size: 250% 100%; animation: nvSk 1.4s linear infinite; border-radius: 20px; }
@keyframes nvSk { to { background-position: -150% 0; } }
.section-title { font-weight: 800; font-size: 1.25rem; }
.section-title::before { background: var(--grad); border-radius: 4px; width: 5px; }
.section-link { color: var(--cy); }
.empty-state-icon { background: var(--glass-2); border-radius: 22px; }

/* ---------- toasts, modals, sheets ---------- */
.toast { border-radius: 18px; background: var(--bg-3); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(16px); transition: transform .6s var(--spring), opacity .4s; }
.modal-overlay { background: rgba(3,4,12,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal { background: var(--bg-3); border-radius: 30px; box-shadow: var(--shadow-lg); transition: transform .6s var(--spring), opacity .4s; }
.sheet { background: var(--bg-3); border-radius: 32px 32px 0 0; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); transition: transform .6s var(--spring); }
.sheet-bg { backdrop-filter: blur(6px); background: rgba(3,4,12,.55); }
.sheet-row { border-color: var(--line); transition: background .3s, padding .4s var(--ease); border-radius: 14px; }
.sheet-row:hover { background: var(--glass-2); padding-inline: 14px; }
.sheet-row svg { width: 18px; height: 18px; color: var(--ink-3); }
.sheet-opt button.on { background: var(--vio); border-color: var(--vio); }

/* ---------- floating navigation bar ---------- */
.nv-nav { position: fixed; z-index: 800; top: 14px; inset-inline: 0; margin-inline: auto; width: min(1080px, calc(100% - 24px)); height: 64px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border-radius: 26px; background: color-mix(in srgb, var(--bg-2) 72%, transparent); border: 1px solid var(--line-2); box-shadow: 0 18px 50px -18px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.07); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); transition: transform .6s var(--ease), width .6s var(--ease), height .5s var(--ease), border-radius .5s var(--ease), background .4s; animation: nvNavIn 1.1s var(--ease) .2s both; }
@keyframes nvNavIn { from { transform: translateY(-120%) scale(.9); opacity: 0; } }
.nv-nav.min { width: min(760px, calc(100% - 24px)); height: 56px; top: 10px; }
.nv-nav.hide { transform: translateY(-140%); }
.nv-brand { display: flex; align-items: center; padding: 0 8px; flex-shrink: 0; } .nv-brand img { height: 34px; width: auto; }
.nv-links { display: flex; gap: 2px; position: relative; margin-inline-start: auto; margin-inline-end: auto; }
.nv-link, .nav-item.nv-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 16px; font: 500 .9rem var(--f-body); text-decoration: none; transition: color .3s; white-space: nowrap; }
.nv-link svg, .nv-ic svg { width: 19px; height: 19px; flex-shrink: 0; transition: transform .5s var(--spring); }
.nv-link:hover { color: var(--ink); } .nv-link:hover svg { transform: translateY(-2px) rotate(-6deg) scale(1.12); }
.nav-item.nv-link.active { color: var(--ink); }
.nv-lens { position: absolute; top: 0; height: 44px; border-radius: 16px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 24px -10px rgba(123,92,255,.7); transition: inset-inline-start .55s var(--spring), width .55s var(--spring); z-index: 0; inset-inline-start: 0; width: 0; }
.nv-lens::after { content: ""; position: absolute; bottom: -2px; left: 22%; right: 22%; height: 3px; border-radius: 3px; background: var(--grad); filter: blur(.5px); }
.nv-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nv-ic { position: relative; width: 44px; height: 44px; border-radius: 16px; border: 0; background: var(--glass); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: transform .4s var(--spring), background .3s; }
.nv-ic:hover { transform: translateY(-3px) rotate(-5deg); background: var(--glass-2); } .nv-ic:active { transform: scale(.9); }
.nv-ic .nav-pip { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px var(--bg-2); display: none; } .nv-ic .nav-pip.show { display: block; animation: nvPing 1.8s infinite; }
@keyframes nvPing { 0%{box-shadow:0 0 0 3px var(--bg-2),0 0 0 3px rgba(255,77,141,.7)} 100%{box-shadow:0 0 0 3px var(--bg-2),0 0 0 14px rgba(255,77,141,0)} }
.nv-theme .sun, .nv-theme .moon { position: absolute; transition: transform .7s var(--spring), opacity .4s; }
.nv-theme .sun { transform: rotate(-90deg) scale(0); opacity: 0; } .nv-theme .moon { transform: none; opacity: 1; }
[data-theme="light"] .nv-theme .sun { transform: none; opacity: 1; } [data-theme="light"] .nv-theme .moon { transform: rotate(90deg) scale(0); opacity: 0; }
.nv-cta-sm { height: 44px; padding: 0 20px; border-radius: 16px 16px 16px 6px; border: 0; background: var(--lime); color: #101400; font: 700 .88rem var(--f-body); cursor: pointer; transition: transform .35s var(--spring), box-shadow .3s; box-shadow: 0 8px 24px -8px rgba(204,255,61,.6); }
[dir="rtl"] .nv-cta-sm { border-radius: 16px 16px 6px 16px; } .nv-cta-sm:hover { transform: translateY(-3px); }
[data-theme="light"] .nv-cta-sm { background: #0c0c24; color: var(--lime); }
.nv-burger { display: none; }
@media (max-width: 760px) {
  .nv-nav { height: 60px; width: calc(100% - 16px); top: 8px; padding: 0 8px; border-radius: 24px; }
  .nv-link span { display: none; } .nv-link { padding: 0 12px; }
  .nav-item.nv-link.active span { display: inline; } .nav-item.nv-link.active { padding: 0 14px; }
  .nv-brand img { height: 28px; }
  .nv-nav.landing .nv-links { display: none; } .nv-nav.landing .nv-burger { display: grid; } .nv-nav.landing .nv-cta-sm.opt, .nv-nav.landing .nv-ic.opt { display: none; }
}
@media (max-width: 400px) { .nv-brand { display: none; } .nv-links { margin-inline-start: 0; } }
/* nav drop panel for the landing on small screens */
.nv-drop { position: fixed; z-index: 790; top: 76px; inset-inline: 8px; border-radius: 28px; padding: 14px; background: color-mix(in srgb, var(--bg-2) 90%, transparent); backdrop-filter: blur(26px); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); transform-origin: 50% 0; transform: scale(.92) translateY(-14px); opacity: 0; pointer-events: none; transition: transform .55s var(--spring), opacity .3s; }
.nv-drop.open { transform: none; opacity: 1; pointer-events: auto; }
.nv-drop a { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-radius: 16px; color: var(--ink); text-decoration: none; font-weight: 500; opacity: 0; transform: translateY(14px); transition: .5s var(--ease), background .3s; }
.nv-drop.open a { opacity: 1; transform: none; transition-delay: calc(var(--i) * 50ms + 120ms); }
.nv-drop a:hover { background: var(--glass-2); }
.nv-drop a svg { width: 18px; height: 18px; color: var(--ink-3); }
.nv-drop .nv-cta-sm { width: 100%; margin-top: 8px; height: 52px; display: block; opacity: 0; transition: .5s .4s; } .nv-drop.open .nv-cta-sm { opacity: 1; }

/* ---------- main app shell ---------- */
#main-app { min-height: 100vh; }
.topbar, .bottom-nav { display: none !important; }
.page { padding: 96px 18px 70px; max-width: 1100px; margin-inline: auto; height: auto; min-height: 100vh; background: none; }
.page.active { animation: none; }
.page.active > *, .page.active .stagger > * { animation: nvPageIn .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
@keyframes nvPageIn { from { opacity: 0; transform: translateY(34px) scale(.97); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.page.active > *:nth-child(1) { --i: 0 } .page.active > *:nth-child(2) { --i: 1 } .page.active > *:nth-child(3) { --i: 2 } .page.active > *:nth-child(4) { --i: 3 } .page.active > *:nth-child(5) { --i: 4 } .page.active > *:nth-child(6) { --i: 5 } .page.active > *:nth-child(7) { --i: 6 } .page.active > *:nth-child(8) { --i: 7 }
.stagger > *:nth-child(1) { --i: 1 } .stagger > *:nth-child(2) { --i: 2 } .stagger > *:nth-child(3) { --i: 3 } .stagger > *:nth-child(4) { --i: 4 } .stagger > *:nth-child(5) { --i: 5 } .stagger > *:nth-child(6) { --i: 6 } .stagger > *:nth-child(n+7) { --i: 7 }
#page-support { padding: 0; }
.nv-wipe { position: fixed; inset: 0; z-index: 9000; pointer-events: none; background: var(--grad); clip-path: circle(0% at var(--wx, 50%) var(--wy, 50%)); }
.nv-wipe.go { animation: nvWipe .9s var(--ease) forwards; }
@keyframes nvWipe { 0% { clip-path: circle(0% at var(--wx) var(--wy)); opacity: .9; } 60% { clip-path: circle(150% at var(--wx) var(--wy)); opacity: .9; } 100% { clip-path: circle(150% at var(--wx) var(--wy)); opacity: 0; } }

/* home */
.nv-hello { position: relative; overflow: hidden; padding: 30px 26px; border-radius: 34px; background: linear-gradient(135deg, rgba(123,92,255,.35), rgba(24,224,255,.16) 60%, rgba(255,77,141,.12)); border: 1px solid var(--line-2); margin-bottom: 16px; }
.nv-hello::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; inset-inline-end: -60px; top: -90px; background: conic-gradient(from var(--ang), var(--vio), var(--cy), var(--rose), var(--vio)); filter: blur(46px); opacity: .55; animation: nvSpin 9s linear infinite; }
.nv-hello > * { position: relative; }
.nv-hello small { color: var(--ink-2); font-size: .9rem; }
.nv-hello h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; margin: 6px 0 0; line-height: 1.2; }
.nv-hello h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quick-actions { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.quick-action-btn { flex-direction: column; padding: 18px 8px; gap: 10px; cursor: pointer; color: var(--ink); text-align: center; display: flex; align-items: center; }
.quick-action-btn:hover { transform: translateY(-8px) rotate(-1.5deg); }
.qa-icon { width: 52px; height: 52px; border-radius: 18px !important; display: grid; place-items: center; background: var(--glass-2) !important; transition: transform .6s var(--spring); }
.quick-action-btn:hover .qa-icon { transform: scale(1.15) rotate(8deg); }
.qa-icon svg { stroke: var(--cy) !important; width: 24px; height: 24px; }
.quick-action-btn:nth-child(2) .qa-icon svg { stroke: var(--rose) !important; } .quick-action-btn:nth-child(3) .qa-icon svg { stroke: var(--lime) !important; } .quick-action-btn:nth-child(4) .qa-icon svg { stroke: var(--amber) !important; }
.qa-label { font-size: .82rem; font-weight: 600; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: 1.3fr 1fr; margin-bottom: 8px; }
.stats-grid .grade-banner { grid-row: span 2; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stats-grid .grade-banner { grid-column: 1 / -1; grid-row: auto; } }
.stat-value { font-weight: 800; }
.attend-bar-track, .progress-bar-track { background: var(--glass-2); border-radius: 99px; overflow: hidden; height: 8px; }
.attend-bar-fill, .progress-bar-fill { background: var(--grad) !important; border-radius: 99px; position: relative; transition: width 1.4s var(--ease); }
.attend-bar-fill::after, .progress-bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: nvShine 2.4s infinite; }
@keyframes nvShine { to { transform: translateX(100%); } }
.progress-ring-fill { stroke: url(#nvg) !important; }
.unit-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; overflow: visible; }
.unit-card { border-radius: 26px !important; position: relative; overflow: hidden; transition: transform .6s var(--spring) !important; }
.unit-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 0, rgba(255,255,255,.4), transparent 55%); }
.unit-card:hover { transform: translateY(-8px) rotate(-1deg); }
.mistakes-banner { display: flex; align-items: center; gap: 14px; padding: 18px; cursor: pointer; }
.mistakes-banner:hover { transform: translateY(-5px); }
.mistakes-icon-wrap { background: var(--grad-warm); color: #fff; border-radius: 18px; width: 52px; height: 52px; display: grid; place-items: center; }

/* courses */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.course-card { overflow: hidden; cursor: pointer; }
.course-card:hover { transform: translateY(-10px) rotate(-.8deg); }
.course-thumb-placeholder, .mini-course-thumb-ph { position: relative; overflow: hidden; background-size: 200% 200%; animation: nvGradMove 10s ease infinite; }
@keyframes nvGradMove { 50% { background-position: 100% 100%; } }
.filter-chip { border-radius: 99px; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); transition: all .4s var(--spring); cursor: pointer; }
.filter-chip:hover { transform: translateY(-3px); } .filter-chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: scale(1.06); }
.search-bar input { border-radius: 99px; }

/* misc pages */
.todo-item { padding: 14px 16px; margin-bottom: 10px; animation: nvPageIn .6s var(--ease) both; }
.todo-checkbox { border-radius: 8px; transition: all .4s var(--spring); } .todo-checkbox.checked { background: var(--lime); border-color: var(--lime); transform: scale(1.15) rotate(8deg); }
.forum-post { padding: 18px; margin-bottom: 12px; }
.forum-avatar, .sidebar-avatar { background: var(--grad); color: #fff; }
.notif-item { padding: 14px; margin-bottom: 10px; }
.chat-input-bar { background: var(--bg-2); border-top: 1px solid var(--line); }
.sidebar { background: var(--bg-2); } .sidebar-link { border-radius: 16px; transition: .4s var(--ease); } .sidebar-link:hover { transform: translateX(-6px); }
.divider { background: var(--line); }

/* course / unit / lesson */
.cp-hero { border-radius: 34px; background: linear-gradient(135deg, #5b3df5, #18a8ff 70%, #18e0ff); position: relative; overflow: hidden; padding: 26px; box-shadow: 0 30px 70px -26px rgba(91,61,245,.7); }
.cp-hero::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; top: -140px; inset-inline-end: -80px; background: conic-gradient(from var(--ang), rgba(255,255,255,.5), transparent 40%, rgba(204,255,61,.5), transparent 80%); filter: blur(30px); animation: nvSpin 8s linear infinite; }
.cp-hero > * { position: relative; }
.cp-hero h1 { font-weight: 800; font-size: 1.6rem; }
.cp-back { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px !important; background: rgba(255,255,255,.2) !important; color: #fff !important; backdrop-filter: blur(10px); border: 0; padding: 9px 16px; cursor: pointer; transition: .4s var(--spring); font: 600 .85rem var(--f-body); }
.cp-back:hover { transform: translateX(6px); } [dir="ltr"] .cp-back:hover { transform: translateX(-6px); }
.cp-back svg { width: 16px; height: 16px; }
.lp-appbox + * , .cp-back { margin-bottom: 12px; }
.cp-stat { border-radius: 20px; background: rgba(255,255,255,.18); backdrop-filter: blur(8px); }
.cp-prog { background: rgba(255,255,255,.28); } .cp-prog i { background: var(--lime); position: relative; }
.cp-unit { margin-bottom: 14px; overflow: hidden; } .cp-unit-ic { border-radius: 16px; font-family: var(--f-head); box-shadow: 0 10px 26px -10px currentColor; transition: transform .6s var(--spring); }
.cp-unit:hover .cp-unit-ic { transform: rotate(-8deg) scale(1.08); }
.cp-unit-b { display: grid; grid-template-rows: 0fr; padding: 0 10px; transition: grid-template-rows .6s var(--ease), padding .6s var(--ease); } .cp-unit.open .cp-unit-b { grid-template-rows: 1fr; padding: 0 10px 12px; } .cp-unit-b > * { overflow: hidden; min-height: 0; }
.cp-unit-b { display: grid; } .cp-unit:not(.open) .cp-unit-b { display: grid; }
.cp-chev svg { width: 20px; height: 20px; transition: transform .5s var(--spring); } .cp-unit.open .cp-chev svg { transform: rotate(180deg); }
.cp-row { border-radius: 18px; transition: background .3s, transform .4s var(--spring); } .cp-row:hover { transform: translateX(-6px); background: var(--glass-2); } [dir="ltr"] .cp-row:hover { transform: translateX(6px); }
.cp-dot { background: var(--glass-2); color: var(--cy); box-shadow: inset 0 0 0 1px var(--line-2); } .cp-dot svg { width: 15px; height: 15px; }
.cp-row.done .cp-dot { background: var(--lime); color: #101400; }
.cp-tag { background: rgba(255,178,61,.16); color: var(--amber); }
.lp-appbox { border-radius: 30px; position: relative; overflow: hidden; background: linear-gradient(135deg, #1b1250, #5b3df5); }
.lp-appbox::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 0, rgba(24,224,255,.45), transparent 55%); }
.lp-appbox > * { position: relative; z-index: 1; }
.lp-appic svg { animation: nvFloat 3.4s ease-in-out infinite; }
@keyframes nvFloat { 50% { transform: translateY(-10px) rotate(3deg); } }
.lp-title { font-family: var(--f-head); font-weight: 800; }

/* misc helpers */
.nv-i { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { [data-rv], .nv-split .w > span { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; } .nv-atmos i, .nv-grain, .nv-ring::before { animation: none; } }
html.lite .nv-grain, html.lite .nv-atmos i { animation: none; }
html.lite .nv-grain { display: none; }

/* theme change: circular reveal (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: nvVT .9s var(--ease) both; }
@keyframes nvVT { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 0)); } to { clip-path: circle(150% at var(--vx, 50%) var(--vy, 0)); } }
html.noanim *, html.noanim *::before, html.noanim *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; animation-fill-mode: both !important; transition-duration: .001s !important; transition-delay: 0s !important; }
html.noanim .page.active > *, html.noanim .page.active .stagger > *, html.noanim .su-inner, html.noanim .su-slide.active .su-inner > *, html.noanim .au-card, html.noanim .au-card .auth-panel.active > *, html.noanim .nv-nav, html.noanim .quick-actions, html.noanim .home-greeting { animation: none !important; opacity: 1; filter: none; }
.sidebar { position: fixed !important; }
@media (max-width: 760px) { #app-nav .nv-brand, #app-nav .nv-theme { display: none; } #app-nav .nv-links { margin-inline-start: 0; flex: 1; justify-content: space-around; } }
.cp-unit-b > .cp-in { overflow: hidden; min-height: 0; }
.cp-back { display: inline-flex; align-items: center; gap: 8px; } .cp-back svg { width: 16px; height: 16px; transform: scaleX(-1); } [dir="ltr"] .cp-back svg { transform: none; }
.cp-dot svg, .sheet-row svg { width: 18px; height: 18px; }
.sheet-row > span:last-child svg { transform: rotate(90deg); } [dir="ltr"] .sheet-row > span:last-child svg { transform: rotate(-90deg); }
#page-support { padding-top: 84px; } #page-support > div { height: calc(100dvh - 84px) !important; }
.logo-light { display: none !important; } [data-theme="light"] .logo-dark { display: none !important; } [data-theme="light"] .logo-light { display: inline-block !important; }
.nv-pop { animation: nvPageIn .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
html.noanim .nv-pop { animation: none !important; }
.quick-actions, .stats-grid, .subscribed-section { max-width: none !important; }
