/* notes.cikmazayinsoncarsambasi.xyz — monokrom dark arayüz */

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-soft: #0d0d0f;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, .68);
  --text-3: rgba(255, 255, 255, .50);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .24);
  --hover: rgba(255, 255, 255, .05);
  --active: rgba(255, 255, 255, .09);
  --radius: 3px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .28s;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(255, 255, 255, .055), transparent 70%),
    radial-gradient(700px 320px at 92% 108%, rgba(255, 255, 255, .025), transparent 70%);
}

::selection { background: rgba(255, 255, 255, .18); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.wrap--narrow { max-width: 860px; }

/* ── header ─────────────────────────────────────────────── */
header { padding: 30px 0 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.brand:hover { color: var(--text-2); }
.brand::before { content: ""; width: 6px; height: 6px; background: var(--text); display: inline-block; }
.brand span { color: var(--text-3); }
.brand b { font-weight: 500; color: var(--text-2); letter-spacing: .18em; }

/* ── tipografi ──────────────────────────────────────────── */
.eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
}

h1.display {
  margin: 0;
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

main { flex: 1; padding: 64px 0 96px; }
main.tight { padding: 40px 0 64px; }

/* ── giriş animasyonu ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.rise { animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ── form ───────────────────────────────────────────────── */
.editor-shell {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .008));
  transition: border-color var(--dur) var(--ease);
}
.editor-shell:focus-within { border-color: var(--line-strong); }

.title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: background var(--dur) var(--ease);
}
.title-input::placeholder { color: var(--text-3); }
.title-input:focus { background: rgba(255, 255, 255, .02); }

textarea.code-input {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 16px;
  outline: none;
  tab-size: 2;
}
textarea.code-input::placeholder { color: var(--text-3); }

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-wrap: wrap;
}
.counter.warn { color: #fff; }

/* ── secenekler ─────────────────────────────────────────── */
.options {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.opt { background: var(--bg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.opt label.opt-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.opt .opt-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--text-2); font-size: 13px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track {
  width: 34px; height: 18px; border: 1px solid var(--line-strong);
  display: inline-block; position: relative; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.toggle .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  background: var(--text-3); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.toggle input:checked + .track { background: var(--text); border-color: var(--text); }
.toggle input:checked + .track::after { transform: translateX(16px); background: var(--bg); }
.toggle input:focus-visible + .track { outline: 1px solid var(--text-2); outline-offset: 3px; }

/* select & input */
select.field, input.field {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 9px 10px;
  outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  appearance: none;
}
select.field {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
select.field:focus, input.field:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, .03); }
input.field:disabled, select.field:disabled {
  opacity: .38;
  cursor: not-allowed;
  background-image: none;
  border-style: dashed;
}
select.field option { background: #0d0d0f; color: var(--text); }

/* ── butonlar ───────────────────────────────────────────── */
.actions { margin-top: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--text);
  background: var(--text);
  color: #0a0a0b;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 13px 22px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-100%);
  opacity: 0;
}
.btn:hover::after { animation: sweep .8s var(--ease); opacity: .5; }

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--line-strong);
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-2); background: var(--hover); }

.btn--small { padding: 9px 14px; font-size: 10px; }

/* ── son notlar (localStorage) ──────────────────────────── */
.recent { margin-top: 56px; }
.section-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-head h2 {
  margin: 0;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--text-2);
}
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.recent-list { display: flex; flex-direction: column; }
.recent-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text-2);
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease), background var(--dur) var(--ease);
}
.recent-item:hover { color: var(--text); padding-left: 8px; background: var(--hover); }
.recent-item .r-title { flex: 1; font-size: 14px; }
.recent-item .r-lang, .recent-item .r-time {
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3);
}
.empty { padding: 18px 2px; color: var(--text-3); font-size: 13px; }

/* ── görüntüleyici ──────────────────────────────────────── */
.view-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.view-title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 500; letter-spacing: -0.02em; word-break: break-word; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--line); padding: 4px 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip--alive::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text); animation: pulseDot 2.4s ease-in-out infinite; }
.chip--warn { color: var(--text); border-color: var(--line-strong); }

.view-tools { display: flex; gap: 8px; align-items: center; }

.note-body { margin-top: 22px; }
pre.code-block {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: auto;
  max-height: 70vh;
  counter-reset: line;
}
pre.code-block code {
  display: block;
  padding: 18px 20px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.8px;
  line-height: 1.72;
  white-space: pre;
  color: #e8e8e8;
  tab-size: 2;
}

