* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --green: #1d9e75;
  --blue: #378add;
  --purple: #7f77dd;
  --orange: #d85a30;
  --gold: #ef9f27;
  --dark: #0a1628;
  --darker: #060d1a;
  --surf: #111827;
  --surf2: #1f2937;
  --surf3: #374151;
  --text: #f9fafb;
  --text2: #d1d5db;
  --text3: #9ca3af;
  --bdr: #2d3748;
  --gl: #eaf3de;
  --bl: #e6f1fb;
  --pl: #eeedfe;
  --ol: #faeeda;
  --r: 12px;
  --rs: 8px;
  --rl: 18px;
  --font: "Space Grotesk", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --disp: "Syne", sans-serif;
}
html,
body {
  height: 100%;
  font-family: var(--font);
  background: var(--darker);
  color: var(--text);
  overflow-x: hidden;
}
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--surf);
}
::-webkit-scrollbar-thumb {
  background: var(--green);
  border-radius: 10px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #333;
}

.two-col-table {
  color: #333;
}

.challenge-body {
  color: #333;
}

.code-dots, .code-title-text {
  color: green;
}

.ib-label {
  color: #333;
}

.code-output,
.out-label {
  color: #333;
}

.st {
  color: #333;
}

pre {
  width: 100%;
  padding: 20px 20px;
  border-left: 5px solid green;
  border-radius: 20px;
}
/* ─── PAGES ─────────────────────────────────── */
.page {
  display: none;
  min-height: 100vh;
}
.page.active {
  display: flex;
  flex-direction: column;
}

.key-concept {
  color: var(--green);
}

