:root {
  --bg: #f7f4ff;
  --text: #111827;
  --muted: #5e6a85;
  --card: rgba(255, 255, 255, 0.74);
  --glass: rgba(255, 255, 255, 0.18);
  --border: rgba(124, 58, 237, 0.18);
  --shadow: 0 24px 70px rgba(16, 24, 47, 0.14);
  --primary: #7c3aed;
  --secondary: #a855f7;
  --accent: #22d3ee;
  --footer-one: #29145f;
  --footer-two: #6d28d9;
}
[data-theme="dark"] {
  --bg: #070816;
  --text: #f8fafc;
  --muted: #b7c0d8;
  --card: rgba(16, 24, 47, 0.72);
  --glass: rgba(12, 14, 34, 0.66);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(124, 58, 237, .20), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(168, 85, 247, .20), transparent 32%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.page-shell { overflow: hidden; min-height: 100vh; }
.alert { position: fixed; z-index: 200; top: 105px; right: 22px; max-width: 360px; padding: 14px 16px; border-radius: 16px; color: #fff; box-shadow: var(--shadow); }
.alert-success { background: linear-gradient(135deg, #059669, #10b981); }
.alert-error { background: linear-gradient(135deg, #dc2626, #f43f5e); }
.site-header { position: fixed; top: 18px; left: 0; width: 100%; z-index: 80; padding: 0 24px; }
.navbar { width: min(1180px, 100%); margin: 0 auto; min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 12px 22px; border-radius: 26px; }
.glass-panel { background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: .08em; }
.logo-wrap { position: relative; width: 44px !important; height: 44px !important; max-width: 44px !important; max-height: 44px !important; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; overflow: hidden; }
.site-logo, .brand img.site-logo, .logo-wrap img { width: 44px !important; height: 44px !important; max-width: 44px !important; max-height: 44px !important; object-fit: contain !important; display: block; transition: opacity .3s ease, transform .3s ease, filter .3s ease; }
.logo-dark { position: absolute; inset: 0; opacity: 0; }
.brand-text { font-size: 1.25rem; transition: color .3s ease, text-shadow .3s ease; }
[data-theme="light"] .brand-text { color: #4c1d95; text-shadow: none; }
[data-theme="dark"] .brand-text { color: #ffffff; text-shadow: 0 0 16px rgba(168, 85, 247, .78); }
[data-theme="light"] .logo-light { opacity: 1; }
[data-theme="light"] .logo-dark { opacity: 0; }
[data-theme="dark"] .logo-light { opacity: 0; }
[data-theme="dark"] .logo-dark { opacity: 1; }
.brand:hover .site-logo { transform: scale(1.08) rotate(-3deg); }
.brand:hover .brand-text { color: var(--secondary); }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link, .login-btn, .theme-toggle { border: 0; color: #fff; background: rgba(255,255,255,.10); padding: 12px 15px; border-radius: 16px; cursor: pointer; transition: .25s ease; font-weight: 650; }
[data-theme="light"] .nav-link, [data-theme="light"] .login-btn, [data-theme="light"] .theme-toggle { color: #4c1d95; background: rgba(255,255,255,.78); }
.nav-link:hover, .login-btn:hover, .theme-toggle:hover, .nav-link.is-active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; transform: translateY(-2px); }
.dropdown, .login-wrap { position: relative; }
.dropdown-btn span { margin-left: 5px; }
.dropdown-menu, .login-menu { position: absolute; top: calc(100% + 12px); left: 0; min-width: 245px; padding: 10px; border-radius: 20px; opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98); transition: opacity .22s ease, transform .22s ease, visibility .22s ease; }
[data-theme="light"] .dropdown-menu, [data-theme="light"] .login-menu { background: rgba(255,255,255,.96); color: #1e1b4b; border-color: rgba(124,58,237,.16); box-shadow: 0 20px 50px rgba(16,24,47,.18); }
.login-menu { right: 0; left: auto; min-width: 210px; }
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu, .login-wrap.open .login-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dropdown-menu a, .login-menu a { display: block; color: #fff; padding: 12px 13px; border-radius: 14px; transition: .22s ease; }
[data-theme="light"] .dropdown-menu a, [data-theme="light"] .login-menu a { color: #1e1b4b; }
.dropdown-menu a:hover, .login-menu a:hover { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; transform: translateX(4px); }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; }
.mobile-menu-btn { display: none; background: transparent; border: 0; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 28px; height: 3px; margin: 5px; border-radius: 10px; background: #fff; transition: .25s ease; }
[data-theme="light"] .mobile-menu-btn span { background: #4c1d95; }
.mobile-menu-btn.active span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2){ opacity: 0; }
.mobile-menu-btn.active span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 150px 22px 90px; overflow: hidden; background: linear-gradient(135deg, rgba(14, 28, 66, .72), rgba(64, 25, 111, .72)); }
.hero-bg-slider { position: absolute; inset: 0; z-index: 0; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1); transition: opacity 1.35s ease-in-out; animation: slowZoom 18s infinite linear; }
.hero-bg.active { opacity: 1; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(5, 15, 40, .84), rgba(88, 28, 135, .76)), radial-gradient(circle at top right, rgba(34,211,238,.20), transparent 35%), radial-gradient(circle at bottom left, rgba(168,85,247,.40), transparent 42%); }
.line-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.line-art span { position: absolute; width: 180%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: rotate(-24deg); animation: slideLine 8s linear infinite; }
.line-art span:nth-child(1){ top: 20%; left: -60%; }
.line-art span:nth-child(2){ top: 42%; left: -70%; animation-delay: 1.4s; }
.line-art span:nth-child(3){ top: 64%; left: -55%; animation-delay: 2.7s; }
.line-art span:nth-child(4){ top: 82%; left: -75%; animation-delay: 4s; }
.hero-content { position: relative; z-index: 2; width: min(980px, 100%); text-align: center; color: #fff; padding: 48px 28px; border-radius: 36px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 85px rgba(0,0,0,.28); }
.eyebrow { color: #8ac8ff; text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; font-weight: 800; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(3rem, 8vw, 7.6rem); line-height: .95; letter-spacing: -.06em; }
.hero h1 span { background: linear-gradient(120deg, #8ad8ff, #ffffff, #d38cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h2 { min-height: 52px; font-size: clamp(1.5rem, 3vw, 2.45rem); margin: 0; }
.cursor { animation: blink .8s infinite; color: #d8b4fe; }
.hero-description { width: min(760px, 100%); margin: 24px auto 0; color: rgba(255,255,255,.86); font-size: 1.08rem; line-height: 1.8; }
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 17px; font-weight: 800; transition: .25s ease; border: 0; cursor: pointer; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 18px 40px rgba(124,58,237,.32); }
.btn-secondary { color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); }
.btn:hover { transform: translateY(-4px); filter: saturate(1.12); }
.section { padding: 105px 22px 40px; }
.section-heading { text-align: center; width: min(780px, 100%); margin: 0 auto 42px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 10px 0 0; letter-spacing: -.04em; }
.section-heading p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.cards-grid { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { position: relative; min-height: 315px; padding: 30px; border-radius: 32px; overflow: hidden; color: #fff; isolation: isolate; box-shadow: 0 24px 60px rgba(16, 24, 47, .18); transition: .35s ease; }
.feature-card::before { content: ''; position: absolute; inset: -70px; background: radial-gradient(circle, rgba(255,255,255,.34), transparent 34%); translate: -38% -38%; transition: .5s ease; z-index: -1; }
.feature-card:hover { transform: translateY(-10px) rotateX(4deg); }
.feature-card:hover::before { translate: 10% 10%; }
.blue-card { background: linear-gradient(135deg, #1d4ed8, #00a3ff); }
.purple-card { background: linear-gradient(135deg, #5b21b6, #d946ef); }
.cyan-card { background: linear-gradient(135deg, #0f766e, #38bdf8); }
.emerald-card { background: linear-gradient(135deg, #047857, #34d399); }
.orange-card { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.card-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 24px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); font-weight: 900; margin-bottom: 22px; }
.feature-card h3 { font-size: 1.55rem; margin: 0 0 12px; }
.feature-card p { line-height: 1.75; color: rgba(255,255,255,.86); margin-bottom: 30px; }
.card-link { font-weight: 900; }
.card-link span { display: inline-block; transition: .25s ease; }
.card-link:hover span { transform: translateX(6px); }
.cta-section { padding: 80px 22px 110px; }
.cta-card { width: min(980px, 100%); margin: 0 auto; text-align: center; border-radius: 36px; padding: 55px 28px; background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(168,85,247,.18)); }
.cta-card h2 { font-size: clamp(2rem, 5vw, 3.8rem); margin: 0 0 15px; letter-spacing: -.05em; }
.cta-card p { color: var(--muted); font-size: 1.08rem; margin-bottom: 28px; }
.page-hero { position: relative; min-height: 58vh; display: grid; place-items: center; padding: 150px 22px 80px; overflow: hidden; background: linear-gradient(135deg, rgba(124,58,237,.24), rgba(34,211,238,.12)); }
.page-hero-inner { width: min(900px,100%); text-align: center; padding: 44px 28px; border-radius: 34px; }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); margin: 8px 0 14px; }
.page-hero p:not(.eyebrow) { color: var(--muted); line-height: 1.8; }
.placeholder-section { padding: 60px 22px 110px; }
.placeholder-box { width: min(900px,100%); margin: 0 auto; padding: 34px; border-radius: 28px; }
.placeholder-box label { display: grid; gap: 8px; color: var(--muted); margin-bottom: 16px; }
.auth-section { min-height: 100vh; padding: 145px 22px 80px; display: grid; place-items: center; }
.auth-card { width: min(520px,100%); padding: 36px; border-radius: 30px; }
.auth-card h1 { font-size: 2.4rem; margin: 8px 0 12px; }
.auth-card p { color: var(--muted); }
.auth-form, .auth-socials { display: grid; gap: 14px; margin-top: 20px; }
.auth-form label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
.auth-links a { color: var(--secondary); font-weight: 800; }
.small-note { font-size: .9rem; }
input, textarea, select { width: 100%; border: 1px solid var(--border); outline: 0; border-radius: 12px; background: var(--card); color: var(--text); padding: 14px 15px; transition: .22s ease; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(168,85,247,.16), 0 0 20px rgba(34,211,238,.18); }
.site-footer { padding: 58px 28px 44px; background: linear-gradient(135deg, var(--footer-one), #4c1d95 45%, var(--footer-two)); color: #fff; }
.footer-grid { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1.25fr .85fr 1.15fr 1.15fr 1.1fr; gap: 42px; }
.site-footer h2 { color: #d8b4fe; letter-spacing: .06em; }
.site-footer h3 { color: #c4b5fd; margin-top: 0; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.86); line-height: 1.75; }
.site-footer a { display: block; margin: 11px 0; transition: .25s ease; }
.site-footer a:hover { color: #fff; transform: translateX(5px); text-shadow: 0 0 12px rgba(255,255,255,.45); }
.footer-form { display: grid; gap: 10px; }
.footer-form input, .footer-form textarea { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.12); color: #fff; }
.footer-form input::placeholder, .footer-form textarea::placeholder { color: rgba(255,255,255,.58); }
.footer-form button { border: 0; color: #fff; padding: 13px 18px; border-radius: 12px; cursor: pointer; background: linear-gradient(135deg, #7c3aed, #a855f7); transition: transform .25s ease, box-shadow .25s ease; }
.footer-form button:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(124,58,237,.35); }
.footer-form button.is-submitting { animation: pulseSubmit .9s ease infinite; }
.site-footer hr { width: min(1180px,100%); border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 46px auto 28px; }
.copyright { text-align: center; color: rgba(255,255,255,.72) !important; }
.admin-nav-btn { background: linear-gradient(135deg, rgba(124,58,237,.92), rgba(34,211,238,.78)) !important; color: #fff !important; box-shadow: 0 14px 30px rgba(124,58,237,.25); }
.admin-nav-btn:hover { box-shadow: 0 18px 38px rgba(34,211,238,.30); }
.ad-slot { width: min(1120px, calc(100% - 44px)); min-height: 96px; margin: 24px auto; border: 1px dashed rgba(168,85,247,.45); border-radius: 22px; background: linear-gradient(135deg, rgba(124,58,237,.09), rgba(34,211,238,.07)); display: grid; place-items: center; text-align: center; padding: 18px; color: var(--muted); }
.ad-slot span { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--secondary); font-weight: 900; }
.ad-slot strong { color: var(--text); }
.ad-slot small { color: var(--muted); }
.content-with-ad { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; width: min(1180px, calc(100% - 44px)); margin: 0 auto; align-items: start; }
.sidebar-ad-stack { display: grid; gap: 16px; position: sticky; top: 110px; }
.sidebar-ad-stack .ad-slot { width: 100%; min-height: 250px; margin: 0; }
@media (max-width: 980px) { .content-with-ad { grid-template-columns: 1fr; } .sidebar-ad-stack { position: static; } }
.tool-page-section, .course-layout-section { padding: 60px 0 110px; }
.tool-main-panel, .course-shell { padding: 28px; border-radius: 30px; }
.tool-topbar { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.tool-topbar h2 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.tool-topbar p { margin: 0; color: var(--muted); }
.tool-workspace { display: grid; gap: 16px; }
.tool-workspace label { display: grid; gap: 9px; color: var(--muted); font-weight: 800; }
.tool-workspace textarea { min-height: 150px; }
.tool-action-row, .lesson-nav-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 18px; }
.tool-info-grid article, .lesson-block { padding: 20px; border-radius: 20px; background: rgba(124,58,237,.08); border: 1px solid var(--border); }
.tool-info-grid h3, .lesson-block h3 { margin-top: 0; }
.tool-info-grid p, .lesson-block p { color: var(--muted); line-height: 1.75; }
.course-shell { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.lesson-sidebar { position: sticky; top: 115px; display: grid; gap: 10px; }
.lesson-sidebar h2 { margin: 0 0 10px; }
.lesson-link { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); transition: .22s ease; }
.lesson-link span { font-weight: 900; }
.lesson-link small { color: var(--muted); }
.lesson-link:hover, .lesson-link.active { background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(34,211,238,.12)); transform: translateX(4px); }
.lesson-content { min-height: 620px; }
.lesson-content h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 6px 0 12px; }
.lesson-content p { color: var(--muted); line-height: 1.85; }
@media (max-width: 980px) { .course-shell, .tool-info-grid { grid-template-columns: 1fr; } .lesson-sidebar { position: static; } .tool-topbar { align-items: flex-start; flex-direction: column; } }

/* v1.4 professional dark-only refinements */
:root,
[data-theme="dark"] {
  --bg: #070816;
  --text: #f8fafc;
  --muted: #aeb8d4;
  --card: rgba(16, 24, 47, 0.72);
  --glass: rgba(12, 14, 34, 0.70);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}
body { font-size: 15px; }
.navbar { min-height: 66px; padding: 9px 14px 9px 18px; }
.brand { font-weight: 800; letter-spacing: .055em; }
.brand-text { font-size: 1.08rem; }
.nav-menu { gap: 6px; }
.nav-link, .login-btn { padding: 10px 13px; font-size: .92rem; font-weight: 600; }
.logo-wrap { width: 40px !important; height: 40px !important; flex-basis: 40px; }
.site-logo, .brand img.site-logo, .logo-wrap img { width: 40px !important; height: 40px !important; }
.logo-light { opacity: 0 !important; }
.logo-dark { opacity: 1 !important; }
.hero { min-height: 92vh; padding: 130px 22px 78px; }
.hero-content { width: min(880px, 100%); padding: 36px 26px; border-radius: 28px; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .11em; }
.hero h1 { font-size: clamp(2.45rem, 6.5vw, 5.6rem); letter-spacing: -.045em; }
.hero h2 { min-height: 42px; font-size: clamp(1.2rem, 2.35vw, 1.9rem); font-weight: 650; }
.hero-description { font-size: .98rem; line-height: 1.72; width: min(700px,100%); }
.btn { min-height: 46px; padding: 0 19px; border-radius: 14px; font-weight: 700; font-size: .94rem; }
.btn:hover { transform: translateY(-2px); }
.section { padding: 88px 22px 34px; }
.section-heading { margin-bottom: 34px; }
.section-heading h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -.03em; font-weight: 750; }
.page-hero { min-height: 46vh; padding: 125px 22px 64px; }
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3.8rem); font-weight: 760; }
.auth-card h1 { font-size: 2rem; }
input, textarea, select { padding: 12px 13px; font-size: .94rem; }
.admin-nav-btn { display: none !important; }
@media (max-width: 940px) { .nav-menu { top: calc(100% + 10px); } }
