/* ConnectPOS Learning — hypermodern dark space theme */
:root {
  --bg: #06080d;
  --bg-2: #0d1220;
  --surface: rgba(255,255,255,.04);
  --surface-strong: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.10);
  --text: #e6eaf2;
  --muted: #8891a8;
  --violet: #a78bfa;
  --blue: #38bdf8;
  --pink: #f472b6;
  --green: #4ade80;
  --gradient: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  --radius: 14px;
  --radius-lg: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Starfield background ─── */
.bg-stars {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1px 1px at 25% 30%, #fff 50%, transparent 50%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 75% 40%, rgba(255,255,255,.8) 50%, transparent 50%),
    radial-gradient(1px 1px at 10% 90%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,.7) 50%, transparent 50%),
    radial-gradient(2px 2px at 60% 60%, rgba(167,139,250,.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 30% 50%, rgba(56,189,248,.5) 50%, transparent 50%),
    radial-gradient(circle at 30% 30%, rgba(167,139,250,.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(56,189,248,.12) 0%, transparent 50%),
    linear-gradient(180deg, #06080d 0%, #0d1220 100%);
  background-size: 200px 200px, 300px 300px, 250px 250px, 400px 400px, 200px 200px, 500px 500px, 500px 500px, 100% 100%, 100% 100%, 100% 100%;
  animation: drift 160s linear infinite;
}
@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 200px 200px, 300px 300px, 250px 250px, 400px 400px, 200px 200px, 500px 500px, 500px 500px, 0 0, 0 0, 0 0; }
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(6,8,13,.7);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand em { color: var(--violet); font-style: normal; }
.brand.small { font-size: 15px; }
.main-nav { display: flex; gap: 32px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }

/* ─── Hero ─── */
.hero { padding: 100px 0 80px; position: relative; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--muted);
}
.hero .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 30%, #94a3b8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p.sub { font-size: 20px; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }

