/* ============================================================
   Buyukada — paylaşılan stiller
   index.html'den çıkarılan ortak sistem.
   ============================================================ */

:root {
  --bg: #eef9f3;
  --paper: #ffffff;
  --ink: #1c2826;
  --ink-soft: #4a5d5b;
  --line: #d8ece2;
  --mint: #34c79a;
  --mint-deep: #1faf83;
  --coral: #ff7766;
  --sun: #ffcb47;
  --sky: #6bb6ff;
  --berry: #d667c4;
  --shadow-card: 0 6px 0 #cfe7dd, 0 16px 24px -10px rgba(28,40,38,0.18);
  --shadow-pop: 0 10px 0 #cfe7dd, 0 24px 32px -12px rgba(28,40,38,0.22);
  --r-lg: 28px;
  --r-md: 18px;
  --r-pill: 999px;
  --gap: 14px;
  --font-d: 'Fredoka', system-ui, sans-serif;
  --font-b: 'Nunito', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-b);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ------------- TOPBAR ------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.topbar__inner {
  max-width: 1480px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 18px;
  padding: 14px 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-weight: 700;
  font-size: 26px; letter-spacing: -0.01em;
}
.logo__mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--mint);
  display: grid; place-items: center;
  box-shadow: 0 4px 0 var(--mint-deep);
  position: relative;
}
.logo__mark::before {
  content: ''; width: 14px; height: 14px;
  background: var(--paper); border-radius: 50%;
  box-shadow: 18px 0 0 var(--paper);
}
.logo__mark::after {
  content: ''; position: absolute; bottom: 9px;
  width: 14px; height: 4px; border-radius: 2px;
  background: var(--paper);
}
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 2px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  max-width: 520px; width: 100%;
}
.search:focus-within { border-color: var(--mint); }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--font-b); font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-soft); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); transition: all .15s ease;
}
.icon-btn:hover { background: var(--mint); color: var(--paper); }
.btn {
  padding: 10px 18px; border-radius: var(--r-pill);
  font-family: var(--font-d); font-weight: 600; font-size: 15px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 4px 0 #000;
  transition: transform .12s ease, box-shadow .12s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #000; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.btn--coral { background: var(--coral); box-shadow: 0 4px 0 #d8543f; color: var(--paper); }
.btn--coral:hover { box-shadow: 0 6px 0 #d8543f; }
.btn--coral:active { box-shadow: 0 2px 0 #d8543f; }
.btn--mint { background: var(--mint); box-shadow: 0 4px 0 var(--mint-deep); color: var(--paper); }
.btn--mint:hover { box-shadow: 0 6px 0 var(--mint-deep); }
.btn--mint:active { box-shadow: 0 2px 0 var(--mint-deep); }
.btn--ghost {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
  border: 2px solid var(--line);
}
.btn--ghost:hover { box-shadow: 0 6px 0 var(--line); background: var(--bg); }
.btn--ghost:active { box-shadow: 0 2px 0 var(--line); }

/* ------------- CATEGORY PILL RAIL ------------- */
.pill-rail {
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}
.pill-rail__inner {
  max-width: 1480px; margin: 0 auto;
  display: flex; gap: 8px; align-items: center;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pill-rail__inner::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--bg); border: 2px solid transparent;
  font-family: var(--font-d); font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: all .15s ease;
}
.pill:hover { background: var(--mint); color: var(--paper); transform: translateY(-1px); }
.pill.is-active { background: var(--ink); color: var(--paper); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ------------- LAYOUT ------------- */
main { max-width: 1480px; margin: 0 auto; padding: 28px 24px 80px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin: 32px 0 14px;
}
.section-head h2 {
  font-family: var(--font-d); font-weight: 700;
  font-size: 32px; letter-spacing: -0.01em; margin: 0;
}
.section-head__sub {
  font-size: 13px; color: var(--ink-soft); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.section-head a { font-weight: 800; color: var(--mint-deep); }
.section-head a:hover { color: var(--coral); }

/* ------------- KART (mosaic .game) ------------- */
.game {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
  display: block;
  color: var(--paper);
}
.game:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: var(--shadow-pop);
}
.game__art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
.game__name {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 4px 0 rgba(28,40,38,.12);
}
.game__title {
  font-family: var(--font-d); font-weight: 700; font-size: 16px;
  line-height: 1; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game__sub {
  font-size: 11px; color: var(--ink-soft); font-weight: 700;
  margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game__cat {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.95); color: var(--ink);
  font-family: var(--font-m); font-size: 10px; letter-spacing: .12em;
  padding: 5px 10px; border-radius: var(--r-pill);
  font-weight: 700; text-transform: uppercase;
}
.game__badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-m); font-size: 10px;
  padding: 5px 10px; border-radius: var(--r-pill);
  font-weight: 700;
}
.game__badge--hot { background: var(--coral); }
.game__badge--new { background: var(--sun); color: var(--ink); }
.game__giant {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  color: rgba(255,255,255,.22);
  letter-spacing: -0.03em; line-height: .9;
  text-align: center; padding: 0 10px;
  transform: rotate(-3deg);
}

/* mini-card (büyük grid'lerde küçük kareler) */
.mini-card {
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease;
  color: var(--paper);
  display: grid; place-items: center;
}
.mini-card:hover { transform: translateY(-4px) scale(1.02); }
.mini-card__name {
  position: absolute; bottom: 6px; left: 6px; right: 6px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-d); font-weight: 700; font-size: 12px;
  padding: 5px 8px; border-radius: 10px;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 0 rgba(28,40,38,.12);
}
.mini-card__giant {
  font-family: var(--font-d); font-weight: 700;
  font-size: 36px; line-height: 1;
  color: rgba(255,255,255,.3);
  transform: rotate(-3deg);
  margin-bottom: 14px;
}

/* renk varyantları */
.bg-coral { background: linear-gradient(135deg, var(--coral), #ff9580); }
.bg-mint { background: linear-gradient(135deg, var(--mint), #5be3b8); }
.bg-sun { background: linear-gradient(135deg, var(--sun), #ffe07a); color: var(--ink); }
.bg-sky { background: linear-gradient(135deg, var(--sky), #9bd0ff); }
.bg-berry { background: linear-gradient(135deg, var(--berry), #ff8de0); }
.bg-ink { background: linear-gradient(135deg, #2b3d3a, var(--ink)); }
.bg-stripe { background: repeating-linear-gradient(135deg, var(--coral) 0 24px, #ff9580 24px 48px); }
.bg-dots {
  background:
    radial-gradient(var(--paper) 2px, transparent 3px) 0 0/16px 16px,
    linear-gradient(135deg, var(--berry), #ff8de0);
}
.bg-grid {
  background:
    linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px) 0 0/22px 22px,
    linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px) 0 0/22px 22px,
    linear-gradient(135deg, var(--mint), #5be3b8);
}
.bg-checks {
  background:
    conic-gradient(var(--paper) 25%, var(--sun) 0 50%, var(--paper) 0 75%, var(--sun) 0)
    0 0/40px 40px;
}

/* ------------- MASCOT (yuvarlak yüz) ------------- */
.mascot {
  width: 140px; height: 140px; flex-shrink: 0;
  background: var(--sun);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 8px 0 #d8a620;
}
.mascot::before, .mascot::after {
  content: ''; position: absolute;
  background: var(--ink);
  border-radius: 50%;
}
.mascot::before { top: 42px; left: 32px; width: 22px; height: 22px; }
.mascot::after { top: 42px; right: 32px; width: 22px; height: 22px; }
.mascot__mouth {
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 26px;
  background: var(--ink);
  border-radius: 0 0 25px 25px;
}
.mascot__cheek {
  position: absolute; top: 70px; width: 14px; height: 8px;
  background: var(--coral); border-radius: 50%; opacity: .8;
}
.mascot__cheek--l { left: 28px; }
.mascot__cheek--r { right: 28px; }

/* ------------- FOOTER ------------- */
footer {
  margin-top: 60px;
  background: var(--paper);
  border-top: 2px solid var(--line);
  padding: 40px 24px 30px;
}
.footer-inner {
  max-width: 1480px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
footer h4 {
  font-family: var(--font-d); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-soft); margin: 0 0 12px;
}
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { font-weight: 700; }
footer a:hover { color: var(--mint-deep); }
.footer-tag { font-weight: 700; color: var(--ink-soft); margin-top: 6px; max-width: 360px; }
.footer-bottom {
  max-width: 1480px; margin: 24px auto 0;
  padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--font-m); font-size: 12px; color: var(--ink-soft);
}

/* ------------- RESPONSIVE ------------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .topbar__inner { grid-template-columns: auto auto; }
  .search { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}
