/* =========================================================================
   Kod Atölyesi — tasarım dili: shadcn/ui (New York, nötr palet)
   Kabuk: solda kenar çubuğu, sağda yapışkan başlık + içerik.
   Bileşenler: kart (başlık/açıklama/içerik), rozet, ilerleme, buton varyantları,
   istatistik kartları, alan grafiği, etkinlik listesi.
   VS Code penceresi bilinçli olarak kendi koyu temasını korur.
   ========================================================================= */

:root {
  --radius: 0.625rem;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --accent: #f5f5f5;
  --accent-foreground: #171717;
  --secondary: #f5f5f5;
  --secondary-foreground: #171717;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #a3a3a3;
  --destructive: #dc2626;
  --destructive-bg: #fef2f2;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --chart-1: #e76e50;
  --chart-2: #2a9d8f;
  --sidebar: #fafafa;
  --sidebar-border: #e5e5e5;
  --sidebar-accent: #f0f0f0;
  --html: #c2410c;
  --css: #1d4ed8;
  --js: #a16207;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar-w: 16rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #171717;
    --card-foreground: #fafafa;
    --muted: #262626;
    --muted-foreground: #a1a1a1;
    --accent: #262626;
    --accent-foreground: #fafafa;
    --secondary: #262626;
    --secondary-foreground: #fafafa;
    --primary: #e5e5e5;
    --primary-foreground: #171717;
    --border: rgba(255, 255, 255, .1);
    --input: rgba(255, 255, 255, .15);
    --ring: #737373;
    --destructive: #f87171;
    --destructive-bg: rgba(248, 113, 113, .1);
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, .1);
    --chart-1: #f08a6c;
    --chart-2: #3fc1b0;
    --sidebar: #171717;
    --sidebar-border: rgba(255, 255, 255, .1);
    --sidebar-accent: #262626;
    --html: #fb923c;
    --css: #60a5fa;
    --js: #facc15;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
:where(:not(.monaco-editor, .monaco-editor *)) { border-color: var(--border); }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sidebar); color: var(--foreground);
  font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button:not(.monaco-editor *) { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
code:not(.monaco-editor *) { font-family: var(--font-mono); font-size: .86em; background: var(--muted); padding: .1em .35em; border-radius: 4px; }
.ka-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ka-muted { color: var(--muted-foreground); }
.ka-small { font-size: 12px; }
.ka-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ka-stack { display: flex; flex-direction: column; gap: 16px; }
.ka-spacer { flex: 1; }
.ka-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------ Kabuk */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; gap: 8px; padding: 8px;
  background: var(--sidebar); border-right: 1px solid var(--sidebar-border); overflow-y: auto;
  transition: margin-left .2s ease;
}
.shell.collapsed .sidebar { margin-left: calc(-1 * var(--sidebar-w)); }
.sb-brand { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: none; background: none; border-radius: calc(var(--radius) - 2px); text-align: left; }
.sb-brand:hover { background: var(--sidebar-accent); }
.sb-logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: calc(var(--radius) - 2px); background: var(--primary); color: var(--primary-foreground); }
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sb-brand-text strong { font-weight: 600; font-size: 14px; }
.sb-brand-text small { font-size: 12px; color: var(--muted-foreground); }
.sb-group { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.sb-label { padding: 0 8px 6px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.sb-link {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 8px;
  border: none; background: none; border-radius: calc(var(--radius) - 2px); text-align: left; font-size: 14px;
}
.sb-link:hover { background: var(--sidebar-accent); }
.sb-link.ka-active { background: var(--sidebar-accent); font-weight: 500; }
.sb-link .sb-sub { margin-left: auto; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.sb-link .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted-foreground); }
.sb-link .ka-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-empty { padding: 4px 8px; font-size: 13px; color: var(--muted-foreground); }
.sb-foot { margin-top: auto; padding: 8px 0 4px; border-top: 1px solid var(--sidebar-border); }
.levels-mini { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px; border: none; background: none; text-align: left; }
.sb-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); }

.inset { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--background); }
@media (min-width: 768px) {
  .inset { margin: 8px 8px 8px 0; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); min-height: calc(100vh - 16px); overflow: clip; }
  .shell.collapsed .inset { margin-left: 8px; }
}
@media (max-width: 767px) {
  .sidebar { position: fixed; z-index: 50; left: 0; margin-left: calc(-1 * var(--sidebar-w) - 2px); box-shadow: var(--shadow-md); }
  .shell.mobile-open .sidebar { margin-left: 0; }
}

