/* =========================================================
   AppZtore — Kullanıcı paneli
   Sade: beyaz zemin, siyah metin, kırmızı vurgu. Gölge/glow yok.
   ========================================================= */
:root {
  --red: #d7141a;
  --red-dark: #b00f14;
  --red-soft: #fdeced;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a8a;
  --line: #e7e7e7;
  --bg: #ffffff;
  --bg-2: #f6f6f6;
  --radius: 10px;
  --sidebar: 248px;
  --topbar: 64px;
  --tabbar: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.ic { width: 20px; height: 20px; flex: none; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; }
.logo-text {
  font-weight: 900;
  font-size: 27px;
  letter-spacing: -0.5px;
  line-height: 1;
  white-space: nowrap;
}
.logo-text .o {
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}
.logo-text .z {
  color: var(--red);
  font-size: 1.12em;
  margin: 0 1px;
}

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0;
  width: var(--sidebar); height: 100vh;
  flex: none;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 20px 14px 16px;
  overflow-y: auto;
}
.sidebar > .logo { padding: 4px 10px 22px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
}
.side-nav a:hover { background: var(--bg-2); color: var(--ink); }
.side-nav a.active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.side-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 10px 6px;
}
.side-foot { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 16px; display: grid; gap: 10px; }
.side-dev { font-size: 13px; color: var(--ink-3); padding: 0 4px; }
.side-dev:hover { color: var(--red); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar);
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.logo-mobile { display: none; }