/* ─── PAGE 1: USER LOGIN ─────────────────────── */
#pg-user {
  background: linear-gradient(135deg, #060d1a 0%, #0c2010 50%, #060d1a 100%);
  align-items: center;
  justify-content: center;
  position: relative;
}
.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(#1d9e75 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.login-card {
  width: 440px;
  max-width: 94vw;
  background: var(--surf);
  border: 1px solid rgba(29, 158, 117, 0.25);
  border-radius: var(--rl);
  padding: 44px 40px;
  box-shadow:
    0 0 80px rgba(29, 158, 117, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.5s ease;
}
.lc-top {
  text-align: center;
  margin-bottom: 32px;
}
.lc-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9e75, #0c4a2a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 14px;
  box-shadow: 0 0 40px rgba(29, 158, 117, 0.35);
}
.lc-top h1 {
  font-family: var(--disp);
  font-size: 26px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.lc-top p {
  color: var(--text3);
  font-size: 13px;
}
.lc-badge {
  display: inline-block;
  background: rgba(29, 158, 117, 0.15);
  border: 1px solid rgba(29, 158, 117, 0.3);
  color: #4ae0b0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.pin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 14px;
}
.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}
.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: transparent;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.pin-dot.on {
  background: var(--green);
  box-shadow: 0 0 10px rgba(29, 158, 117, 0.7);
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pb {
  height: 58px;
  background: var(--surf2);
  border: 1px solid var(--bdr);
  border-radius: var(--rs);
  color: var(--text);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  outline: none;
}
.pb:hover,
.pb:focus {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.04);
}
.pb:active {
  transform: scale(0.96);
}
.pb.sm {
  font-size: 12px;
  color: var(--text3);
}
.pb.sm:hover {
  color: #fff;
}
.pb.zero {
  grid-column: 2;
}
.lc-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--green), #0c8a60);
  border: none;
  border-radius: var(--rs);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.lc-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29, 158, 117, 0.4);
}
.lc-btn:active {
  transform: translateY(0);
}
.lc-err {
  color: #fc8181;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: rgba(252, 129, 129, 0.08);
  border-radius: 6px;
  display: none;
  animation: shake 0.3s;
}
.lc-hint {
  text-align: center;
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.15);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  font-size: 12px;
  color: #4ae0b0;
}
.lc-hint span {
  color: var(--text3);
}
.lc-footer {
  text-align: center;
  margin-top: 16px;
  color: var(--text3);
  font-size: 12px;
}
.lc-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.lc-switch {
  text-align: center;
  margin-top: 12px;
}
.lc-switch button {
  background: none;
  border: 1px solid var(--bdr);
  border-radius: 6px;
  color: var(--text3);
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.lc-switch button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── PAGE 2: ADMIN LOGIN ─────────────────────── */
#pg-admin {
  background: linear-gradient(135deg, #060d1a 0%, #1a1030 100%);
  align-items: center;
  justify-content: center;
  position: relative;
}
.admin-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(#7f77dd 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.admin-login-card {
  width: 480px;
  max-width: 94vw;
  background: var(--surf);
  border: 1px solid rgba(127, 119, 221, 0.25);
  border-radius: var(--rl);
  padding: 0;
  box-shadow:
    0 0 80px rgba(127, 119, 221, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slideUp 0.5s ease;
}
.alc-head {
  background: linear-gradient(135deg, #1a1030, #2d1a5a);
  padding: 32px 36px;
  text-align: center;
}
.alc-icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.alc-head h1 {
  font-family: var(--disp);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.alc-head p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.alc-body {
  padding: 28px 36px;
}
.alc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.alc-tab {
  flex: 1;
  padding: 10px;
  background: var(--surf2);
  border: 1px solid var(--bdr);
  border-radius: var(--rs);
  color: var(--text3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.alc-tab.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.alc-tab-panel {
  display: none;
}
.alc-tab-panel.active {
  display: block;
}
.af {
  margin-bottom: 16px;
}
.af label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.af input {
  width: 100%;
  background: var(--surf2);
  border: 1.5px solid var(--bdr);
  border-radius: var(--rs);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.af input:focus {
  border-color: var(--purple);
}
.af input::placeholder {
  color: var(--surf3);
}
.asave {
  width: 100%;
  padding: 13px;
  background: var(--purple);
  border: none;
  border-radius: var(--rs);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}
.asave:hover {
  opacity: 0.9;
  box-shadow: 0 4px 16px rgba(127, 119, 221, 0.4);
}
.asave.red {
  background: #c53030;
}
.asave.green {
  background: var(--green);
}
.amsg {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
  margin-top: 6px;
}
.amsg.ok {
  background: #eaf3de;
  color: #27500a;
  display: block;
}
.amsg.err {
  background: #fff0f0;
  color: #c53030;
  display: block;
}
.alc-back {
  text-align: center;
  margin-top: 20px;
}
.alc-back button {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s;
}
.alc-back button:hover {
  color: var(--green);
}
.admin-note {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.5;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-stat {
  background: var(--surf2);
  border-radius: var(--rs);
  padding: 14px;
  text-align: center;
  border: 1px solid var(--bdr);
}
.admin-stat .asval {
  font-size: 24px;
  font-weight: 700;
  color: var(--purple);
}
.admin-stat .aslbl {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.admin-divider {
  height: 0.5px;
  background: var(--bdr);
  margin: 16px 0;
}

/* ─── PAGE 3: DASHBOARD ─────────────────────── */
#pg-dash {
  background: #f0f4f8;
  flex-direction: column;
}
.dh {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.dh-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dh-burger {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #4a5568;
  display: none;
  padding: 4px;
}
.dh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dh-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), #0c4a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.dh-logo h2 {
  font-family: var(--disp);
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(90deg, #0c4a2a, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dh-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dh-prog {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dh-prog-bar {
  width: 110px;
  height: 5px;
  background: #edf2f7;
  border-radius: 3px;
  overflow: hidden;
}
.dh-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #4ae0b0);
  border-radius: 3px;
  transition: width 0.5s;
}
.dh-prog-text {
  font-size: 11px;
  color: #718096;
  font-weight: 500;
}
.dh-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #4a5568;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.dh-btn:hover {
  background: #edf2f7;
}
.dh-btn.red:hover {
  background: #fff5f5;
  color: #c53030;
  border-color: #fc8181;
}
.dash-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────── */
.sidebar {
  width: 272px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.sb-search {
  padding: 12px;
}
.sb-search input {
  width: 100%;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #2d3748;
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.sb-search input:focus {
  border-color: var(--green);
}
.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}
.mod-grp {
}
.mod-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  user-select: none;
  transition: background 0.15s;
}
.mod-hdr:hover {
  background: #f7fafc;
}
.mod-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mod-chev {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.25s;
}
.mod-hdr.open .mod-chev {
  transform: rotate(90deg);
}
.mod-lessons {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mod-lessons.open {
  max-height: 1000px;
}
.ll {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 30px;
  cursor: pointer;
  font-size: 13px;
  color: #718096;
  border-left: 3px solid transparent;
  transition: all 0.12s;
  user-select: none;
}
.ll:hover {
  color: #2d3748;
  background: #f7fafc;
}
.ll.active {
  color: #1a202c;
  border-left-color: var(--green);
  background: rgba(29, 158, 117, 0.06);
}
.ll .lchk {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: all 0.2s;
}
.ll.done .lchk {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.ll .lnum {
  font-size: 10px;
  color: #cbd5e0;
  flex-shrink: 0;
  width: 14px;
  font-weight: 600;
}
.ll.done .lnum {
  color: #4ae0b0;
}
.sb-foot {
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
}
.sb-foot p {
  font-size: 11px;
  color: #a0aec0;
  line-height: 1.6;
  text-align: center;
}
.sb-foot a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

/* ─── CONTENT ─────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  background: #f0f4f8;
}

/* ─── HOME VIEW ─────────────────────────────────── */
#v-home {
}
.home-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0c3020 100%);
  padding: 52px 48px;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(29, 158, 117, 0.12) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
}
.hh-content {
  position: relative;
  max-width: 580px;
}
.hh-content h1 {
  font-family: var(--disp);
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.hh-content h1 span {
  background: linear-gradient(90deg, #1d9e75, #4ae0b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hh-content p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.hh-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hh-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 20px;
  text-align: center;
  min-width: 80px;
}
.hh-stat .sv {
  font-size: 26px;
  font-weight: 700;
  color: #1d9e75;
  display: block;
}
.hh-stat .sl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.home-mods {
  padding: 36px 48px;
}
.home-mods h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 20px;
}
.mod-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.mc {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r);
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.mc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mc);
}
.mc:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  border-color: var(--mc);
}
.mc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.mc-ic {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--mc) 12%, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.mc-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--mc);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mc h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 6px;
}
.mc p {
  font-size: 13px;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 14px;
}
.mc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.mc-lcount {
  color: #a0aec0;
}
.mc-done {
  font-weight: 700;
  color: var(--mc);
}
.mc-bar {
  height: 3px;
  background: #edf2f7;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.mc-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--mc);
  transition: width 0.5s;
}

/* ─── LESSON VIEW ─────────────────────────────────── */
#v-lesson {
  display: none;
}
.lv-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.lv-bc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #a0aec0;
  flex-wrap: wrap;
}
.lv-bc .sep {
  color: #e2e8f0;
}
.lv-bc .cur {
  color: #1a202c;
  font-weight: 600;
}
.lv-nav {
  display: flex;
  gap: 8px;
}
.nav-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover {
  background: #edf2f7;
}
.nav-btn.pri {
  background: var(--mc, #1d9e75);
  color: #fff;
  border-color: var(--mc, #1d9e75);
}
.nav-btn.pri:hover {
  opacity: 0.9;
}
.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.lv-body {
  padding: 36px 40px;
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

/* ─── LESSON COMPONENTS ─────────────────────────────────── */
.l-title-block {
  margin-bottom: 28px;
}
.l-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lbadge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.l-title-block h1 {
  font-family: var(--disp);
  font-size: 30px;
  font-weight: 800;
  color: #1a202c;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.l-intro {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.7;
  border-left: 3px solid var(--mc, #1d9e75);
  padding-left: 14px;
  font-style: italic;
}
.lv-body h2 {
  font-size: 19px;
  font-weight: 700;
  color: #1a202c;
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lv-body h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.lv-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #2d3748;
  margin: 20px 0 8px;
}
.lv-body p {
  font-size: 14px;
  color: #2d3748;
  line-height: 1.8;
  margin-bottom: 12px;
}
.lv-body p strong {
  color: #1a202c;
  font-weight: 700;
}
.lv-body ul {
  margin: 0 0 12px 20px;
}
.lv-body ul li {
  font-size: 14px;
  color: #2d3748;
  line-height: 1.75;
  margin-bottom: 4px;
}
.ib {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  border-left: 4px solid;
}
.ib.g {
  background: #eaf3de;
  border-color: #1d9e75;
}
.ib.g .ibl {
  color: #1d9e75;
}
.ib.b {
  background: #e6f1fb;
  border-color: #378add;
}
.ib.b .ibl {
  color: #378add;
}
.ib.p {
  background: #eeedfe;
  border-color: #7f77dd;
}
.ib.p .ibl {
  color: #7f77dd;
}
.ib.o {
  background: #faeeda;
  border-color: #d85a30;
}
.ib.o .ibl {
  color: #d85a30;
}
.ib.gold {
  background: #fff8e6;
  border-color: #ef9f27;
}
.ib.gold .ibl {
  color: #ef9f27;
}
.ibl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.ib p {
  font-size: 13px;
  color: #2d3748;
  margin: 0;
  line-height: 1.7;
}
.kc {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.kc-ic {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.kc .kt {
  font-size: 13px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 3px;
}
.kc p {
  font-size: 13px;
  color: #4a5568;
  margin: 0;
  line-height: 1.6;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.tbl th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #2d3748;
  line-height: 1.6;
  vertical-align: top;
}
.tbl td:first-child {
  font-weight: 600;
  color: #1a202c;
}
.tbl tr:last-child td {
  border-bottom: none;
}
.tbl tr:nth-child(even) td {
  background: #f7fafc;
}
.cbar {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
}
.cbar h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.cbar p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
/* Code */
.code {
  background: #0d1117;
  border-radius: 10px;
  overflow: hidden;
  margin: 14px 0;
}
.code-hdr {
  background: #161b22;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #2d3748;
}
.cdots {
  display: flex;
  gap: 5px;
}
.cdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-fn {
  font-size: 11px;
  color: #8b949e;
  font-weight: 500;
  flex: 1;
}
.ctag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.code-body {
  padding: 18px 20px;
  overflow-x: auto;
}
.code-body pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #e6edf3;
  white-space: pre;
}
.cout {
  background: #060d1a;
  padding: 12px 20px;
  border-top: 1px solid #2d3748;
}
.cout .cl {
  font-size: 10px;
  color: #8b949e;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cout pre {
  font-size: 12px;
  color: #39d353;
  font-family: var(--mono);
  line-height: 1.65;
  white-space: pre-wrap;
}
.kw {
  color: #ff7b72;
}
.fn {
  color: #d2a8ff;
}
.st {
  color: #a5d6ff;
}
.nm {
  color: #79c0ff;
}
.cm {
  color: #8b949e;
}
.vr {
  color: #ffa657;
}
.op {
  color: #e6edf3;
}
.cl2 {
  color: #7ee787;
}
/* Demo */
.demo {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r);
  overflow: hidden;
  margin: 18px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.demo-hd {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-hd .dt {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
.demo-live {
  font-size: 11px;
  background: var(--green);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.demo-bd {
  padding: 18px;
}
.demo-fld {
  margin-bottom: 12px;
}
.demo-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #718096;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
}
.demo-sel,
.demo-ta {
  width: 100%;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
  color: #2d3748;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.demo-sel:focus,
.demo-ta:focus {
  border-color: var(--green);
}
.demo-ta {
  resize: vertical;
  min-height: 80px;
}
.demo-run {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.demo-run:hover {
  background: #188a65;
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.35);
}
.demo-run:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.demo-out {
  background: #0d1117;
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
  min-height: 60px;
}
.demo-out .dol {
  font-size: 10px;
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.demo-out pre {
  font-size: 12.5px;
  color: #9fe1cb;
  font-family: var(--mono);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.dstatus {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
}
.dstatus.ok {
  background: #eaf3de;
  color: #27500a;
}
.dstatus.run {
  background: #e6f1fb;
  color: #0c447c;
}
.dstatus.err {
  background: #fff0f0;
  color: #c53030;
}
/* Challenge */
.chal {
  border: 1.5px solid var(--green);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 28px;
}
.chal-hd {
  background: var(--green);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chal-hd span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.chal-bd {
  padding: 18px;
  background: #fff;
}
.chal-bd h4 {
  font-size: 11px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
}
.chal-bd p {
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 12px;
  line-height: 1.7;
}
.ti {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #2d3748;
  line-height: 1.65;
  align-items: flex-start;
}
.ti::before {
  content: "→";
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.outcome {
  background: #eaf3de;
  border-radius: 8px;
  padding: 12px 14px;
  border: 0.5px solid #97c459;
  margin-top: 12px;
}
.outcome p {
  font-size: 13px;
  color: #27500a;
  margin: 0;
  line-height: 1.65;
}
/* Complete btn */
.comp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  border: none;
  border-radius: var(--rs);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 26px;
  cursor: pointer;
  margin-top: 28px;
  transition: all 0.2s;
}
.comp-btn:hover {
  background: #188a65;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.4);
}
.comp-btn.done {
  background: #718096;
}
/* Footer */
.dash-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 14px 40px;
  text-align: center;
  flex-shrink: 0;
}
.dash-footer p {
  font-size: 12px;
  color: #a0aec0;
}
.dash-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #1a202c;
  border: 1px solid #2d3748;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 300;
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dh-burger {
    display: block;
  }
  .home-hero {
    padding: 28px 20px;
  }
  .hh-content h1 {
    font-size: 26px;
  }
  .home-mods {
    padding: 22px 16px;
  }
  .lv-header {
    padding: 12px 16px;
  }
  .lv-body {
    padding: 20px 16px;
  }
  .lv-body h1 {
    font-size: 22px;
  }
  .dh-prog,
  .dh-btn:not(.red) {
    display: none;
  }
  .dash-footer {
    padding: 12px 16px;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-7px);
  }
  70% {
    transform: translateX(7px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
