/* kriptoskor.com — Theme tokens v2 (AMOLED) */
:root {
  --font:      system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius-xs: 6px;
  --radius:    10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --t-fast: 120ms cubic-bezier(.2,.7,.2,1);
  --t-base: 220ms cubic-bezier(.2,.7,.2,1);
  --t-slow: 380ms cubic-bezier(.2,.7,.2,1);

  --content-w: 1280px;
  --gap: 16px;

  --accent:        #fbbf24;
  --accent-2:      #fde047;
  --accent-soft:   rgba(251,191,36,.12);
  --accent-glow:   0 0 32px rgba(251,191,36,.18);

  --success:       #22c55e;
  --success-soft:  rgba(34,197,94,.12);
  --danger:        #ef4444;
  --danger-soft:   rgba(239,68,68,.12);
  --warning:       #f59e0b;
  --info:          #3b82f6;
  --purple:        #a855f7;
  --cyan:          #06b6d4;
  --pink:          #ec4899;
}

/* LIGHT (default if no JS) */
:root, html[data-theme="light"] {
  --bg:          #fafafa;
  --bg-2:        #f4f4f5;
  --surface:     #ffffff;
  --surface-2:   #f4f4f5;
  --surface-3:   #e4e4e7;
  --border:      #e4e4e7;
  --border-strong: #d4d4d8;
  --text:        #09090b;
  --text-muted:  #71717a;
  --text-soft:   #a1a1aa;
  --link:        #2563eb;
  --shadow:      0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.06);
  --shadow-lg:   0 12px 36px rgba(0,0,0,.10);
  --ring:        0 0 0 3px rgba(251,191,36,.20);
}

/* DARK — AMOLED black */
html[data-theme="dark"] {
  --bg:          #000000;
  --bg-2:        #050505;
  --surface:     #0a0a0a;
  --surface-2:   #141414;
  --surface-3:   #1f1f1f;
  --border:      #1f1f1f;
  --border-strong: #2a2a2a;
  --text:        #fafafa;
  --text-muted:  #a1a1aa;
  --text-soft:   #71717a;
  --link:        #fde047;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.6);
  --ring:        0 0 0 3px rgba(251,191,36,.25);
}

* { box-sizing: border-box; }
*::selection { background: var(--accent); color: #0a0a0a; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  font-feature-settings: 'cv11','ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
a { color: var(--link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
svg { max-width: 100%; display: inline-block; vertical-align: middle; flex-shrink: 0; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; }
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
::placeholder { color: var(--text-soft); }
.muted    { color: var(--text-muted); }
.soft     { color: var(--text-soft); }
.mono     { font-family: var(--font-mono); }
hr        { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* Utility */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

.green { color: var(--success); }
.red   { color: var(--danger); }
.gold  { color: var(--accent); }
.purple{ color: var(--purple); }

/* Animations */
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform:none; } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }
@keyframes shimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn var(--t-base) both; }
.pulse   { animation: pulse 1.6s ease-in-out infinite; }
.spin    { animation: spin 1s linear infinite; }

/* Focus visible — accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Print */
@media print { .site-header, .site-footer, .ticker, .sidebar { display: none !important; } }

/* PJAX progress bar */
#pjax-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent);
  z-index: 9999;
  transition: width 240ms ease;
  pointer-events: none;
}
#pjax-bar.go { transition: width 8s cubic-bezier(.1,.7,.1,1); }
#pjax-bar.fade { transition: width 200ms ease, opacity 300ms ease 150ms; opacity: 0; }

/* PJAX view transition (modern tarayıcılar) */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vtOut 140ms ease both; }
  ::view-transition-new(root) { animation: vtIn 200ms ease both; }
}
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Header sayfalar arası sabittir: kendi VT grubunda animasyona girmez —
   sticky+backdrop header'ın geçiş sonrası kaybolması/titremesi önlenir. */
::view-transition-group(ks-header),
::view-transition-old(ks-header),
::view-transition-new(ks-header) { animation: none !important; mix-blend-mode: normal; }
::view-transition-old(ks-header) { display: none; }

/* Fallback fade (startViewTransition desteklemeyen) */
.site-main { animation: fadeIn var(--t-base) both; }