.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-3);
}
.search:focus-within { background: #fff; border-color: var(--ink); color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }

.icon-btn {
  margin-left: auto;
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff;
}
.icon-btn:hover, .icon-btn.active { border-color: var(--ink); }

#view { padding: 28px 32px 64px; outline: none; max-width: 1280px; width: 100%; }

.tabbar { display: none; }

/* ---------- Tipografi ---------- */
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-sub { color: var(--ink-3); margin: 0 0 24px; }
.section { margin-top: 36px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: 20px; font-weight: 750; margin: 0; letter-spacing: -0.01em; }
.section-head a { color: var(--red); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }
.section-head a .ic { width: 16px; height: 16px; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650; font-size: 14px;
  white-space: nowrap;
}
.btn .ic { width: 18px; height: 18px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost-red { background: var(--red-soft); color: var(--red); }
.btn-ghost-red:hover { background: #fadadc; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Chip (tür) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  white-space: nowrap; font-weight: 550; font-size: 14px; color: var(--ink-2);
  background: #fff;
}
.chip .ic { width: 17px; height: 17px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Kategori karoları ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
.tile:hover { border-color: var(--ink); }
.tile-ic {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--red-soft); color: var(--red);
}
.tile-ic .ic { width: 22px; height: 22px; }
.tile b { display: block; font-weight: 650; }
.tile small { color: var(--ink-3); font-size: 13px; }

/* ---------- Oyun kartları (yatay şerit) ---------- */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .shelf { grid-auto-columns: calc((100% - 5 * 18px) / 6); } }

.card { scroll-snap-align: start; min-width: 0; }
.card-icon {
  display: block;
  aspect-ratio: 1; width: 100%;
  border-radius: 22%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  object-fit: cover;
}
.card-title { margin-top: 10px; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.size { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.detail-icon, .card-icon { display: block; }

/* ---------- Sıralı liste (Popüler listeler) ---------- */
.ranked {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 28px;
}
.row {
  display: grid;
  grid-template-columns: auto 56px 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.row .rank { width: 22px; text-align: center; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row:nth-child(-n+3) .rank { color: var(--red); }
.row-icon { display: block; width: 56px; height: 56px; border-radius: 22%; border: 1px solid var(--line); background: var(--bg-2); object-fit: cover; }
.row-body { min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Boş durum ---------- */
.empty {
  border: 1px dashed #d6d6d6;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty .ic { width: 28px; height: 28px; color: #c4c4c4; margin-bottom: 6px; }
.empty b { display: block; color: var(--ink); font-weight: 650; margin-bottom: 2px; }
.empty p { margin: 0 auto; max-width: 420px; font-size: 14px; }
.empty .btn { margin-top: 14px; }

/* Mağaza açılış bandı (katalog boşken) */
.launch {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}
.launch h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; }
.launch p { margin: 0; color: var(--ink-2); max-width: 560px; }
.launch-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Değer önermesi */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.point { padding: 18px; border-radius: var(--radius); background: var(--bg-2); }
.point .ic { color: var(--red); width: 22px; height: 22px; }
.point b { display: block; margin: 8px 0 2px; }
.point span { color: var(--ink-2); font-size: 14px; }

/* ---------- Kategori sayfası araç çubuğu ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.seg button {
  border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.seg button.active { background: var(--ink); color: #fff; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }

/* ---------- Oyun detay ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; margin-bottom: 18px; }
.back:hover { color: var(--red); }
.detail-head { display: grid; grid-template-columns: 128px 1fr; gap: 24px; align-items: start; }
.detail-icon { width: 128px; height: 128px; border-radius: 22%; border: 1px solid var(--line); background: var(--bg-2); object-fit: cover; }
.detail-head h1 { margin: 2px 0 2px; font-size: 28px; letter-spacing: -0.02em; }
.detail-sub { color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.detail-dev { color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.verified .ic { width: 16px; height: 16px; color: var(--red); vertical-align: -2px; }
.detail-tags { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.detail-actions .btn { height: 42px; padding: 0 24px; }
.fav.on { color: var(--red); border-color: var(--red); }
.fav.on .ic { fill: var(--red); }
.loading { padding: 48px 0; text-align: center; color: var(--ink-3); }

.stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 28px 0; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { text-align: center; padding: 0 8px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.stat b { display: block; font-size: 18px; margin: 4px 0 0; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

.shots { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.shot {
  flex: none; display: block;
  height: 340px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-2); overflow: hidden;
}
.shot img, .shot video, .shot iframe { height: 100%; width: auto; display: block; border: 0; object-fit: cover; }
.shot-video video, .shot-video iframe { width: 540px; max-width: 82vw; }
.desc { white-space: pre-line; color: var(--ink-2); max-width: 760px; margin: 0; }

/* ---------- Değerlendirmeler ---------- */
.rating-box { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: center; max-width: 520px; margin-bottom: 20px; }
.rating-big b { display: block; font-size: 44px; font-weight: 850; line-height: 1; letter-spacing: -0.03em; }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 14px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.bar i { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; display: block; }
.bar b { display: block; height: 100%; background: var(--red); border-radius: 99px; }

.stars { color: #d8d8d8; letter-spacing: 1px; font-size: 15px; }
.stars .on { color: var(--red); }

.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 20px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg-2); }
.review header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.review h4 { margin: 0 0 4px; font-size: 15px; }
.review p { margin: 0; color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.reply { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.reply b { display: block; font-size: 12.5px; color: var(--red); margin-bottom: 2px; }

.review-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 520px; }
.review-form h4 { margin: 0 0 10px; font-size: 16px; }
.star-input { display: inline-flex; gap: 4px; margin-bottom: 12px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input span { font-size: 26px; color: #d8d8d8; cursor: pointer; line-height: 1; }
.star-input:hover span { color: var(--red); }
.star-input label:hover ~ label span { color: #d8d8d8; }
.star-input:not(:hover) label:has(input:checked) span,
.star-input:not(:hover) label:has(~ label input:checked) span { color: var(--red); }

.field textarea {
  padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: 0;
  font: inherit; resize: vertical;
}
.field textarea:focus { border-color: var(--ink); }

/* ---------- Bağlantılar ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 550; font-size: 14px;
}
.link-item:hover { border-color: var(--ink); }
.link-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item .ic:first-child { color: var(--red); }
.link-item .ic:last-child { width: 16px; height: 16px; color: var(--ink-3); }

.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 28px; }
.info div { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.info dt { color: var(--ink-3); }
.info dd { margin: 0; font-weight: 550; text-align: right; }

/* ---------- Sekmeler / Form ---------- */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  border: 0; background: none; padding: 10px 0; margin-bottom: -1px;
  font-weight: 650; color: var(--ink-3); border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--red); }

.auth { max-width: 420px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input {
  height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: 0;
}
.field input:focus { border-color: var(--ink); }
.muted { color: var(--ink-3); font-size: 13.5px; }
.link-red { color: var(--red); font-weight: 600; }

/* ---------- Modal / Toast ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(17,17,17,.45); display: grid; place-items: center; padding: 20px; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 420px; padding: 24px; position: relative; }
.modal-box h3 { margin: 0 0 14px; font-size: 19px; }
.modal-close { position: absolute; top: 14px; right: 14px; border: 0; background: none; color: var(--ink-3); padding: 4px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; }
.steps li::before {
  content: counter(s);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 700; font-size: 13px;
}
.steps .ic { width: 17px; height: 17px; vertical-align: -3px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 550;
  transition: opacity .18s, transform .18s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .ranked { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .logo-mobile { display: inline-flex; }
  .logo-text { font-size: 23px; }
  .topbar { padding: 0 16px; gap: 12px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar) + env(safe-area-inset-top)); }
  .topbar .search { display: none; }
  .topbar .icon-btn { display: none; }
  #view { padding: 20px 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; font-weight: 600; color: var(--ink-3);
  }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--red); }

  .page-title { font-size: 26px; }
  .section { margin-top: 30px; }
  .ranked { grid-template-columns: 1fr; }
  .shelf { grid-auto-columns: 112px; gap: 14px; }
  .card .size { display: none; }
  .card-foot .btn { width: 100%; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 14px; }
  .launch { grid-template-columns: 1fr; padding: 20px; }
  .points { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }

  .detail-head { grid-template-columns: 96px 1fr; gap: 16px; }
  .detail-icon { width: 96px; height: 96px; }
  .detail-head h1 { font-size: 22px; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .stat:nth-child(4) { border-left: 0; }
  .shot { height: 260px; }
  .shot-video video, .shot-video iframe { width: 320px; }
  .rating-box { grid-template-columns: 110px 1fr; gap: 16px; }
}

/* Mobilde arama sayfası içi kutu */
.search-page { display: none; }
@media (max-width: 860px) {
  .search-page { display: flex; max-width: none; margin-bottom: 20px; }
}

@media (max-width: 380px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { flex-direction: row; align-items: center; }
}