/* ─── Courses grid ─── */
section.courses { padding: 40px 0 120px; }
.section-hd { margin-bottom: 40px; }
.section-hd h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.section-hd p { color: var(--muted); font-size: 15px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.course-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px;
  text-decoration: none; color: var(--text);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  display: block;
}
.course-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient); opacity: 0;
  transition: opacity .3s;
  z-index: 0;
}
.course-card:hover { transform: translateY(-4px); border-color: rgba(167,139,250,.4); box-shadow: 0 20px 60px -20px rgba(167,139,250,.3); }
.course-card > * { position: relative; z-index: 1; }
.course-icon { font-size: 48px; margin-bottom: 20px; display: inline-block; line-height: 1; }
.course-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.course-subtitle { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.course-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.course-meta .tag { padding: 4px 10px; background: var(--surface-strong); border-radius: 99px; }

/* ─── Course detail ─── */
.course-hero { padding: 80px 0 40px; text-align: center; position: relative; }
.course-hero .icon-big { font-size: 80px; margin-bottom: 24px; display: inline-block; filter: drop-shadow(0 0 40px rgba(167,139,250,.4)); }
.course-hero h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; background: linear-gradient(180deg, #fff 20%, #94a3b8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.course-hero p.sub { font-size: 19px; color: var(--muted); max-width: 680px; margin: 0 auto 24px; }
.course-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.course-stats .stat { padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; font-size: 13px; color: var(--muted); }

.course-about { max-width: 780px; margin: 0 auto; padding: 0 24px 40px; color: var(--muted); font-size: 16px; line-height: 1.8; text-align: center; }

.lesson-list { max-width: 780px; margin: 0 auto; padding: 40px 24px 120px; }
.lesson-list h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 24px; color: var(--muted); }
.lesson-item {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: all .2s;
}
.lesson-item:hover { transform: translateX(4px); background: var(--surface-strong); border-color: rgba(167,139,250,.3); }
.lesson-num {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient); color: #fff;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 24px -8px rgba(167,139,250,.5);
}
.lesson-info { flex: 1; min-width: 0; }
.lesson-title { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.lesson-sub { font-size: 13px; color: var(--muted); }
.lesson-arrow { color: var(--muted); transition: transform .2s; }
.lesson-item:hover .lesson-arrow { transform: translateX(4px); color: var(--violet); }
.lesson-thumb {
  flex-shrink: 0; width: 90px; height: 66px;
  border-radius: 10px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
}
.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lesson-hero-img {
  margin: 0 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  max-height: 480px;
  box-shadow: 0 30px 80px -30px rgba(167,139,250,.4);
  border: 1px solid var(--border);
}
.lesson-hero-img img { width: 100%; height: auto; display: block; }

/* ─── Lesson page ─── */
.lesson-page { max-width: 760px; margin: 0 auto; padding: 80px 24px 120px; }
.lesson-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.lesson-breadcrumb a { color: var(--muted); text-decoration: none; }
.lesson-breadcrumb a:hover { color: var(--text); }
.lesson-page h1 {
  font-size: clamp(34px, 5vw, 48px); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.1; margin-bottom: 10px;
  background: linear-gradient(180deg, #fff 30%, #94a3b8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lesson-page .lesson-subtitel { font-size: 19px; color: var(--muted); margin-bottom: 40px; }
.lesson-page .lead { font-size: 19px; color: var(--text); margin-bottom: 36px; font-weight: 500; }
.lesson-page h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 40px 0 16px; color: #fff; }
.lesson-page h3 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; color: #fff; }
.lesson-page p { margin-bottom: 18px; font-size: 17px; color: var(--text); }
.lesson-page ul, .lesson-page ol { margin: 0 0 24px 24px; color: var(--text); }
.lesson-page li { margin-bottom: 8px; font-size: 17px; }
.lesson-page li strong { color: #fff; }
.lesson-page em { color: var(--violet); font-style: normal; font-weight: 500; }

.fact-box {
  margin: 28px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(167,139,250,.08), rgba(56,189,248,.05));
  border: 1px solid rgba(167,139,250,.2);
  border-radius: var(--radius);
  position: relative;
}
.fact-box::before {
  content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  background: var(--gradient); border-radius: 2px;
}
.fact-box strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--violet); margin-bottom: 6px; }
.fact-box p { font-size: 15px; color: var(--muted); margin: 0; }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); }
.lesson-nav a { flex: 1; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: all .2s; }
.lesson-nav a:hover { background: var(--surface-strong); border-color: rgba(167,139,250,.3); }
.lesson-nav a.prev { text-align: left; }
.lesson-nav a.next { text-align: right; }
.lesson-nav .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.lesson-nav .title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.lesson-nav a.back-to-course { flex: 0 0 auto; text-align: center; color: var(--muted); }
.lesson-nav a.disabled { opacity: .3; pointer-events: none; }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 80px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: var(--text); text-decoration: none; font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: var(--violet); }
.footer-col p { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .main-nav { gap: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .lesson-nav { flex-direction: column; }
}

/* ═══ Course week blocks ═══ */
.week-block { margin: 40px 0; border:1px solid rgba(255,255,255,.08); border-radius:16px; overflow:hidden; background:rgba(10,12,28,.4); }
.week-header { display:flex; gap:20px; align-items:center; padding:24px 28px; background:linear-gradient(135deg, rgba(80,120,255,.12), rgba(180,80,255,.08)); border-bottom:1px solid rgba(255,255,255,.06); }
.week-num { font-size:28px; font-weight:800; color:#9bb0ff; letter-spacing:.5px; white-space:nowrap; }
.week-title { font-size:22px; font-weight:700; color:#e8ecff; }
.week-desc { font-size:14px; color:#9ba3c8; margin-top:4px; }
.week-block .lesson-item { border-radius:0; border:none; border-top:1px solid rgba(255,255,255,.05); margin:0; }
.week-block .lesson-item:first-of-type { border-top:none; }

/* ═══ Interactive widgets ═══ */
.interactive-widget { margin: 48px 0; }
.quiz-widget, .calc-widget {
  background: linear-gradient(135deg, rgba(40,50,120,.3), rgba(20,10,60,.4));
  border:1px solid rgba(120,140,255,.25);
  border-radius:20px; padding:28px;
  box-shadow: 0 8px 40px rgba(40,60,180,.15);
}
.quiz-head, .calc-head { display:flex; gap:16px; align-items:center; margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,.08); }
.quiz-icon, .calc-icon {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#6080ff,#b060ff); color:#fff; font-weight:800; font-size:22px;
}
.quiz-title, .calc-title { font-size:18px; font-weight:700; color:#e8ecff; }
.quiz-sub, .calc-sub { font-size:13px; color:#9ba3c8; margin-top:2px; }

.quiz-q { margin-bottom:24px; padding-bottom:24px; border-bottom:1px dashed rgba(255,255,255,.06); }
.quiz-q:last-of-type { border-bottom:none; }
.quiz-vraag { font-weight:600; color:#e8ecff; margin-bottom:14px; font-size:16px; }
.quiz-opties { display:grid; gap:8px; }
.quiz-opt {
  text-align:left; padding:12px 16px; border-radius:10px;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1);
  color:#c8d0f0; cursor:pointer; font-size:14px;
  transition: all .15s;
}
.quiz-opt:hover:not(:disabled) { background:rgba(96,128,255,.15); border-color:rgba(120,140,255,.5); }
.quiz-opt:disabled { cursor:default; }
.quiz-opt.juist { background:rgba(40,180,100,.2); border-color:rgba(40,220,120,.6); color:#baf0c5; }
.quiz-opt.fout { background:rgba(220,60,60,.15); border-color:rgba(255,80,80,.5); color:#ffb0b0; }
.quiz-uitleg { margin-top:12px; padding:12px 16px; border-radius:10px; background:rgba(96,128,255,.08); border-left:3px solid #6b8bff; font-size:14px; color:#b8c5e8; }
.quiz-score { margin-top:20px; padding:16px; border-radius:12px; background:linear-gradient(135deg,#6080ff,#b060ff); color:#fff; text-align:center; font-size:15px; }

/* Calculator */
.calc-widget label { display:block; margin:16px 0 8px; font-size:13px; color:#9ba3c8; font-weight:600; }
.calc-widget input[type=range] { width:100%; }
.calc-widget input[type=number] {
  width:140px; padding:8px 12px; border-radius:8px;
  background:rgba(0,0,0,.3); border:1px solid rgba(255,255,255,.1); color:#e8ecff; font-size:15px;
}
.calc-speed-display { color:#9bb0ff; font-size:14px; margin:6px 0 0; }
.calc-result { margin-top:20px; padding:20px; border-radius:12px; background:rgba(0,0,0,.25); border:1px solid rgba(120,140,255,.2); }
.calc-result > div { margin:6px 0; color:#e8ecff; }
.calc-factor { margin-top:12px !important; padding-top:12px; border-top:1px dashed rgba(255,255,255,.1); color:#ffcc66 !important; font-size:15px; }

/* Knop-reset voor quiz opties — font inherit en strakke override */
.quiz-widget button.quiz-opt {
  font-family: inherit; font-size: 14px; line-height: 1.5;
  width: 100%; display: block; margin: 0;
  appearance: none; -webkit-appearance: none;
  outline: none;
}
.quiz-widget button.quiz-opt:focus-visible { box-shadow: 0 0 0 2px rgba(120,140,255,.6); }

.lesson-hero-img figcaption {
  margin-top: 8px; text-align: center;
  color: #8a93b8; font-size: 12px; font-style: italic;
  opacity: .8;
}

/* YourCoding logo dark-variant (hotlink + CSS invert) */
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-logo {
  height: 34px; width: auto; display:block;
  filter: brightness(0) invert(1); /* make logo white */
  opacity: .95;
}
.brand.small .brand-logo { height: 24px; }
.brand-sub {
  font-size:13px; font-weight:500; color:#9bb0ff;
  padding:3px 10px; border:1px solid rgba(155,176,255,.3);
  border-radius:999px; letter-spacing:.5px; text-transform:uppercase;
}
.nav-cta {
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(135deg,#6080ff,#b060ff);
  color: #fff !important; font-weight:600;
}
.nav-cta:hover { filter: brightness(1.1); }

/* ═══ Nav layout fix ═══ */
.site-header { position: sticky; top:0; z-index:50; }
.nav-wrap { gap: 16px; flex-wrap: nowrap; padding: 14px 24px; }
.brand { flex: 0 0 auto; min-width: 0; }
.brand-logo { height: 28px; max-width: 160px; object-fit: contain; }
.brand.small .brand-logo { height: 22px; max-width: 120px; }
.main-nav { flex: 1 1 auto; justify-content: flex-end; align-items: center; gap: 20px; flex-wrap: nowrap; }
.main-nav a { white-space: nowrap; }
.nav-cta { padding: 8px 16px; font-size: 13px; }

@media (max-width: 720px) {
  .nav-wrap { padding: 12px 16px; gap: 10px; }
  .brand-logo { height: 22px; max-width: 120px; }
  .brand-sub { font-size: 11px; padding: 2px 8px; }
  .main-nav { gap: 10px; font-size: 12px; }
  .main-nav a:not(.nav-cta) { display: none; } /* hide Cursussen/Over to keep CTA visible */
  .nav-cta { padding: 6px 12px; font-size: 12px; }
}

/* ═══ Account & auth ═══ */
.account-page { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.account-course { margin: 32px 0; padding: 24px; background: rgba(15,20,40,.5); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; }
.account-course-head { display:flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.account-course-head h2 { margin: 0; font-size: 22px; color: #e8ecff; }
.account-progress { color: #9bb0ff; font-size: 14px; font-weight: 600; }
.progress-bar { height: 8px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #6080ff, #b060ff); transition: width .4s; }
.account-lesson-list { display:flex; flex-direction: column; gap: 6px; }
.account-lesson { display:flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.03); text-decoration: none; color: #c8d0f0; font-size: 14px; transition: background .15s; }
.account-lesson:hover { background: rgba(96,128,255,.12); }
.account-lesson.done { color: #baf0c5; }
.account-lesson .check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; flex-shrink: 0; }
.account-lesson.done .check { background: #2abf5f; border-color: #2abf5f; color: #fff; }
.account-lesson .tt { flex: 1; }
.account-lesson .score { color: #ffcc66; font-weight: 600; }

.auth-err { background: rgba(220,60,60,.15); border: 1px solid rgba(255,80,80,.4); padding: 12px 16px; border-radius: 10px; color: #ffb0b0; margin: 20px 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.auth-box { background: rgba(15,20,40,.5); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 28px; }
.auth-box h3 { margin-top: 0; color: #e8ecff; }
.auth-box label { display:block; font-size: 13px; color: #9bb0ff; font-weight: 600; margin: 14px 0 6px; }
.auth-box input { width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); color: #e8ecff; font-size: 15px; font-family: inherit; }
.auth-box input:focus { outline: none; border-color: #6080ff; box-shadow: 0 0 0 3px rgba(96,128,255,.2); }
.auth-box button { margin-top: 20px; width: 100%; padding: 12px; border: none; cursor: pointer; font-size: 15px; }

@media (max-width: 720px) {
  .auth-tabs { grid-template-columns: 1fr; }
}
