/* ============================================================
   gel.al / KUR — design system
   Identity: deep-ocean bioluminescence. Teal = intelligence light.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- DARK (default) — Fresh 2026 ---------- */
:root {
  --bg:        #06080c;
  --bg-1:      #090d13;
  --bg-grad:   radial-gradient(140% 100% at 50% -15%, #0f1a28 0%, #090d15 45%, #06080c 100%);
  --surface:   #0e131c;
  --surface-2: #131b27;
  --surface-3: #1a2331;
  --hover:     rgba(255,255,255,0.035);
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);

  --text:      #e9eef5;
  --text-2:    #aab5c4;
  --muted:     #788494;
  --faint:     #4e5a6c;

  --accent:        #3366ff;
  --accent-bright: #6690ff;
  --accent-deep:   #1a40cc;
  --accent-2:      #2955d9;
  --accent-soft:   rgba(51,102,255,0.11);
  --accent-line:   rgba(51,102,255,0.28);

  --ok:       #34d399;
  --warn:     #f0b35b;
  --danger:   #f87171;

  --shadow:   0 12px 40px -12px rgba(0,0,0,0.55);
  --r:        10px;
  --r-sm:     8px;
  --r-lg:     14px;
  --r-xl:     18px;

  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display:  'Space Grotesk', var(--font);
  --mono:     'JetBrains Mono', 'Fira Code', monospace;

  --maxw:     1200px;
  --nav-h:    58px;
  --on-accent: #ffffff;
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg:        #f5f7fa;
  --bg-1:      #eef1f6;
  --bg-grad:   radial-gradient(140% 100% at 50% -15%, #e5eef8 0%, #f5f7fa 50%, #eef1f6 100%);
  --surface:   #ffffff;
  --surface-2: #f3f5f8;
  --surface-3: #e8ecf2;
  --hover:     rgba(10,25,40,0.035);
  --border:    #dde2ea;
  --border-2:  #c8d2dd;

  --text:      #0f1a25;
  --text-2:    #384552;
  --muted:     #637180;
  --faint:     #909dab;

  --accent:        #2563eb;
  --accent-bright: #3b82f6;
  --accent-deep:   #1d4ed8;
  --accent-2:      #2456c9;
  --accent-soft:   rgba(37,99,235,0.10);
  --accent-line:   rgba(37,99,235,0.28);
  --on-accent:     #ffffff;

  --danger:  #c2392c;
  --danger-soft: rgba(194,57,44,0.09);
  --ok:      #0f9d6b;
  --warn:    #b6791f;

  --glow:    0 0 0 1px rgba(37,99,235,0.16), 0 10px 34px -12px rgba(37,99,235,0.30);
  --glow-sm: 0 0 18px -6px rgba(37,99,235,0.35);
  --shadow:  0 18px 44px -16px rgba(20,40,55,0.22);
  --shadow-sm: 0 4px 16px -8px rgba(20,40,55,0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { background: var(--bg-grad); background-attachment: fixed; }

#root { min-height: 100vh; }

::selection { background: var(--accent-soft); color: var(--text); }

a { color: inherit; text-decoration: none; }

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

h1,h2,h3,h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.08; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- utility ---------- */
.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 inherit; padding-left: 24px; padding-right: 24px; margin-left: auto; margin-right: auto; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grow { flex: 1 1 auto; min-width: 0; min-height: 0; }
.center { display: flex; align-items: center; justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-weight: 550; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease, color .16s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.outline { background: transparent; }
.btn.outline:hover { background: var(--hover); border-color: var(--accent-line); }

.btn.primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--on-accent); border-color: transparent; font-weight: 600;
  box-shadow: var(--glow-sm);
}
.btn.primary:hover { box-shadow: var(--glow); filter: brightness(1.04); }
.btn.danger { color: var(--danger); border-color: transparent; background: var(--danger-soft); }
.btn.danger:hover { background: var(--danger-soft); filter: brightness(1.08); }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.chip.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); }
[data-theme="light"] .chip.accent { color: var(--accent-deep); }

