:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --ink: #111111;
  --ink-soft: #5f5f5f;
  --ink-faint: #8a8a8a;
  --line: #e3e3e3;
  --line-strong: #111111;
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --ink: #f5f5f5;
  --ink-soft: #a8a8a8;
  --ink-faint: #767676;
  --line: #262626;
  --line-strong: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0a0a0a; --surface: #141414; --ink: #f5f5f5; --ink-soft: #a8a8a8;
    --ink-faint: #767676; --line: #262626; --line-strong: #f5f5f5;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand img { display: block; height: 36px; width: auto; filter: invert(1); }
:root[data-theme="dark"] .brand img { filter: none; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .brand img { filter: none; } }

.icon-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
.icon-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-toggle:active { transform: scale(.94); }
.icon-toggle svg { width: 17px; height: 17px; }

.shell { max-width: 940px; margin: 0 auto; padding: 0 24px 96px; }

.hero { padding: 72px 0 40px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.06; letter-spacing: -.033em; font-weight: 700; }
.hero p { margin-top: 18px; max-width: 58ch; font-size: 17px; color: var(--ink-soft); }

/* ---------- Uygulama listesi ---------- */
.app-list { display: grid; gap: 0; border-top: 1px solid var(--line); }

.app-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center; gap: 18px;
  padding: 18px 8px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background .2s ease;
}
.app-row:hover { background: var(--surface); }

.app-row img {
  width: 62px; height: 62px; border-radius: 14px; display: block;
  background: var(--surface); border: 1px solid var(--line); object-fit: cover;
}

.app-name { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.012em; }
.app-sub { display: block; font-size: 14px; color: var(--ink-soft); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
}
.badge.on { border-color: var(--line-strong); color: var(--ink); }
.badge.off { color: var(--ink-faint); }

.chev { color: var(--ink-faint); font-size: 20px; padding-right: 6px; }

/* ---------- Uygulama sayfasi ---------- */
.app-hero { padding: 64px 0 8px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; align-items: center; }
.app-hero img { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); object-fit: cover; }
.app-hero h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -.028em; font-weight: 700; }
.app-hero p { margin-top: 6px; font-size: 16px; color: var(--ink-soft); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; }
.store {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 10px; text-decoration: none;
  font-size: 15px; font-weight: 600; letter-spacing: -.008em;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  transition: opacity .2s ease;
}
.store:hover { opacity: .85; }
.store svg { width: 19px; height: 19px; fill: currentColor; }

.unavailable {
  margin-top: 18px; padding: 14px 16px; font-size: 14px; line-height: 1.6;
  color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 4px;
}

.platforms { margin-top: 26px; font-size: 14px; color: var(--ink-faint); }
.status { margin-top: 20px; font-size: 14px; color: var(--ink-faint); min-height: 1.6em; }

.back { display: inline-block; margin-top: 44px; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }


@media (max-width: 560px) {
  .topbar { padding: 10px 16px; }
  .shell { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 48px; }
  .app-row { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; }
  .app-row img { width: 54px; height: 54px; border-radius: 12px; }
  .app-hero { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding-top: 44px; }
  .app-hero img { width: 76px; height: 76px; border-radius: 18px; }
  .store { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Magaza rozetleri ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; }
.badge svg { width: 12px; height: 12px; fill: currentColor; flex: 0 0 auto; }
.badge.off svg { opacity: .5; }

/* ---------- Yayinda olmayanlar ---------- */
.section-head {
  margin: 56px 0 0; padding-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint);
}
.app-row.soon { cursor: default; }
.app-row.soon:hover { background: transparent; }
.app-row.soon img, .app-row.soon .placeholder { opacity: .55; }
.placeholder {
  width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 22px; font-weight: 700; color: var(--ink-faint);
}

/* ---------- Paylas ---------- */
.share {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 18px; padding: 12px 18px; border-radius: 10px;
  font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -.006em;
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
  cursor: pointer; transition: background .2s ease;
}
.share:hover { background: var(--surface); }
.share svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  .app-row.soon .placeholder, .placeholder { width: 54px; height: 54px; border-radius: 12px; font-size: 19px; }
  .share { width: 100%; justify-content: center; }
}

/* ---------- Ust bar denetimleri ---------- */
.controls { display: flex; align-items: center; gap: 8px; }

.segmented { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.segmented button {
  appearance: none; border: 0; background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 6px 13px; cursor: pointer; transition: background .25s ease, color .25s ease;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.segmented button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* ---------- Ust baglantilar ---------- */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }
.quick-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.006em;
  color: var(--ink-soft); text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.quick-link:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.quick-link svg { width: 15px; height: 15px; fill: currentColor; flex: 0 0 auto; }
.quick-link svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Uygulama sayfasinda geri baglantisinin hemen altinda durur. */
.back + .quick { margin: 20px 0 6px; }

/* ---------- Geri baglantisi ---------- */
.back {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 36px 0 0; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
}
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Paylas butonu magaza butonlarinin yaninda ---------- */
.store.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.store.ghost:hover { background: var(--surface); opacity: 1; }
.store svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app-hero { padding-top: 22px; }

@media (max-width: 560px) {
  .quick-link { flex: 1 1 100%; justify-content: center; }
}
