/* ------------------------------------------------------------------
   Renkler tek yerde (:root). Koyu tema prefers-color-scheme ile gelir.
------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #151a22;
  --muted: #4a5463;
  --accent: #0b4f9c;
  --on-accent: #ffffff;
  --accent-soft: #e6eff9;
  --border: #d5dae2;
  --border-strong: #9aa5b4;
  --focus: #0a2f61;
  --ok: #1f7a45;
  --ok-bg: #e4f4ea;
  --ok-text: #0f4f2c;
  --danger: #a12626;
  --danger-bg: #fbeaea;
  --danger-text: #7a1a1a;
  --shadow: 0 1px 2px rgba(15, 25, 40, .06), 0 2px 8px rgba(15, 25, 40, .05);

  --radius: 12px;
  --radius-sm: 10px;
  --kolon: 592px;
  --kart-genislik: 560px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e28;
    --surface-2: #1e2733;
    --text: #e9edf3;
    --muted: #a9b3c1;
    --accent: #8ec1ff;
    --on-accent: #07111e;
    --accent-soft: #1a2a40;
    --border: #2a3442;
    --border-strong: #55657a;
    --focus: #ffd166;
    --ok: #4cc582;
    --ok-bg: #14301f;
    --ok-text: #b7efcd;
    --danger: #ff8a8a;
    --danger-bg: #3a1a1c;
    --danger-text: #ffc9c9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

/* ------------------------------------------------------------------
   Temel
------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }

h1 {
  margin: 0;
  line-height: 1.25;
  font-size: clamp(1.7rem, 6.2vw, 2.4rem);
  letter-spacing: -.01em;
}
p { margin: 0 0 .85rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.sar {
  width: 100%;
  max-width: var(--kolon);
  margin-inline: auto;
  padding-inline: 16px;
}

.atla {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: .7rem 1rem;
  border: 2px solid var(--focus);
  border-radius: var(--radius-sm);
}
.atla:focus { top: 8px; }

/* ------------------------------------------------------------------
   Düğmeler
------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  min-width: 44px;
  padding: .55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }

.btn-ana {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-ana:hover { background: var(--accent); filter: brightness(1.08); }

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

/* ------------------------------------------------------------------
   Başlık
------------------------------------------------------------------- */
.hero { padding-block: 2rem 1.5rem; }
.marka {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-metin {
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------
   Twit duvarı
------------------------------------------------------------------- */
.mesaj {
  max-width: var(--kart-genislik);
  margin: 0 auto 1rem;
  padding: 1.25rem 1.1rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.mesaj strong { color: var(--text); }
.mesaj .btn { margin-top: .5rem; }
.mesaj-hata { border-color: var(--danger); background: var(--danger-bg); color: var(--danger-text); }
.mesaj-hata strong { color: var(--danger-text); }

.duvar { display: grid; gap: 1.75rem; }

.kart {
  width: 100%;
  max-width: var(--kart-genislik);
  margin-inline: auto;
  min-width: 0;
}

.gomme-alan { min-width: 0; }
.gomme { display: flex; justify-content: center; min-width: 0; max-width: 100%; }
.gomme:empty { display: none; }
.gomme .twitter-tweet, .gomme iframe { max-width: 100% !important; }
/* X'in iframe'i açık renk şemasıyla gelir (koyu tema bile içeride çizilir). Sayfa koyu iken şema
   uyuşmazsa tarayıcı iframe'in arkasını opak beyaza boyar ve kenarlarda beyaz şerit görünür. */
.gomme iframe { color-scheme: light; }

.iskelet {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: .95rem;
}

.yedek {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.yedek-kullanici { font-weight: 700; font-size: 1.1rem; margin-bottom: .25rem; }
.yedek-not { color: var(--muted); margin-bottom: .75rem; }

/* Dört eylem düğmesi */
.eylemler {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .6rem;
}
@media (min-width: 480px) {
  .eylemler { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.eylem { padding-inline: .5rem; }
.eylem svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eylem-alinti { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.eylem-alinti:hover { background: var(--accent-soft); filter: brightness(.97); }

/* Tıklanmış (yapıldı) durumu */
.eylem.yapildi,
.eylem.yapildi:hover {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok-text);
}
.eylem.yapildi .etiket::after { content: " \2713"; font-weight: 800; }

/* Yanıt paneli */
.yanit {
  margin-top: .6rem;
  padding: .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.yanit-yazi {
  display: block;
  width: 100%;
  min-height: 6rem;
  padding: .65rem .75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
.yanit-bilgi {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .25rem .75rem;
  margin: .5rem 0 .75rem;
  font-size: .9rem;
}
.yanit-ek {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.yanit-sayac {
  flex: none;
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.yanit-sayac.asti { color: var(--danger); font-weight: 700; }
.yanit-alt { display: flex; flex-wrap: wrap; gap: .5rem; }
.yanit-alt .btn { flex: 1 1 8rem; }

/* ------------------------------------------------------------------
   Alt bilgi
------------------------------------------------------------------- */
.alt {
  margin-top: 2rem;
  padding-block: 1.25rem 1.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.noscript {
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* Çok dar ekranlar (360px ve altı) */
@media (max-width: 380px) {
  .sar { padding-inline: 12px; }
  .yanit { padding: .75rem; }
  .eylem { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
