:root {
  /* Default Dark Mode (Warm Dark / Liquid Glass) */
  --bg: #07111f;
  --bg-soft: #0a1627;
  --panel: rgba(13, 28, 46, 0.74);
  --panel-strong: rgba(14, 30, 50, 0.94);
  --panel-light: rgba(25, 46, 70, 0.72);
  --line: rgba(152, 190, 220, 0.14);
  --text: #eff8ff;
  --muted: #8da6bc;
  --cyan: #4ce0df;
  --blue: #63a9ff;
  --purple: #9b8cff;
  --green: #6fe5a8;
  --orange: #ffb65b;
  --red: #ff7b72;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  --radius: 18px;
  
  --c-glass: #bbbbbc;
  --c-light: #fff;
  --c-dark: #000;
  --c-content: #eff8ff;
  --c-action: #4ce0df;
  --glass-reflex-dark: 2;
  --glass-reflex-light: 0.3;
  --saturation: 150%;
  
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  /* Day Mode Primary Shades */
  --bg: #f7eae6;
  --bg-soft: #eadfdb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #eadfdb;
  --panel-light: #f7eae6;
  --line: rgba(156, 41, 3, 0.12);
  --text: #390900;
  --muted: #5f1501;
  --cyan: #9c2903;
  --blue: #61c2ff;
  --purple: #731c02;
  --green: #4aff6b;
  --orange: #ffac38;
  --red: #ff6161;
  --shadow: 0 16px 40px rgba(156, 41, 3, 0.06);
  
  --c-glass: #bbbbbc;
  --c-light: #fff;
  --c-dark: #000;
  --c-content: #390900;
  --c-action: #9c2903;
  --glass-reflex-dark: 1;
  --glass-reflex-light: 1;
  --saturation: 150%;
  
  color-scheme: light;
}

:root[data-theme="dim"] {
  /* Dim Mode (Vadik's deep blue theme) */
  --bg: #152433;
  --bg-soft: #0d1a26;
  --panel: rgba(25, 42, 60, 0.74);
  --panel-strong: rgba(28, 48, 68, 0.94);
  --panel-light: rgba(36, 60, 84, 0.72);
  --line: rgba(153, 222, 255, 0.14);
  --text: #d5dbe2;
  --muted: #8fa0b0;
  --accent: #ff48a9;
  --cyan: #ff48a9;
  --blue: #ff48a9;
  --purple: #99deff;
  --green: #6fe5a8;
  --orange: #ffb65b;
  --red: #ff7b72;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  
  --c-light: #99deff;
  --c-dark: #20001b;
  --c-glass: hsl(335, 100%, 74%);
  --c-content: #d5dbe2;
  --c-action: #ff48a9;
  --glass-reflex-dark: 2;
  --glass-reflex-light: 0.7;
  --saturation: 200%;
  
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 70% 10%, rgba(34, 113, 147, 0.12), transparent 30%),
    linear-gradient(130deg, var(--bg) 0%, var(--bg-soft) 100%);
  transition: background 400ms cubic-bezier(1, 0.0, 0.4, 1), color 400ms cubic-bezier(1, 0.0, 0.4, 1);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
}

.ambient-one {
  top: -140px;
  left: 24%;
  background: var(--cyan);
}

.ambient-two {
  right: -120px;
  bottom: -140px;
  background: var(--purple);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(6, 16, 29, 0.86);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
  color: var(--text);
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0.15em;
}

.brand strong {
  font-size: 0.79rem;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.brand b {
  color: var(--cyan);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(76, 224, 223, 0.4);
  border-radius: 12px;
  background: rgba(76, 224, 223, 0.1);
}

.brand-mark span {
  align-self: end;
  border-radius: 3px;
  background: var(--cyan);
}

.brand-mark span:nth-child(1) {
  height: 45%;
}

.brand-mark span:nth-child(2) {
  height: 100%;
}

.brand-mark span:nth-child(3) {
  height: 70%;
}

.main-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(76, 224, 223, 0.22);
  color: var(--text);
  background: rgba(76, 224, 223, 0.09);
}

