* {
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --panel: rgba(12, 18, 36, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --soft: rgba(255, 255, 255, 0.072);
  --soft-strong: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(66, 197, 216, 0.34);
  --text: #f2f7ff;
  --muted: #a8b8cc;
  --green: #32d583;
  --cyan: #42c5d8;
  --blue: #5b8cff;
  --yellow: #ffd166;
  --red: #ff6b7a;
  --violet: #d2a8ff;
  --editor-bg: #0d1117;
  --editor-top: #161b22;
  --editor-border: #30363d;
  --editor-line: #6e7681;
  --code-keyword: #ff7b72;
  --code-type: #79c0ff;
  --code-string: #a5d6ff;
  --code-number: #ffa657;
  --code-comment: #8b949e;
  --code-function: #d2a8ff;
  --code-symbol: #7ee787;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.43);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(66, 197, 216, 0.24), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(50, 213, 131, 0.18), transparent 28%),
    radial-gradient(circle at 64% 94%, rgba(91, 140, 255, 0.15), transparent 34%),
    linear-gradient(145deg, #050816 0%, #08111f 52%, #050816 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at top, black, transparent 74%);
}

.page {
  width: min(1280px, 100%);
  margin: auto;
  padding: 38px 42px 72px;
}

.top-actions {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.back,
.learn-btn,
.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-weight: 950;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.back:hover,
.learn-btn:hover,
.start-btn:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

.learn-btn,
.start-btn {
  color: #041013;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border: 0;
  box-shadow: 0 16px 42px rgba(50, 213, 131, 0.18);
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  padding: 46px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(12, 29, 42, 0.82));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero::after,
.panel::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -150px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(66, 197, 216, 0.22), transparent 68%);
}

.hero {
  margin-bottom: 28px;
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0 0 14px;
  padding: 8px 13px;
  border: 1px solid rgba(50, 213, 131, 0.28);
  border-radius: 999px;
  color: #b7ffcf;
  background: rgba(50, 213, 131, 0.1);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0;
  font-size: clamp(48px, 5.2vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

h2,
h3 {
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(27px, 2.1vw, 38px);
}

h3 {
  margin: 20px 0 12px;
  font-size: 24px;
}

.hero p,
.muted,
.card p,
.task-card p,
li {
  color: var(--muted);
  line-height: 1.75;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 890px;
  margin: 22px 0 0;
  font-size: 20px;
}

.grid,
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.card,
.task-card,
.result-box {
  position: relative;
  margin-top: 24px;
  padding: 30px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.086), rgba(255, 255, 255, 0.045)),
    rgba(11, 17, 32, 0.78);
  border: 1px solid var(--border);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.card::before,
.task-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(66, 197, 216, 0.08), transparent 34%);
}

.task-card {
  border-color: rgba(255, 209, 102, 0.28);
}

.tip-card {
  border-color: rgba(50, 213, 131, 0.42);
  background:
    linear-gradient(145deg, rgba(50, 213, 131, 0.11), rgba(66, 197, 216, 0.055)),
    rgba(11, 17, 32, 0.78);
}

code {
  padding: 0.12em 0.34em;
  border-radius: 7px;
  color: #dffcff;
  background: rgba(13, 17, 23, 0.72);
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
}

pre,
.command-box {
  position: relative;
  overflow-x: auto;
  margin: 18px 0 0;
  padding: 20px;
  border-radius: 18px;
  color: #dffcff;
  background:
    linear-gradient(90deg, rgba(121, 192, 255, 0.08), transparent 42%),
    rgba(13, 17, 23, 0.96);
  border: 1px solid rgba(121, 192, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.24);
  line-height: 1.62;
}

pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.vscode-block {
  margin: 22px 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--editor-bg);
  border: 1px solid var(--editor-border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.vscode-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  color: #c9d1d9;
  background: linear-gradient(180deg, #1f2630, var(--editor-top));
  border-bottom: 1px solid var(--editor-border);
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  font-size: 13px;
}

.vscode-dots {
  display: inline-flex;
  gap: 7px;
}

.vscode-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.vscode-dots span:nth-child(1) {
  background: #ff5f56;
}

.vscode-dots span:nth-child(2) {
  background: #ffbd2e;
}

.vscode-dots span:nth-child(3) {
  background: #27c93f;
}

.vscode-lang {
  margin-left: auto;
  color: #8b949e;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vscode-block pre {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(121, 192, 255, 0.08), transparent 42%),
    var(--editor-bg);
  box-shadow: none;
}

.vscode-lines {
  min-width: 28px;
  color: var(--editor-line);
  text-align: right;
  user-select: none;
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  line-height: 1.68;
}

.vscode-code {
  min-width: 0;
  color: #c9d1d9;
  white-space: pre;
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  line-height: 1.68;
}

.tok-keyword {
  color: var(--code-keyword);
}

.tok-type {
  color: var(--code-type);
}

.tok-string {
  color: var(--code-string);
}

.tok-number {
  color: var(--code-number);
}

.tok-comment {
  color: var(--code-comment);
  font-style: italic;
}

.tok-function {
  color: var(--code-function);
}

.tok-symbol {
  color: var(--code-symbol);
}

.code-lab {
  margin-top: 24px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(121, 192, 255, 0.3);
  background: rgba(13, 17, 23, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.code-lab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: #161b22;
  border-bottom: 1px solid var(--editor-border);
}

.code-lab-header strong {
  color: #dffcff;
}

.code-lab-header span {
  color: var(--muted);
  font-size: 13px;
}

.code-lab textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 20px;
  color: #c9d1d9;
  background: var(--editor-bg);
  border: 0;
  outline: 0;
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.65;
}

.code-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 18px;
  border-top: 1px solid var(--editor-border);
}

.code-lab button {
  width: auto;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #041013;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 950;
  cursor: pointer;
}

.code-lab button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.diagnostics {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.diagnostic {
  padding: 13px 15px;
  border-radius: 15px;
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.diagnostic.ok {
  color: #d7ffea;
  background: rgba(50, 213, 131, 0.14);
  border: 1px solid rgba(50, 213, 131, 0.38);
}

.diagnostic.warn {
  color: #fff1bd;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.36);
}

.diagnostic.error {
  color: #ffd8dc;
  background: rgba(255, 107, 122, 0.13);
  border: 1px solid rgba(255, 107, 122, 0.4);
}

.exercise-hint {
  margin-top: 16px;
  padding: 15px;
  border-radius: 18px;
  color: #dffcff;
  background: rgba(66, 197, 216, 0.1);
  border: 1px solid rgba(66, 197, 216, 0.27);
}

.command-box {
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  font-weight: 800;
}

.note {
  color: #d2e1e6;
  padding: 15px 16px;
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
  background: rgba(66, 197, 216, 0.09);
}

.steps,
.roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.steps div,
.roadmap div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(2, 8, 18, 0.48);
  border: 1px solid var(--border);
}

.steps span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-weight: 950;
}

.example-table {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.example-table > div {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 15px;
  border-radius: 16px;
  background: rgba(2, 8, 18, 0.48);
  border: 1px solid var(--border);
}

.example-table > div:first-child {
  border-color: rgba(66, 197, 216, 0.25);
  background: rgba(66, 197, 216, 0.09);
}

.pill {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #bff7ff;
  background: rgba(66, 197, 216, 0.16);
  font-weight: 950;
}

.task-type {
  margin: 0 0 8px;
  color: var(--green);
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

.choice-box {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 15px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(2, 8, 18, 0.52);
  border: 1px solid var(--border);
  cursor: pointer;
}

.choice input {
  margin-top: 3px;
  accent-color: var(--green);
}

button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 15px;
  border: 0;
  border-radius: 17px;
  color: #041013;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#feedback {
  min-height: 28px;
  margin: 18px 0 6px;
  font-size: 19px;
  font-weight: 950;
}

.hidden {
  display: none;
}

ol,
ul {
  padding-left: 24px;
}

li + li {
  margin-top: 6px;
}

@media (min-width: 1180px) {
  .card,
  .task-card,
  .result-box {
    padding: 34px;
  }

  .card:has(.example-table),
  .task-card:has(ol) {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 900px) {
  .page {
    padding: 24px 16px 48px;
  }

  .top-actions {
    position: static;
    flex-direction: column;
    border-radius: 24px;
  }

  .back,
  .learn-btn {
    width: 100%;
  }

  .hero,
  .panel,
  .card,
  .task-card {
    padding: 22px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 64px);
  }

  .hero p {
    font-size: 17px;
  }

  .grid,
  .code-grid,
  .steps,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .example-table > div {
    grid-template-columns: 1fr;
  }

  .code-lab-actions {
    flex-direction: column;
  }

  .code-lab button {
    width: 100%;
  }
}
