/* Ana sayfa ve wiki ortak görünümü. İskelet mapgame-manager'dan; görsel inceltme mapgame-graphic'te.
   Renkler ve yazı tipi oyunla aynı (index.html "sıcak tema" bloğu): Jersey 15 başlıklar, Nunito metin. */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800&display=swap");
@font-face { font-family: "MG Display"; font-weight: 100 900; font-display: swap; size-adjust: 125%;
  src: url(https://fonts.gstatic.com/s/jersey15/v4/_6_9EDzuROGsUuk2TWjiZYAg.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "MG Display"; font-weight: 100 900; font-display: swap; size-adjust: 125%;
  src: url(https://fonts.gstatic.com/s/jersey15/v4/_6_9EDzuROGsUuk2TWjia4AggCk.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --bg: #17161c; --night: #262430; --night-2: #312f3d; --night-3: #45425a; --well: #1b1a22; --edge: #121118;
  --ink: #f6f1e4; --dim: #aca695; --coin: #ffc93c; --coin-deep: #b97f00; --go: #5dbb8c; --go-deep: #2c7a57;
  --sky: #f2b84b; --warn: #ea6a4c; --blue: #6fa8dc; --link: #f2c879;
  --display: "MG Display", "Nunito", system-ui, sans-serif; --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.65 var(--body); }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--coin); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: .01em; margin: 1.6em 0 .5em; }
