/* ---------- oyun sayfası iskeleti ---------- */
.gp-bar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--rule); }
.gp-bar .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; gap: 8px; }
.gp-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 13px; font-weight: 600; }
.gp-back:hover { text-decoration: underline; }
.gp-title { display: flex; align-items: center; gap: 10px; font-family: var(--sans); }
.gp-title .sw { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
.gp-title b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.gp-tools { display: flex; justify-content: flex-end; gap: 4px; align-items: center; }
.gp-timer { font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; padding: 0 10px; min-width: 56px; text-align: right; }
.gp-main { max-width: 560px; margin: 0 auto; padding: 22px 16px 60px; }
.gp-meta { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sans); margin-bottom: 14px; }
.gp-meta h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.gp-meta span { font-size: 13px; color: var(--muted); font-weight: 600; }
.gp-more { max-width: 900px; margin: 0 auto; padding: 0 16px 20px; }
.gp-more h3 { font-family: var(--sans); font-size: 17px; font-weight: 800; margin: 0 0 12px; }

/* yardım paneli */
.g-help { position: fixed; inset: 0; z-index: 40; background: rgba(18,18,18,.45); display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.g-help.on { opacity: 1; pointer-events: auto; }
.g-help .box { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 24px; font-family: var(--sans); position: relative; transform: translateY(8px); transition: transform .2s; }
.g-help.on .box { transform: none; }
.g-help h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.g-help p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.g-help .pill { margin-top: 18px; width: 100%; }

/* sonuç penceresi */
.g-modal { position: fixed; inset: 0; z-index: 50; background: rgba(18,18,18,.5); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.g-modal.on { opacity: 1; }
.g-dialog { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 18px; padding: 28px 24px 20px; text-align: center; font-family: var(--sans); transform: scale(.96); transition: transform .25s cubic-bezier(.2,.9,.3,1.2); }
.g-modal.on .g-dialog { transform: none; }
.g-x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 50%; }
.g-x:hover { background: var(--tint); color: var(--ink); }
.g-res-art { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 12px; }
.g-dialog h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.g-res-detail { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.g-res-detail span { font-family: var(--serif); font-style: italic; }
.g-emoji { margin: 14px 0 0; font-size: 20px; line-height: 1.25; letter-spacing: 2px; font-family: inherit; }
.g-res-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.g-res-stats b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.g-res-stats span { font-size: 11px; color: var(--muted); }
.g-dialog .pill { width: 100%; margin-top: 8px; }
.g-count { margin: 14px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-count span { font-weight: 700; color: var(--ink); }

.g-toast { position: fixed; left: 50%; top: 76px; z-index: 60; transform: translate(-50%, -8px); background: var(--ink); color: #fff; font: 700 14px var(--sans); padding: 10px 16px; border-radius: 8px; opacity: 0; transition: all .2s; pointer-events: none; }
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Fizikle ---------- */
.fz { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.fz-board { display: grid; gap: 6px; }
.fz-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fz-tile { width: min(15vw, 62px); height: min(15vw, 62px); border: 2px solid #d3d6da; display: grid; place-items: center; font: 800 min(8vw, 30px)/1 var(--sans); text-transform: uppercase; color: var(--ink); background: #fff; user-select: none; }
.fz-tile.filled { border-color: #878a8c; animation: pop .1s; }
.fz-tile.correct, .fz-tile.present, .fz-tile.absent { color: #fff; border-color: transparent; }
.fz-tile.correct { background: #6aaa64; }
.fz-tile.present { background: #c9b458; }
.fz-tile.absent { background: #787c7e; }
.fz-tile.flip { transform: rotateX(90deg); transition: transform .18s ease-in; }
.fz-tile.flip2 { animation: unflip .18s ease-out; }
.fz-row.shake { animation: shake .45s; }
.fz-row.win .fz-tile { animation: bounce .5s ease; }
.fz-row.win .fz-tile:nth-child(2) { animation-delay: .08s; } .fz-row.win .fz-tile:nth-child(3) { animation-delay: .16s; }
.fz-row.win .fz-tile:nth-child(4) { animation-delay: .24s; } .fz-row.win .fz-tile:nth-child(5) { animation-delay: .32s; }
.fz-kb { width: 100%; display: grid; gap: 7px; user-select: none; }
.fz-kbrow { display: flex; gap: 5px; justify-content: center; }
.fz-key { flex: 1; max-width: 44px; height: 54px; border: 0; border-radius: 5px; background: #d3d6da; color: var(--ink); font: 700 15px var(--sans); cursor: pointer; padding: 0; touch-action: manipulation; }
.fz-key.wide { flex: 1.6; max-width: 70px; font-size: 13px; }
.fz-key:active { filter: brightness(.9); }
.fz-key.correct { background: #6aaa64; color: #fff; }
.fz-key.present { background: #c9b458; color: #fff; }
.fz-key.absent { background: #787c7e; color: #fff; }
.fz-demo { display: inline-grid; place-items: center; width: 26px; height: 26px; color: #fff; font-weight: 800; font-size: 14px; border-radius: 3px; margin-right: 2px; }
.fz-demo.correct { background: #6aaa64; } .fz-demo.present { background: #c9b458; } .fz-demo.absent { background: #787c7e; }
@keyframes unflip { from { transform: rotateX(90deg); } to { transform: none; } }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes bounce { 40% { transform: translateY(-14px); } 70% { transform: translateY(3px); } }

/* ---------- Bağlantı ---------- */
.cn { font-family: var(--sans); }
.cn-lead { margin: 0 0 12px; text-align: center; font-size: 15px; color: var(--ink-2); }
.cn-solved, .cn-grid { display: grid; gap: 8px; }
.cn-solved { margin-bottom: 8px; }
.cn-grid { grid-template-columns: repeat(4, 1fr); }
.cn-group { border-radius: 8px; padding: 14px 10px; text-align: center; animation: pop .3s; }
.cn-group b { display: block; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.cn-group span { font-size: 14px; }
.cn-tile { aspect-ratio: 1.25; border: 0; border-radius: 8px; background: #efefe6; color: var(--ink); font: 800 14px/1.15 var(--sans); padding: 4px; cursor: pointer; overflow-wrap: anywhere; hyphens: auto; transition: background .12s, transform .12s; touch-action: manipulation; }
.cn-tile.sm { font-size: 12px; } .cn-tile.xs { font-size: 10.5px; }
.cn-tile:hover { background: #e4e4d9; }
.cn-tile.on { background: #5a594e; color: #fff; }
.cn-tile.jump { animation: bounce .45s ease; }
.cn-tile.shake { animation: shake .4s; }
.cn-mist { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 12px; font-size: 14px; }
.cn-mist span { display: inline-flex; gap: 6px; }
.cn-mist i { width: 12px; height: 12px; border-radius: 50%; background: #e0e0e0; }
.cn-mist i.on { background: #5a594e; }
.cn-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cn-actions .pill { height: 44px; padding: 0 18px; font-size: 14px; }
.cn-actions .pill:disabled { opacity: .35; cursor: default; }

/* ---------- mantık ızgaraları (Atomlar, Yük, Devre) ---------- */
.lg { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lg-grid { position: relative; width: min(100%, 480px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; user-select: none; touch-action: none; }
.lg-cell { position: relative; border: 0; margin: 0; padding: 0; border-right: 1px solid rgba(0,0,0,.18); border-bottom: 1px solid rgba(0,0,0,.18); display: grid; place-items: center; cursor: pointer; background: #fff; font: inherit; color: var(--ink); }
.lg-actions { display: flex; gap: 8px; }
.lg-actions .pill { height: 42px; padding: 0 18px; font-size: 14px; }
.lg-grid.win { animation: glow 1s ease; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(106,170,100,.8); } 100% { box-shadow: 0 0 0 18px rgba(106,170,100,0); } }

/* Atomlar */
.at .lg-cell.br { border-right: 3px solid var(--ink); }
.at .lg-cell.bb { border-bottom: 3px solid var(--ink); }
.at .lg-cell:hover { filter: brightness(.96); }
.at-x { font: 700 20px var(--sans); color: rgba(0,0,0,.45); }
.at-atom { width: 64%; height: 64%; border-radius: 50%; position: relative; background: radial-gradient(circle at 50% 50%, #121212 0 22%, transparent 23%); }
.at-atom::before, .at-atom::after { content: ""; position: absolute; inset: 22% -2%; border: 2.4px solid #121212; border-radius: 50%; transform: rotate(60deg); }
.at-atom::after { transform: rotate(-60deg); }
.at .lg-cell.bad .at-atom { background: radial-gradient(circle at 50% 50%, #d0021b 0 22%, transparent 23%); }
.at .lg-cell.bad .at-atom::before, .at .lg-cell.bad .at-atom::after { border-color: #d0021b; }
.at .lg-cell.bad { background-image: repeating-linear-gradient(45deg, rgba(208,2,27,.18) 0 4px, transparent 4px 9px) !important; }

/* Yük */
.yk .lg-cell { background: #fbfbf9; }
.yk .lg-cell.given { background: #ecebe4; cursor: default; }
.yk-q { width: 70%; height: 70%; border-radius: 50%; display: grid; place-items: center; font: 800 clamp(18px, 5vw, 28px)/1 var(--sans); color: #fff; animation: pop .15s; }
.yk-q.plus { background: #ef6b4a; }
.yk-q.minus { background: #3f7ee0; }
.yk .lg-cell.bad { background-image: repeating-linear-gradient(45deg, rgba(208,2,27,.16) 0 4px, transparent 4px 9px); }
.yk-edge { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid #121212; display: grid; place-items: center; font: 800 16px/1 var(--sans); color: #121212; box-shadow: 0 1px 3px rgba(0,0,0,.15); pointer-events: none; z-index: 2; }
.yk-edge.bad { background: #d0021b; border-color: #d0021b; color: #fff; }
.yk-msg { min-height: 1.4em; margin: 0; font: 600 14px var(--sans); color: #b3261e; text-align: center; }

/* Devre */
.dv .lg-cell { background: #fff; cursor: crosshair; transition: background .12s; }
.dv .lg-cell.on { background: #d9f1ee; }
.dv-wire { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.dv-wire polyline { fill: none; stroke: #2fa39a; stroke-width: .36; stroke-linecap: round; stroke-linejoin: round; }
.dv-num { position: relative; z-index: 2; width: 58%; height: 58%; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 clamp(13px, 3.6vw, 18px)/1 var(--sans); }
.dv .lg-cell.head .dv-num, .dv .lg-cell.head::after { box-shadow: 0 0 0 4px rgba(47,163,154,.35); }
.dv .lg-cell.head:not(:has(.dv-num))::after { content: ""; width: 34%; height: 34%; border-radius: 50%; background: #2fa39a; z-index: 2; }
.dv-prog { margin: 0; font: 600 13px var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- oyun merkezi ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hub-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s; font-family: var(--sans); }
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.07); }
.hub-card .art { height: 150px; display: grid; place-items: center; position: relative; }
.hub-card .kind { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.hub-card .done { position: absolute; top: 12px; right: 12px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.hub-card .info { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.hub-card .name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.hub-card .desc { font-size: 14px; color: var(--ink-2); margin-top: 4px; flex: 1; }
.hub-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.hub-card .streak { font-size: 13px; font-weight: 700; color: var(--muted); }
.hub-card .play { background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; padding: 9px 20px; border-radius: 999px; }
.hub-progress { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.hub-progress .bar { flex: 1; max-width: 320px; height: 8px; border-radius: 999px; background: #e6e6e2; overflow: hidden; }
.hub-progress .bar i { display: block; height: 100%; background: var(--g-green); border-radius: 999px; transition: width .4s; }

@media (max-width: 900px) { .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hub-card { flex-direction: row; }
  .hub-card .art { width: 110px; height: auto; flex: none; }
  .hub-card .art svg { width: 54px; height: 54px; }
  .hub-card .kind { display: none; }
  .hub-card .done { top: auto; bottom: 8px; right: auto; left: 8px; font-size: 10px; }
  .hub-card .name { font-size: 18px; }
  .gp-back span { display: none; }
  .gp-title b { font-size: 16px; }
  .fz-key { height: 50px; font-size: 14px; }
  .cn-tile { font-size: 12.5px; } .cn-tile.sm { font-size: 11px; } .cn-tile.xs { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .fz-tile.flip { transition: none; } }

/* Günün Bilim İnsanı: gazete diline uydur (oyunlar.css'ten sonra yüklenir) */
.fa-game { --fa-accent: #121212; --fa-ink: #121212; --fa-muted: #6a6a6a; --fa-soft: #f4f4f2; --fa-line: #e2e2df; --fa-ok: #3f8a3a; --fa-ok-soft: #e7f3e5; font-family: var(--sans); border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.fa-game .fa-title { font-family: var(--sans); font-weight: 800; letter-spacing: -.02em; }
.fa-game .fa-clue-t { font-family: var(--serif); font-size: 16px; }
.fa-game .fa-btn { border-radius: 999px; padding: 0 20px; }
.fa-game .fa-input { border-radius: 999px; padding: 0 18px; }
.fa-game .fa-read { color: var(--accent); }
.admin-bar .gp-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .gp-bar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .gp-bar { top: 0; } }