/* monokrom syntax renkleri */
.hljs { color: #e9e9e9; background: transparent; }
.hljs-comment, .hljs-quote { color: #6f6f6f; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-doctag, .hljs-type { color: #ffffff; font-weight: 600; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { color: #b9b9b9; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-built_in, .hljs-quote { color: #d4d4d4; }
.hljs-title, .hljs-title.function_, .hljs-name { color: #ffffff; }
.hljs-variable, .hljs-template-variable, .hljs-params { color: #cfcfcf; }
.hljs-built_in, .hljs-class .hljs-title { color: #dedede; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
.hljs-deletion { color: #8a8a8a; text-decoration: line-through; }
.hljs-meta { color: #8f8f8f; }
.hljs-attr, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: #c9c9c9; }
.hljs-link { text-decoration: underline; color: #fff; }
.hljs-tag { color: #a8a8a8; }

/* markdown cikti */
.md {
  font-size: 15px; line-height: 1.75; color: rgba(255, 255, 255, .86);
  animation: fadeIn .4s var(--ease) both;
}
.md > *:first-child { margin-top: 0; }
.md h1, .md h2, .md h3 { letter-spacing: -0.02em; line-height: 1.25; margin: 1.6em 0 .6em; font-weight: 500; }
.md h1 { font-size: 1.7em; }
.md h2 { font-size: 1.35em; }
.md h3 { font-size: 1.12em; }
.md p { margin: 0 0 1em; }
.md a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.md a:hover { text-decoration-color: #fff; }
.md code { font-family: 'Geist Mono', monospace; font-size: .88em; background: rgba(255,255,255,.07); padding: .14em .4em; }
.md pre { border: 1px solid var(--line); background: var(--bg-soft); overflow: auto; padding: 14px 16px; }
.md pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.7; display: block; }
.md blockquote { margin: 0 0 1em; padding-left: 14px; border-left: 2px solid var(--line-strong); color: var(--text-2); }
.md ul, .md ol { margin: 0 0 1em; padding-left: 1.4em; }
.md li { margin: .3em 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.md table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .92em; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.md th { background: rgba(255,255,255,.04); font-weight: 500; }
.md img { max-width: 100%; }

/* sifre kapisi */
.gate {
  margin-top: 22px; border: 1px solid var(--line); padding: 26px;
  display: flex; flex-direction: column; gap: 14px; background: rgba(255, 255, 255, .015);
}
.gate h3 { margin: 0; font-size: 15px; font-weight: 500; }
.gate p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.gate .row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate .row input { flex: 1; min-width: 180px; }
.gate.error { animation: shake .4s var(--ease); border-color: rgba(255, 255, 255, .35); }

/* yok edildi */
.burned {
  margin-top: 22px; border: 1px solid var(--line-strong); padding: 26px; text-align: center;
  animation: fadeUp .5s var(--ease) both;
}
.burned .big { font-size: 15px; margin: 0 0 6px; }
.burned .sub { margin: 0; color: var(--text-3); font-size: 13px; }

/* toast */
.toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast {
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: #101012; color: var(--text);
  padding: 10px 14px; animation: fadeUp .3s var(--ease) both;
}
.toast.out { animation: fadeIn .25s var(--ease) reverse both; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 18px 0 26px; margin-top: auto; }
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
footer a { color: var(--text-3); text-decoration: none; transition: color var(--dur) var(--ease); }
footer a:hover { color: var(--text-2); }

/* yukleniyor */
.skeleton {
  height: 120px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,255,255,.02), rgba(255,255,255,.05), rgba(255,255,255,.02));
  background-size: 200% 100%; animation: sweepBg 1.4s linear infinite;
}
@keyframes sweepBg { from { background-position: -200% 0; } to { background-position: 200% 0; } }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  main { padding: 44px 0 72px; }
  textarea.code-input { min-height: 260px; font-size: 12.5px; }
  .view-head { flex-direction: column; }
}


/* ── özel açılır menü (native select popup'ı yerine) ───────────────────── */
.sel-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.sel { position: relative; display: inline-block; width: 100%; }
.sel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.sel-btn:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .03); }
.sel-btn:focus-visible { outline: 1px solid var(--text-2); outline-offset: 2px; }
.sel .caret {
  flex: none;
  width: 5px; height: 5px;
  border-right: 1px solid var(--text-3);
  border-bottom: 1px solid var(--text-3);
  transform: rotate(45deg) translateY(-1px);
  transition: transform .26s var(--ease), border-color var(--dur) var(--ease);
}
.sel.open .caret { transform: rotate(-135deg) translateY(-1px); border-color: var(--text); }
.sel.open .sel-btn { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.sel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sel-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #0c0c0e;
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .7);
  max-height: 292px;
  overflow: auto;
  opacity: 0;
  transform: translateY(-6px) scale(.99);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
}
.sel.open .sel-panel { opacity: 1; transform: none; pointer-events: auto; }
.sel-panel::-webkit-scrollbar { width: 8px; }
.sel-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }

.sel-group {
  padding: 10px 12px 5px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sel-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text-2);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .03em;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease), padding-left .14s var(--ease);
}
.sel-opt:hover, .sel-opt.cursor { background: rgba(255, 255, 255, .07); color: #fff; padding-left: 16px; }
.sel-opt[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, .10); }
.sel-opt[aria-selected="true"]::after { content: ""; }

/* editör alt çubuğundaki kompakt varyant */
.sel--inline { width: auto; min-width: 152px; }
.sel--inline .sel-btn { padding: 5px 9px; font-size: 10.5px; }

/* ── daktilo animasyonu ────────────────────────────────────────────────── */
.type-caret {
  display: inline-block;
  width: .52ch;
  height: .92em;
  margin-left: .08em;
  background: var(--text);
  vertical-align: -.08em;
  animation: caretBlink 1.06s steps(1) infinite;
}
.type-caret.done { animation: caretFade .5s var(--ease) forwards; }
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes caretFade { to { opacity: 0; } }