h1 { font-size: 40px; margin-top: 0; }
h2 { font-size: 30px; }
h3 { font-size: 22px; color: var(--coin); }
b, strong { font-weight: 800; }
img { max-width: 100%; height: auto; }
::selection { background: var(--coin); color: #2b1e00; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Logo: oyundaki tabela gibi küçük bir levha */
.logo { display: inline-flex; align-items: center; font: 400 30px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.logo::before { content: ""; width: 26px; height: 26px; flex: none; margin-right: 8px; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23121118' d='M4 0h5v1h1v1h1v5h-1v2h-1v2h-1v1h-1v1h-1v-1h-1v-1h-1v-2h-1v-2h-1v-5h1v-1h1z'/%3E%3Cpath fill='%23ea6a4c' d='M4 1h5v1h1v5h-1v2h-1v2h-1v1h-1v-1h-1v-2h-1v-2h-1v-5h1z'/%3E%3Cpath fill='%23f6a48f' d='M4 2h2v1h-1v2h-1z'/%3E%3Cpath fill='%23121118' d='M5 3h3v3h-3z'/%3E%3Cpath fill='%23ffc93c' d='M6 4h1v1h-1z'/%3E%3C/svg%3E") center / contain no-repeat; }
.logo span { color: var(--coin); }
.logo:hover { color: var(--ink); }

/* Düğmeler: oyundaki .gbtn ile aynı kabartma */
.btn { display: inline-block; padding: 11px 22px 10px; border: 3px solid var(--edge); border-radius: 8px; background: var(--night-3); color: var(--ink);
  font: 400 24px/1 var(--display); letter-spacing: .02em; text-decoration: none; box-shadow: 0 5px 0 var(--edge); cursor: pointer; }
.btn:hover { filter: brightness(1.1); color: var(--ink); }
.btn.go { background: var(--go); color: #0d2a1c; }
.btn.go:hover { color: #0d2a1c; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--edge); }

/* Üst çubuk */
.top { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--night); border-bottom: 3px solid var(--edge); box-shadow: 0 3px 0 rgba(0,0,0,.25); position: sticky; top: 0; z-index: 5; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a:not(.btn) { color: var(--ink); font: 400 22px/1 var(--display); letter-spacing: .02em; text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.top nav a:not(.btn):hover { background: var(--night-2); color: var(--coin); }
.top .btn { padding: 8px 18px 7px; font-size: 21px; box-shadow: 0 4px 0 var(--edge); margin-left: 6px; }
.top .btn:active { box-shadow: 0 1px 0 var(--edge); }
footer { padding: 26px 20px 40px; color: var(--dim); font-size: 14px; text-align: center; border-top: 3px solid var(--edge); background: var(--well); }
footer a { color: var(--dim); }

/* ---- Ana sayfa ---- */
.hero { position: relative; padding: 54px 20px 0; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 50% 30%, rgba(255,201,60,.10), transparent 70%),
    linear-gradient(var(--night) 0, var(--bg) 100%); border-bottom: 3px solid var(--edge); }
/* arka planda soluk sokak ızgarası: haritayı anımsatır */
.hero::before { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background: linear-gradient(90deg, transparent 0 46px, var(--night-2) 46px 50px, transparent 50px) 0 0 / 96px 100%,
    linear-gradient(transparent 0 70px, var(--night-2) 70px 74px, transparent 74px) 0 0 / 100% 120px;
  -webkit-mask-image: linear-gradient(#000, transparent 75%); mask-image: linear-gradient(#000, transparent 75%); }
.hero > * { position: relative; }
.hero h1 { font-size: 92px; line-height: .9; margin: 0 0 14px; color: var(--ink); text-shadow: 0 5px 0 var(--edge); }
.hero h1 span { color: var(--coin); }
.hero p { max-width: 640px; margin: 0 auto 28px; font-size: 20px; color: var(--dim); }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn { font-size: 28px; padding: 13px 30px 12px; }
.hero figure { max-width: 1040px; margin: 44px auto 0; padding: 10px 10px 0; background: var(--night); border: 3px solid var(--edge); border-bottom: 0; border-radius: 14px 14px 0 0; }
.hero figure img { display: block; border: 3px solid var(--edge); border-bottom: 0; border-radius: 8px 8px 0 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 18px 20px 40px; }
.wrap > h2 { display: flex; align-items: center; gap: 12px; }
.wrap > h2::after { content: ""; flex: 1; height: 3px; background: var(--night-2); border-radius: 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; padding: 0; list-style: none; }
.cards li { display: flex; flex-direction: column; background: var(--night); border: 3px solid var(--edge); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 0 var(--edge); transition: transform .12s; }
.cards li:hover { transform: translateY(-3px); }
.cards li img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 3px solid var(--edge); background: var(--well); }
.cards li div { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.cards h3 { margin: 0 0 6px; font-size: 26px; }
.cards p { margin: 0; color: var(--dim); font-size: 16px; }
.cards p:last-child { margin-top: auto; padding-top: 12px; }
.cards p:last-child a { font: 400 21px/1 var(--display); letter-spacing: .02em; text-decoration: none; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; background: var(--night); border: 3px solid var(--edge); border-radius: 10px; padding: 14px 16px 14px 66px; position: relative; min-height: 64px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 36px; height: 36px; border: 3px solid var(--edge); border-radius: 8px; box-shadow: 0 3px 0 var(--edge);
  background: var(--coin); color: #2b1e00; font: 400 26px/31px var(--display); text-align: center; }
.steps li b { color: var(--coin); }
.fair { background: var(--night); border: 3px solid var(--edge); border-left: 8px solid var(--go); border-radius: 10px; padding: 14px 18px; }

/* ---- Wiki ---- */
.wiki { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.side { position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 62px); overflow: auto; padding: 18px 10px 30px 16px; scrollbar-width: thin; scrollbar-color: var(--night-3) transparent; }
.side > a { display: block; margin: 2px 0; padding: 6px 10px 5px; border: 2px solid transparent; border-radius: 6px; color: var(--ink); text-decoration: none; font: 400 21px/1.1 var(--display); letter-spacing: .02em; }
.side > a:first-child { color: var(--coin); font-size: 24px; margin-bottom: 8px; }
.side > a:hover { background: var(--night); }
.side > a.on { background: var(--night-2); border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); color: var(--coin); }
.side .sub { margin: 4px 0 8px 14px; border-left: 3px solid var(--night-2); }
.side .sub a { display: block; font-weight: 700; font-size: 14px; color: var(--dim); text-decoration: none; padding: 3px 10px; }
.side .sub a:hover { color: var(--ink); }
.doc { padding: 28px 30px 24px; min-width: 0; max-width: 920px; }
.doc h1 { font-size: 52px; margin-bottom: 6px; }
.doc h2 { display: inline-block; margin-top: 1.5em; padding: 6px 14px 5px; background: var(--night-2); border: 3px solid var(--edge); border-radius: 8px; box-shadow: 0 4px 0 var(--edge); }
.doc h2 + * { margin-top: 10px; }
.doc .lead { font-size: 19px; color: var(--dim); margin-top: 0; }
.doc figure { margin: 22px 0; background: var(--night); border: 3px solid var(--edge); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 0 var(--edge); }
.doc figure img { display: block; margin: 0 auto; cursor: zoom-in; }
.doc figcaption { padding: 10px 16px 12px; font-size: 15px; color: var(--dim); border-top: 3px solid var(--edge); background: var(--night-2); }
.doc figcaption > b:first-child { color: var(--ink); font: 400 20px/1.2 var(--display); letter-spacing: .02em; }
.doc ol.legend { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: l; display: grid; gap: 4px; }
.doc ol.legend li { counter-increment: l; padding-left: 32px; position: relative; color: var(--ink); }
.doc ol.legend li::before { content: counter(l); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: #e5383b; box-shadow: 0 0 0 2px #fff; color: #fff; font: 800 13px/22px var(--body); text-align: center; }
.tablewrap { overflow-x: auto; margin: 14px 0 20px; border: 3px solid var(--edge); border-radius: 10px; background: var(--night); }
.doc table { width: 100%; border-collapse: collapse; margin: 0; font-size: 16px; }
.doc :not(.tablewrap) > table { border: 3px solid var(--edge); margin: 14px 0 20px; }
.doc th, .doc td { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--night-2); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.doc th { font: 400 19px/1.2 var(--display); letter-spacing: .02em; color: var(--coin); background: var(--night-2); border-bottom: 3px solid var(--edge); }
.doc td.n, .doc th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip, .warn, .rule { border: 3px solid var(--edge); border-left-width: 8px; border-left-color: var(--blue); border-radius: 10px; padding: 12px 16px; margin: 18px 0; background: var(--night); }
.warn { border-left-color: var(--warn); } .rule { border-left-color: var(--coin); }
.tip > b:first-child, .warn > b:first-child, .rule > b:first-child { display: block; margin-bottom: 2px; font: 400 21px/1.2 var(--display); letter-spacing: .02em; color: var(--blue); }
.warn > b:first-child { color: var(--warn); } .rule > b:first-child { color: var(--coin); }
.doc code, kbd { background: var(--night-3); border-radius: 4px; padding: 1px 6px; font: 700 15px var(--body); }
kbd { border: 2px solid var(--edge); border-bottom-width: 3px; }
.doc ul, .doc ol:not(.legend) { padding-left: 24px; }
.doc ul li::marker { color: var(--coin); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 3px solid var(--night-2); }
.pager a { display: inline-block; padding: 9px 16px 8px; background: var(--night-2); border: 3px solid var(--edge); border-radius: 8px; box-shadow: 0 4px 0 var(--edge);
  color: var(--ink); font: 400 21px/1 var(--display); letter-spacing: .02em; text-decoration: none; }
.pager a:hover { color: var(--coin); }
.pager a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.pager a:only-child:last-child { margin-left: auto; }
.toc { background: var(--night); border: 3px solid var(--edge); border-radius: 10px; padding: 10px 16px; margin: 0 0 8px; font-size: 15px; }
.toc a { margin-right: 14px; white-space: nowrap; font-weight: 700; }
.menu-btn { display: none; }
#zoom { position: fixed; inset: 0; background: rgba(13,12,17,.9); display: grid; place-items: center; z-index: 20; cursor: zoom-out; padding: 10px; }
#zoom img { max-height: 96vh; border: 3px solid var(--edge); border-radius: 8px; }
#zoom[hidden] { display: none; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; } .hero h1 { font-size: 64px; } .hero p { font-size: 17px; }
  .hero .cta .btn { font-size: 24px; padding: 11px 22px 10px; }
  .hero figure { margin-top: 30px; padding: 6px 6px 0; border-radius: 10px 10px 0 0; }
  .wiki { display: block; } .doc { padding: 18px 16px; }
  .side { display: none; position: fixed; inset: 58px 0 0 0; max-height: none; background: var(--bg); z-index: 4; padding: 14px 16px 30px; }
  .side.open { display: block; }
  .menu-btn { display: inline-block; padding: 6px 12px 5px; font: 700 20px/1 var(--body); box-shadow: 0 3px 0 var(--edge); }
  .top { padding: 8px 12px; gap: 8px; } .top nav a.hide-s { display: none; }
  .top nav a:not(.btn) { font-size: 20px; padding: 6px 8px; }
  .top .btn { font-size: 19px; padding: 7px 14px 6px; }
  .logo { font-size: 26px; } .logo::before { width: 22px; height: 22px; }
  h1, .doc h1 { font-size: 38px; } h2 { font-size: 26px; }
  .doc h2 { font-size: 24px; }
  .cards h3 { font-size: 24px; }
}
@media (max-width: 400px) { .menu-btn ~ .logo { font-size: 22px; } .menu-btn ~ .logo::before { display: none; } }

/* Oyuna giriş yapmış ziyaretçi: "Oyuna dön" düğmesi (site.js ekler). Wiki sayfalarında ayrıca sağ altta sabit durur. */
.btn.back { background: var(--coin); color: #2a1d00; white-space: nowrap; }
.btn.back:hover { color: #2a1d00; }
.btn.back.float { position: fixed; right: 16px; bottom: 16px; z-index: 6; font-size: 22px; padding: 11px 20px 10px; box-shadow: 0 5px 0 var(--edge), 0 10px 24px rgba(0,0,0,.45); }
body.in-game footer { padding-bottom: 84px; }
@media (max-width: 560px) { body.in-game .top nav a:not(.btn) { display: none; } body.in-game .top .btn { padding-inline: 12px; } }
/* Dar ekranda üst çubuk (yapışkan) zaten "Oyuna dön" gösteriyor; sabit ikinci düğme yazının üstünü örtmesin. */
@media (max-width: 860px) { .btn.back.float { display: none; } body.in-game footer { padding-bottom: 40px; } }