.app-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  height: 64px; padding: 0 16px; background: var(--background); border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) { .app-header { padding: 0 24px; } }
.hdr-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.hdr-title { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.proj-meta { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.proj-meta strong { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-meta span { font-size: 12px; white-space: nowrap; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .hdr-right .hide-sm { display: none; } }

.ka-main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 640px) { .ka-main { padding: 24px; } }

/* ------------------------------------------------ Bileşenler */
.card {
  background: var(--card); color: var(--card-foreground); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 24px; padding: 24px 0; min-width: 0;
}
.card-header { padding: 0 24px; display: flex; flex-direction: column; gap: 6px; }
.card-header.row-between { flex-direction: row; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.2; }
.card-title.lg { font-size: 20px; letter-spacing: -.01em; }
.card-desc { font-size: 14px; color: var(--muted-foreground); }
.card-content { padding: 0 24px; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 36px; padding: 0 16px; border-radius: calc(var(--radius) - 2px); border: 1px solid transparent;
  font-size: 14px; font-weight: 500; background: var(--secondary); color: var(--secondary-foreground);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover:not(:disabled) { background: color-mix(in srgb, var(--secondary) 80%, var(--foreground) 6%); }
.btn.primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 90%, var(--background)); }
.btn.outline { background: var(--background); border-color: var(--input); box-shadow: var(--shadow-sm); }
.btn.outline:hover:not(:disabled) { background: var(--accent); }
.btn.ghost { background: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--accent); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.icon-btn { width: 36px; padding: 0; }
.btn.destructive { color: var(--destructive); }
.btn.destructive:hover:not(:disabled) { background: var(--destructive-bg); }
.btn.destructive-solid { background: var(--destructive); color: #ffffff; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; width: fit-content;
  padding: 2px 8px; border-radius: calc(var(--radius) - 4px); border: 1px solid transparent;
  font-size: 12px; font-weight: 500; line-height: 1.35;
  background: var(--primary); color: var(--primary-foreground);
}
.badge.secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge.outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.ka-lang, .badge.html, .badge.css, .badge.js { background: transparent; color: var(--foreground); border-color: var(--border); }
.badge.ka-lang::before, .badge.html::before, .badge.css::before, .badge.js::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.html::before { background: var(--html); } .badge.css::before { background: var(--css); } .badge.js::before { background: var(--js); }

.ka-progress { position: relative; flex: 1; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 20%, transparent); overflow: hidden; }
.ka-progress > span { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 999px; transition: width .3s; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: var(--radius); background: var(--muted); width: fit-content; max-width: 100%; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 4px 10px; border-radius: calc(var(--radius) - 3px); font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; border: 1px solid transparent; }
.seg input:checked + label { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); border-color: var(--border); }
.seg input:focus-visible + label { outline: 2px solid var(--ring); outline-offset: 1px; }