.dot { width: 7px; height: 7px; border-radius: 99px; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.err { background: var(--danger); }

/* ---------- card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
}

/* ---------- inputs ---------- */
.input, .textarea, .select {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-sm);
  padding: 0 14px; height: 44px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.textarea { padding: 12px 14px; height: auto; resize: none; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
label.lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 7px; letter-spacing: .01em; }

/* ---------- glow text + bg flourishes ---------- */
.glow-text { color: var(--accent-bright); text-shadow: 0 0 28px rgba(47,109,255,0.55); }
[data-theme="light"] .glow-text { color: var(--accent-deep); text-shadow: none; }

.bioline { /* subtle animated luminescent line */
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

.tag-eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 500; white-space: nowrap;
}

/* ---------- animations ---------- */
@keyframes floatUp { from { transform: translateY(14px); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseGlow { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes driftA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%, -8%) scale(1.08); } }
@keyframes driftB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-7%, 6%) scale(1.05); } }

.fade-up { animation: floatUp .6s cubic-bezier(.2,.7,.2,1) both; }

/* background ambient blobs */
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.ambient .b1 { width: 540px; height: 540px; top: -180px; left: 8%; background: radial-gradient(circle, rgba(47,109,255,0.24), transparent 70%); animation: driftA 22s ease-in-out infinite; }
.ambient .b2 { width: 460px; height: 460px; bottom: -160px; right: 4%; background: radial-gradient(circle, rgba(36,86,201,0.22), transparent 70%); animation: driftB 26s ease-in-out infinite; }
[data-theme="light"] .ambient .blob { opacity: .35; }

/* code block */
.code {
  background: #070b10; border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--mono); font-size: 13px; line-height: 1.65; color: #cdd6e0;
  padding: 16px 18px; overflow-x: auto; white-space: pre;
  transition: border-color .18s ease;
}
.code:hover { border-color: var(--border-2); }
[data-theme="light"] .code { background: #0c1116; color: #d4dde6; }
.code .k { color: #6ea8ff; } .code .s { color: #f0b35b; } .code .c { color: #5b6675; } .code .p { color: #7c8896; } .code .n { color: #6cb6ff; }

.hidden { display: none !important; }

/* ── Focus visible (klavye erişilebilirliği) ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible), input:focus:not(:focus-visible), textarea:focus:not(:focus-visible) { outline: none; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }


/* ── Disabled buton ── */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }


/* ── Tables ── */
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th, .dtable td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dtable th { color: var(--text-2); font-weight: 600; font-size: 12.5px; letter-spacing: .02em; background: color-mix(in srgb, var(--text) 3%, var(--surface)); }
.dtable tr:last-child td { border-bottom: none; }
.dtable tbody tr { transition: background .12s ease; }
.dtable tbody tr:hover { background: var(--hover); }

/* ── Docs ── */
.docs-nav-link { display: block; padding: 8px 12px; border-radius: 7px; font-size: 14px; color: var(--text-2); cursor: pointer; transition: background .14s ease, color .14s ease; text-decoration: none; }
.docs-nav-link:hover { background: var(--hover); color: var(--text); }
.docs-quick { display: grid; gap: 10px; margin-top: 12px; }
.docs-quick-k { font-size: 13px; font-weight: 600; min-width: 90px; color: var(--muted); }
.docs-sec h2 { font-size: 20px; margin-bottom: 10px; }
.docs-sec p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin: 0 0 12px; }
.code-card { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-top: 16px; transition: border-color .15s ease; }
.code-card:hover { border-color: var(--border-2); }
.code-card-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.docs-langs { display: flex; gap: 4px; }
.docs-lang { padding: 5px 12px; border-radius: 6px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s, color .14s; }
.docs-lang:hover { color: var(--text); }
.docs-lang.active { background: var(--accent-soft); color: var(--accent-bright); }
.key-mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); background: var(--surface-2); padding: 2px 8px; border-radius: 5px; border: 1px solid var(--border); }

@media (max-width: 760px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
}

/* ── Toast bildirim ── */
.kur-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300;
  padding: 10px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 8px 28px -6px rgba(0,0,0,.4); animation: toastIn .25s ease both;
  max-width: 90vw; text-align: center;
}
.kur-toast.ok { border-color: rgba(63,174,116,.4); color: #5fd28a; }
.kur-toast.err { border-color: rgba(232,80,58,.4); color: #f08080; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── Reduced motion (erişilebilirlik) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