.nav-item.active .nav-icon {
  color: var(--cyan);
}

.nav-icon {
  width: 18px;
  color: #7290a8;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-progress {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}

.sidebar-progress-row strong {
  color: var(--cyan);
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 240ms ease;
}

.sidebar-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  color: #b8cbd9;
  font-size: 0.69rem;
}

.sidebar-note small {
  margin-top: 3px;
  font-size: 0.62rem;
  line-height: 1.45;
}

.note-dot {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.sidebar-close,
.sidebar-overlay,
.menu-toggle,
.icon-button {
  display: none;
}

.app-shell {
  min-height: 100vh;
  margin-left: 248px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
  padding: 23px clamp(20px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 17, 30, 0.5);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.search-box {
  display: flex;
  width: min(310px, 28vw);
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.76rem;
}

.search-box input::placeholder {
  color: #6f879d;
}

.avatar-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(76, 224, 223, 0.34);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(76, 224, 223, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
}

.page-content {
  padding: clamp(22px, 4vw, 58px);
}

.hero-grid,
.dashboard-grid,
.detail-grid,
.quiz-layout,
.practice-layout {
  display: grid;
  gap: 20px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.hero-card,
.glass-card,
.stat-card,
.part-card,
.theme-card,
.concept-card,
.warning-card,
.quiz-card,
.practice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  min-height: 272px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 90% 10%, rgba(76, 224, 223, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(18, 47, 70, 0.93), rgba(11, 25, 42, 0.9));
}

.hero-card::after {
  position: absolute;
  right: -30px;
  bottom: -55px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(76, 224, 223, 0.25);
  border-radius: 36% 64% 61% 39%;
  content: "";
  transform: rotate(28deg);
}

.kicker,
.section-kicker,
.part-number,
.status-pill,
.tag,
.difficulty,
.result-label {
  color: var(--cyan);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero-card h2 {
  max-width: 720px;
  margin: 16px 0 12px;
  font-size: clamp(2rem, 4.3vw, 4.3rem);
  line-height: 0.99;
  letter-spacing: -0.07em;
}

.hero-card h2 span {
  color: var(--cyan);
}

.hero-card p {
  max-width: 650px;
  margin: 0;
  color: #abc0d2;
  font-size: 0.94rem;
  line-height: 1.7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  transition: 180ms ease;
}

.primary-button {
  border: 1px solid rgba(76, 224, 223, 0.8);
  color: #06222c;
  background: linear-gradient(135deg, var(--cyan), #7ae6c0);
}

.primary-button:hover {
  box-shadow: 0 0 24px rgba(76, 224, 223, 0.28);
  transform: translateY(-1px);
}

.secondary-button,
.ghost-button {
  border: 1px solid rgba(137, 178, 208, 0.2);
  color: #cfe0ed;
  background: rgba(255, 255, 255, 0.04);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: rgba(76, 224, 223, 0.48);
  color: var(--cyan);
  background: rgba(76, 224, 223, 0.08);
}

.ghost-button {
  padding: 8px 11px;
  font-size: 0.69rem;
}

.danger-button {
  border: 1px solid rgba(255, 123, 114, 0.44);
  color: #ffd2cf;
  background: rgba(255, 123, 114, 0.12);
}

.path-card {
  display: flex;
  min-height: 272px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.path-card h3,
.glass-card h3 {
  margin: 9px 0 7px;
  font-size: 1.15rem;
}

.path-card p,
.glass-card p,
.part-card p,
.concept-card p,
.warning-card p,
.practice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.path-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.73rem;
}

.large-progress {
  height: 8px;
  margin-top: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 36px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.9rem;
  letter-spacing: -0.06em;
}

.stat-card em {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 0.66rem;
  font-style: normal;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.section-header h2 {
  margin: 7px 0 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.055em;
}

.section-header p {
  max-width: 610px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.part-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.part-card {
  display: flex;
  min-height: 195px;
  flex-direction: column;
  padding: 18px;
  transition: 180ms ease;
}

.part-card:hover {
  border-color: rgba(76, 224, 223, 0.38);
  background: rgba(18, 42, 64, 0.84);
  transform: translateY(-3px);
}

.part-card-top,
.card-footer,
.quiz-meta,
.progress-row,
.group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.part-card h3 {
  margin: 16px 0 7px;
  font-size: 1rem;
  line-height: 1.2;
}

.part-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-footer {
  margin-top: auto;
  padding-top: 15px;
  color: var(--muted);
  font-size: 0.67rem;
}

.card-footer button {
  border: 0;
  color: var(--cyan);
  background: transparent;
  font-weight: 800;
}

.status-pill {
  padding: 5px 7px;
  border: 1px solid rgba(141, 166, 188, 0.2);
  border-radius: 99px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.status-pill.done,
.status-pill.safe {
  border-color: rgba(111, 229, 168, 0.36);
  color: var(--green);
  background: rgba(111, 229, 168, 0.08);
}

.status-pill.warning {
  border-color: rgba(255, 182, 91, 0.38);
  color: var(--orange);
  background: rgba(255, 182, 91, 0.08);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.filter-panel input,
.filter-panel select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: rgba(5, 15, 27, 0.68);
}

.filter-panel input {
  min-width: min(100%, 280px);
  flex: 1;
  padding: 0 12px;
}

.filter-panel select {
  padding: 0 34px 0 11px;
}

.theme-block {
  margin-bottom: 30px;
}

.theme-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 15px;
}

.theme-heading > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(76, 224, 223, 0.25);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(76, 224, 223, 0.08);
  font-size: 0.73rem;
  font-weight: 800;
}

.theme-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.theme-heading small {
  margin-left: 7px;
  color: var(--cyan);
  font-size: 0.65rem;
}

.theme-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.detail-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(23px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 0%, rgba(99, 169, 255, 0.16), transparent 28%),
    rgba(13, 28, 46, 0.76);
}

.detail-header h2 {
  max-width: 800px;
  margin: 14px 0 9px;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -0.065em;
}

.detail-header p {
  max-width: 760px;
  color: #acc3d4;
  font-size: 0.9rem;
  line-height: 1.7;
}

.detail-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.glass-card {
  padding: 21px;
}

.stack {
  display: grid;
  gap: 12px;
}

.concept-card,
.warning-card {
  position: relative;
  padding: 14px 15px 14px 41px;
  border-radius: 12px;
  box-shadow: none;
}

.concept-card::before,
.warning-card::before {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 0.85rem;
}

.concept-card::before {
  color: var(--cyan);
  content: "✓";
}

.warning-card {
  border-color: rgba(255, 123, 114, 0.19);
  background: rgba(255, 123, 114, 0.045);
}

.warning-card::before {
  color: var(--red);
  content: "!";
}

.code-panel {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(132, 175, 205, 0.17);
  border-radius: 13px;
  background: #07111e;
}

.code-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(132, 175, 205, 0.12);
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.window-dots i:nth-child(2) {
  background: var(--orange);
}

.window-dots i:nth-child(3) {
  background: var(--green);
}

pre {
  margin: 0;
  overflow: auto;
  padding: 17px;
  color: #b9d8ea;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.73rem;
  line-height: 1.65;
  white-space: pre;
}

.quiz-layout,
.practice-layout {
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
}

.quiz-card,
.practice-card {
  padding: clamp(20px, 4vw, 30px);
}

.quiz-card h2,
.practice-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.quiz-card p,
.practice-card p {
  color: #abc0d1;
  line-height: 1.68;
}

.difficulty {
  color: var(--orange);
  letter-spacing: 0.1em;
}

.options-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.option-button {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #c6d6e3;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  transition: 160ms ease;
}

.option-button:hover:not(:disabled) {
  border-color: rgba(76, 224, 223, 0.42);
  background: rgba(76, 224, 223, 0.08);
}

.option-button:disabled {
  cursor: default;
}

.option-button.correct {
  border-color: rgba(111, 229, 168, 0.56);
  color: #d8ffeb;
  background: rgba(111, 229, 168, 0.12);
}

.option-button.incorrect {
  border-color: rgba(255, 123, 114, 0.56);
  color: #ffd8d5;
  background: rgba(255, 123, 114, 0.1);
}

.option-letter {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(141, 166, 188, 0.2);
  border-radius: 7px;
  color: var(--cyan);
  font-size: 0.69rem;
  font-weight: 800;
}

.explanation {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(99, 169, 255, 0.2);
  border-radius: 11px;
  background: rgba(99, 169, 255, 0.07);
}

.explanation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quiz-sidebar .glass-card + .glass-card {
  margin-top: 13px;
}

.quiz-step-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 13px;
}

.quiz-step {
  height: 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
}

.quiz-step.done {
  background: var(--cyan);
}

.quiz-step.current {
  background: var(--orange);
}

.expected-list,
.weak-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.expected-list li,
.weak-list li {
  position: relative;
  padding-left: 20px;
  color: #b8cbd9;
  font-size: 0.78rem;
  line-height: 1.5;
}

.expected-list li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "✓";
}

.practice-snippet {
  margin-top: 18px;
}

.practice-snippet code {
  color: #d5eaf5;
}

.practice-answer-label {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.practice-answer-row {
  display: flex;
  gap: 9px;
  margin-top: 8px;
}

.practice-answer {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 0 13px;
  color: var(--text);
  background: rgba(5, 15, 27, 0.68);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
}

.practice-answer:focus {
  border-color: rgba(76, 224, 223, 0.56);
  box-shadow: 0 0 0 3px rgba(76, 224, 223, 0.08);
}

.practice-options {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.practice-option {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #c6d6e3;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.practice-option:hover,
.practice-option.selected {
  border-color: rgba(76, 224, 223, 0.46);
  background: rgba(76, 224, 223, 0.08);
}

.practice-option.correct {
  border-color: rgba(111, 229, 168, 0.56);
  background: rgba(111, 229, 168, 0.12);
}

.practice-option.incorrect {
  border-color: rgba(255, 123, 114, 0.56);
  background: rgba(255, 123, 114, 0.1);
}

.practice-feedback {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid;
  border-radius: 11px;
}

.practice-feedback strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.76rem;
}

.practice-feedback.correct {
  border-color: rgba(111, 229, 168, 0.34);
  color: #d8ffeb;
  background: rgba(111, 229, 168, 0.08);
}

.practice-feedback.incorrect {
  border-color: rgba(255, 182, 91, 0.34);
  color: #ffdfb4;
  background: rgba(255, 182, 91, 0.07);
}

.practice-feedback p,
.practice-attempts {
  margin: 0;
}

.solution-panel {
  margin-top: 15px;
  padding: 15px;
  border: 1px solid rgba(111, 229, 168, 0.18);
  border-radius: 11px;
  background: rgba(111, 229, 168, 0.06);
}

.solution-panel pre {
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
}

.ftue-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 9, 17, 0.78);
  backdrop-filter: blur(14px);
}

.ftue-modal {
  width: min(720px, 100%);
  overflow: hidden;
  border: 1px solid rgba(76, 224, 223, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(76, 224, 223, 0.14), transparent 34%),
    #0b1a2c;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.ftue-progress,
.ftue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 21px;
}

.ftue-progress {
  border-bottom: 1px solid var(--line);
}

.ftue-skip {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
}

.ftue-skip:hover {
  color: var(--cyan);
}

.ftue-layout {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 15px;
  padding: clamp(23px, 5vw, 42px);
}

.ftue-number {
  color: rgba(76, 224, 223, 0.19);
  font-size: clamp(4rem, 10vw, 6.5rem);
  font-weight: 850;
  line-height: 0.86;
  letter-spacing: -0.12em;
}

.ftue-layout h2 {
  max-width: 540px;
  margin: 10px 0;
  font-size: clamp(1.6rem, 4vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.ftue-layout p {
  margin: 0;
  color: #abc0d1;
  font-size: 0.86rem;
  line-height: 1.7;
}

.ftue-footer {
  border-top: 1px solid var(--line);
}

.ftue-footer .button-row {
  margin-top: 0;
}

.ftue-dots {
  display: flex;
  gap: 6px;
}

.ftue-dots span {
  width: 20px;
  height: 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
}

.ftue-dots span.active {
  background: var(--cyan);
}

.progress-list {
  display: grid;
  gap: 10px;
}

.progress-row,
.group-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.progress-row strong,
.group-row strong {
  font-size: 0.79rem;
}

.progress-row span,
.group-row span {
  color: var(--muted);
  font-size: 0.72rem;
}

.score {
  color: var(--cyan) !important;
  font-weight: 800;
}

.empty-state {
  padding: 36px;
  border: 1px dashed rgba(141, 166, 188, 0.25);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.result-card {
  text-align: center;
}

.result-score {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  margin: 22px auto;
  border: 1px solid rgba(76, 224, 223, 0.46);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(76, 224, 223, 0.09);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.07em;
}

.result-score small {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
  letter-spacing: 0.1em;
}

@media (max-width: 1120px) {
  .part-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .sidebar {
    width: min(290px, 84vw);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-toggle,
  .icon-button {
    display: grid;
    place-items: center;
  }

  .sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 1.4rem;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .app-shell {
    margin-left: 0;
  }

  .menu-toggle,
  .icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
  }

  .hero-grid,
  .detail-grid,
  .quiz-layout,
  .practice-layout {
    grid-template-columns: 1fr;
  }

  .search-box {
    display: none;
    position: absolute;
    top: 84px;
    right: 18px;
    z-index: 5;
    width: min(360px, calc(100vw - 36px));
    background: #0d2034;
  }

  .search-box.open {
    display: flex;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 82px;
  }

  .topbar h1 {
    max-width: 210px;
    font-size: 1.14rem;
  }

  .page-content {
    padding: 18px;
  }

  .part-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
    padding: 23px;
  }

  .hero-card h2 {
    font-size: 2.35rem;
  }

  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }

  .practice-answer-row {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-answer {
    min-height: 46px;
  }

  .ftue-layout {
    grid-template-columns: 1fr;
  }

  .ftue-number {
    font-size: 3.5rem;
  }

  .ftue-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ─── Theme Switcher (Liquid Glass) ─── */
.switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  width: 136px;
  height: 38px;
  margin: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.switcher__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.switcher__option {
  position: relative;
  z-index: 2;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 99px;
}

.switcher__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.switcher__icon {
  width: 18px;
  height: 18px;
  --c: var(--muted);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switcher__option:hover .switcher__icon {
  --c: var(--text);
  transform: scale(1.12);
}

.switcher__input:checked + .switcher__icon {
  --c: var(--text);
  transform: scale(1.08);
}

.switcher__toggle {
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: calc(33.333% - 4px);
  background: var(--panel);
  border-radius: 99px;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--line);
  transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  filter: url(#toggler);
}

.switcher:has(input[value="light"]:checked) .switcher__toggle {
  transform: translateX(0);
}

.switcher:has(input[value="dark"]:checked) .switcher__toggle {
  transform: translateX(100%);
}

.switcher:has(input[value="dim"]:checked) .switcher__toggle {
  transform: translateX(200%);
}

.switcher__filter {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ─── General Liquid Glass Styles ─── */
.liquid-glass {
  position: relative;
  overflow: hidden;
}

.lg-overlay-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.lg-content {
  position: relative;
  z-index: 3;
  width: 100%;
}

.lg-filter-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.glass-box {
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: backdrop-filter 0.3s ease;
}

.glass-box.glass-black {
  background: rgba(9, 9, 11, 0.5);
  box-shadow: inset 0 0 4px rgba(250, 250, 250, 0.5);
}

.glass-box.glass-white {
  background: rgba(250, 250, 250, 0.5);
  box-shadow: inset 0 0 4px rgba(250, 250, 250, 0.5);
}

.glass-box.glass-transparent {
  background: transparent;
  box-shadow: inset 0 0 4px rgba(250, 250, 250, 0.5);
}