.ka-alert { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ka-alert.destructive { color: var(--destructive); border-color: color-mix(in srgb, var(--destructive) 40%, transparent); background: var(--destructive-bg); }
.ka-alert.muted-alert { background: var(--muted); color: var(--muted-foreground); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--muted); color: var(--foreground); font-size: 12px; font-weight: 600; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar .ka-icon { width: 15px; height: 15px; }
.avatar.html { color: var(--html); } .avatar.css { color: var(--css); } .avatar.js { color: var(--js); }
.avatar-group { display: flex; align-items: center; gap: 4px; }

/* ------------------------------------------------ Genel bakış */
.home { display: flex; flex-direction: column; gap: 24px; }
.stats { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat .card-header { flex-direction: row; justify-content: space-between; align-items: center; }
.stat .card-title { font-size: 14px; font-weight: 500; }
.stat .ka-icon { width: 20px; height: 20px; color: var(--muted-foreground); }
.stat-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-hint { font-size: 12px; color: var(--muted-foreground); }

.grid-2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.chart { position: relative; min-height: 256px; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 3; }
.chart .tick { fill: var(--muted-foreground); font-size: 12px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.chart .ka-cursor { stroke: var(--border); }
.chart-empty { position: absolute; inset: 0 0 48px 40px; display: grid; place-items: center; text-align: center; color: var(--muted-foreground); font-size: 13px; pointer-events: none; padding: 0 12px; }
.chart-legend { display: flex; justify-content: center; gap: 16px; padding-top: 12px; font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 6px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px;
}
.chart-tip strong { font-weight: 500; }
.chart-tip .ka-r { display: flex; align-items: center; gap: 8px; }
.chart-tip .ka-r i { width: 10px; height: 10px; border-radius: 2px; }
.chart-tip .ka-r b { margin-left: auto; font-weight: 500; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.active-list { display: flex; flex-direction: column; gap: 20px; }
.active-item { display: flex; flex-direction: column; gap: 8px; border: none; background: none; padding: 0; text-align: left; width: 100%; }
.active-item:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.active-item .ka-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.active-item h3 { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-item p { font-size: 12px; color: var(--muted-foreground); }
.active-item .bar-row { display: flex; align-items: center; gap: 12px; }
.active-item .bar-row span:last-child { flex: none; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.active-item .ka-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-foreground); }
.ka-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--muted-foreground); }

.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.activity li { display: flex; align-items: flex-start; gap: 12px; }
.activity .ka-body { min-width: 0; flex: 1; }
.activity .ka-body p:first-child { font-size: 14px; line-height: 1.35; }
.activity .ka-body p:first-child span { color: var(--muted-foreground); }
.activity .ka-body p:last-child { font-size: 12px; color: var(--muted-foreground); }

.tiers { display: flex; flex-direction: column; gap: 24px; }
.tier { display: flex; flex-direction: column; gap: 12px; }
.tier-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tier-head h3 { font-size: 14px; font-weight: 600; }
.tier-head .ka-muted { font-size: 13px; }
.tier.locked .project { opacity: .55; }
.project-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.project { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 16px; }
.project + .project { border-top: 1px solid var(--border); }
.project.recommended { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.project h3 { font-size: 14px; font-weight: 500; grid-column: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project > p { font-size: 13px; color: var(--muted-foreground); grid-column: 1; }
.concepts { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 1; }
.concepts span { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--muted); color: var(--muted-foreground); }
.project .ka-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; grid-column: 1; font-size: 12px; color: var(--muted-foreground); }
.project .ka-now { grid-column: 1; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted-foreground); }
.project .ka-now .ka-progress { max-width: 200px; }
.project .acts { grid-column: 2; grid-row: 1 / span 5; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
@media (max-width: 560px) {
  .project { grid-template-columns: minmax(0, 1fr); }
  .project .acts { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; }
}

.level-grid { display: flex; flex-direction: column; gap: 12px; }
.level-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.level-row .ka-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.level-row .ka-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.level-row .ka-name.html::before { background: var(--html); } .level-row .ka-name.css::before { background: var(--css); } .level-row .ka-name.js::before { background: var(--js); }

/* ------------------------------------------------ Çalışma ekranı */
.work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1100px) { .work { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.ka-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.task-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rich { font-size: 14px; line-height: 1.6; max-width: 72ch; }
.rich ul, .rich ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rich p + p, .rich p + ul, .rich ul + p, .rich p + pre, .rich pre + p { margin-top: 8px; }
.rich pre, pre.code { margin: 0; background: var(--muted); border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); padding: 10px 12px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; }
.rich pre code, pre.code code { background: none; padding: 0; }
.tool { color: var(--muted-foreground); }
.guide { background: var(--muted); border-radius: var(--radius); padding: 12px 14px; }
.guide pre { background: var(--background); }

.feedback { gap: 16px; padding: 20px 24px; }
.feedback h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.verdict { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 4px 10px; border-radius: calc(var(--radius) - 4px); font-weight: 500; font-size: 13px; }
.verdict.ka-pass { background: var(--success-bg); color: var(--success); }
.verdict.fail { background: var(--destructive-bg); color: var(--destructive); }
.issues li { color: var(--destructive); }
.issues li.ka-old { color: var(--muted-foreground); }
.learn { border-left: 2px solid var(--primary); padding-left: 12px; }
.explain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); }
.explain-list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 12px; }
.explain-list li + li { border-top: 1px solid var(--border); }
.explain-list .ka-src { font-family: var(--font-mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.explain-list .ka-what { color: var(--muted-foreground); font-size: 13px; }
.ka-confirm { background: var(--destructive-bg); color: var(--destructive); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.ka-preview { padding-bottom: 0; gap: 16px; overflow: hidden; }
#frame { display: block; width: 100%; height: 360px; border: none; border-top: 1px solid var(--border); background: #ffffff; }
.console { border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; max-height: 150px; overflow: auto; background: var(--muted); }
.console-line { padding: 4px 16px; border-bottom: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; }
.console-line.ka-error { color: var(--destructive); }
.console-empty { padding: 8px 16px; color: var(--muted-foreground); }
.console-empty code { background: var(--background); }
#testFrame { position: absolute; width: 1000px; height: 700px; left: -12000px; top: 0; border: 0; visibility: hidden; }

.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: calc(var(--radius) - 2px); font-size: 14px; color: var(--muted-foreground); }
.steps li .ka-mark { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.steps li.ka-done { color: var(--foreground); }
.steps li.ka-done .ka-mark { color: var(--success); }
.steps li.ka-current { background: var(--accent); color: var(--foreground); font-weight: 500; }
.steps li .ka-lang { font-family: var(--font-mono); font-size: 11px; }
.steps li .ka-lang.html { color: var(--html); } .steps li .ka-lang.css { color: var(--css); } .steps li .ka-lang.js { color: var(--js); }

.spin { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--foreground); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } .sidebar { transition: none; } }

/* ------------------------------------------------ VS Code penceresi (kendi koyu teması) */
.editor-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vsc {
  --vsc-bg: #1e1e1e; --vsc-tabbar: #252526; --vsc-tab: #2d2d2d; --vsc-fg: #cccccc; --vsc-dim: #8b8b8b;
  --vsc-line: #3c3c3c; --vsc-status: #007acc; --vsc-status-fg: #ffffff;
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--vsc-bg); color: var(--vsc-fg); border: 1px solid #2b2b2b; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.vsc-tabs { display: flex; background: var(--vsc-tabbar); overflow-x: auto; scrollbar-width: thin; }
.vsc-tab {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: none; border-right: 1px solid var(--vsc-tabbar); border-top: 2px solid transparent;
  background: var(--vsc-tab); color: var(--vsc-dim); padding: 7px 14px 8px; font-size: 13px; font-family: inherit;
}
.vsc-tab:hover { color: var(--vsc-fg); }
.vsc-tab[aria-selected="true"] { background: var(--vsc-bg); color: #ffffff; }
.vsc-tab[data-lang="html"][aria-selected="true"] { border-top-color: #e44d26; }
.vsc-tab[data-lang="css"][aria-selected="true"] { border-top-color: #42a5f5; }
.vsc-tab[data-lang="js"][aria-selected="true"] { border-top-color: #f1dd35; }
.vsc-tab:focus-visible { outline: 1px solid var(--vsc-status); outline-offset: -1px; }
.ico { font-family: var(--font-mono); font-weight: 700; font-size: 11px; min-width: 16px; text-align: center; }
.ico-html { color: #e44d26; } .ico-css { color: #42a5f5; } .ico-js { color: #f1dd35; }
.task-badge { display: none; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #0e639c; color: #ffffff; }
.vsc-tab.active-step .task-badge { display: inline-block; }
.vsc-crumbs { padding: 3px 14px 4px; font-size: 12px; color: var(--vsc-dim); background: var(--vsc-bg); border-bottom: 1px solid #2b2b2b; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.vsc-body { height: 440px; min-height: 180px; resize: vertical; overflow: hidden; background: var(--vsc-bg); }
.vsc-simple {
  display: block; width: 100%; height: 100%; resize: none; border: none; outline: none; margin: 0;
  padding: 10px 14px; background: var(--vsc-bg); color: #d4d4d4; caret-color: #aeafad;
  font-family: var(--font-mono); font-size: 14px; line-height: 21px; tab-size: 2; white-space: pre; overflow: auto;
}
.vsc-simple:focus-visible { box-shadow: inset 0 0 0 1px var(--vsc-status); }
.vsc-status { display: flex; flex-wrap: wrap; align-items: center; min-height: 24px; padding: 0 4px; background: var(--vsc-status); color: var(--vsc-status-fg); font-size: 12px; }
.sb-item { padding: 3px 8px; border: none; background: none; color: inherit; font: inherit; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb-btn { cursor: pointer; }
.sb-btn:hover { background: rgba(255, 255, 255, .14); }
.sb-btn:focus-visible { outline: 1px solid #ffffff; outline-offset: -2px; }
#sbProblems.has-errors { background: rgba(0, 0, 0, .18); }
.sb-note { white-space: normal; }
.sb-spacer { flex: 1; }
@media (max-width: 560px) { .sb-wide { display: none; } }
.vsc-keys {
  position: absolute; right: 8px; top: 44px; z-index: 30; width: min(360px, calc(100% - 16px)); max-height: calc(100% - 100px); overflow: auto;
  background: #252526; color: var(--vsc-fg); border: 1px solid #454545; border-radius: 6px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font-size: 13px;
}
.vsc-keys h4 { margin: 0 0 8px; font-size: 13px; color: #ffffff; display: flex; justify-content: space-between; align-items: center; }
.vsc-keys .keys-close { border: none; background: none; color: var(--vsc-dim); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.vsc-keys .keys-close:hover { background: rgba(255, 255, 255, .1); color: #ffffff; }
.vsc-keys dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.vsc-keys dt { white-space: nowrap; }
.vsc-keys dd { margin: 0; color: var(--vsc-dim); }
.vsc-keys p { margin: 10px 0 0; font-size: 12px; color: var(--vsc-dim); }
.vsc-keys code { background: #333333; color: #d7ba7d; }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--muted); color: var(--foreground); }
.vsc-keys kbd { border-color: #555555; background: #333333; color: #e0e0e0; }
.editor-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media (max-width: 520px) {
  #frame { height: 280px; }
  .vsc-body { height: 340px; }
  .card { padding: 20px 0; gap: 20px; }
  .card-header, .card-content { padding: 0 16px; }
  .feedback { padding: 16px; }
}
