:root {
  --bg: #0b0507;
  --surface: #140c10;
  --surface-2: #1c1317;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3eaee;
  --muted: rgba(243, 234, 238, 0.62);
  --faint: rgba(243, 234, 238, 0.4);
  --brand: #ff00ff;
  --brand-soft: rgba(255, 0, 255, 0.12);
  --ok: #3ddc97;
  --warn: #ffb547;
  --bad: #ff5d6c;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 64px; }
.wrap.wide { max-width: 1080px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #0b0507; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.brand small { color: var(--muted); font-weight: 500; }

h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1.12; letter-spacing: -0.03em; margin: 28px 0 10px; font-weight: 750; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -0.01em; font-weight: 650; }
p.lead { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.card.accent { border-color: rgba(255, 0, 255, 0.35); background: linear-gradient(180deg, var(--brand-soft), transparent 70%), var(--surface); }

.points { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.points li { display: flex; gap: 10px; color: var(--muted); }
.points li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--brand); }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
input, textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 11px 12px; outline: none; transition: border-color 0.15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
.hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
.row { display: grid; gap: 12px; }
@media (min-width: 640px) { .row.two { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2);
  cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #0b0507; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); border-color: rgba(61, 220, 151, 0.35); }
.badge.warn { color: var(--warn); border-color: rgba(255, 181, 71, 0.35); }
.badge.bad { color: var(--bad); border-color: rgba(255, 93, 108, 0.35); }
.badge.brand { color: var(--brand); border-color: rgba(255, 0, 255, 0.4); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); }

.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.item { background: var(--surface); padding: 12px 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; text-align: left; border: 0; width: 100%; }
.item:hover { background: var(--surface-2); }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { color: var(--faint); font-size: 12px; white-space: nowrap; }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.user { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.bubble.assistant { align-self: flex-end; background: var(--brand-soft); border: 1px solid rgba(255, 0, 255, 0.25); border-bottom-right-radius: 4px; }
.bubble.owner { align-self: flex-end; background: rgba(61, 220, 151, 0.1); border: 1px solid rgba(61, 220, 151, 0.25); border-bottom-right-radius: 4px; }
.bubble small { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }

.qr { display: grid; place-items: center; background: #fff; border-radius: 12px; padding: 12px; max-width: 280px; margin: 12px auto; }
.qr img { width: 100%; height: auto; display: block; }
.code { font: 700 28px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-align: center; padding: 14px; border: 1px dashed rgba(255, 0, 255, 0.5); border-radius: 12px; margin: 12px 0; }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin: 4px 0; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 18px 0 4px; padding-bottom: 2px; }
.tab { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tab.on { color: var(--text); border-color: var(--brand); background: var(--brand-soft); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.scroll-x { overflow-x: auto; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle { position: relative; width: 50px; height: 30px; flex: 0 0 50px; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); transition: 0.15s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: 0.15s; }
.toggle input:checked + span { background: var(--brand); border-color: var(--brand); }
.toggle input:checked + span::after { transform: translateX(20px); background: #0b0507; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }
.toast.bad { border-color: var(--bad); }
.hidden { display: none !important; }
.back { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; margin-bottom: 10px; font-weight: 600; }
pre.doc { white-space: pre-wrap; max-height: 50vh; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; }

/* ---------- Cevapmatik ---------- */
.brand { text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.linkbtn:hover { color: var(--text); }

/* Ana sayfa */
.howto { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.howto li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255, 0, 255, 0.45); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.howto b { display: block; font-weight: 650; }
.howto span { color: var(--muted); font-size: 14px; }
.section-t { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; margin: 36px 0 14px; }
.foot { margin-top: 40px; font-size: 12px; color: var(--faint); }

/* Adım göstergesi */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.stepper button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--faint); font-size: 12px; font-weight: 600; min-width: 0; }
.stepper button::before { content: ""; display: block; height: 3px; border-radius: 3px; background: var(--line-strong); margin-bottom: 7px; }
.stepper button.done { color: var(--muted); }
.stepper button.done::before { background: rgba(255, 0, 255, 0.45); }
.stepper button.on { color: var(--text); }
.stepper button.on::before { background: var(--brand); }
.stepper span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stephead { display: flex; justify-content: space-between; align-items: center; min-height: 32px; margin-top: 10px; }
.stephead h1 { margin: 0; }
.view h1 { margin-top: 14px; }

/* Eğitim */
.ex { padding: 18px 0; border-top: 1px solid var(--line); }
.ex:first-child { border-top: 0; padding-top: 4px; }
.ex-label { font-size: 12px; color: var(--faint); font-weight: 600; margin-bottom: 8px; }
.ex .bubble { width: fit-content; }
.ex label { margin-top: 12px; }
.ex textarea { min-height: 76px; }
.ex.filled .ex-label { color: var(--brand); }
.bar { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); margin: 8px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.bar .count { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.bar .count b { color: var(--text); }
.notice { border: 1px solid rgba(255, 93, 108, 0.4); color: var(--text); background: rgba(255, 93, 108, 0.08); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.spin { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Üslup */
.style-text { min-height: 300px; line-height: 1.6; font-size: 15px; }

/* Dene */
.tester { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tester .chat { min-height: 280px; max-height: 55vh; padding: 14px 12px; }
.tester .empty { margin: auto; text-align: center; color: var(--faint); font-size: 14px; padding: 0 20px; }
.bubble .warn-note { color: var(--warn); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; scrollbar-width: none; border-top: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: rgba(255, 0, 255, 0.5); }
.composer { display: flex; gap: 8px; padding: 10px 12px 12px; }
.composer input { flex: 1; min-width: 0; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spin, .typing i { animation: none; } }
