/* Gazete32 Kelime Avı */
.g32k {
    --g32k-panel:  var(--bg3, #1a1a1a);
    --g32k-panel2: var(--bg4, #232323);
    --g32k-line:   var(--border, #2a2a2a);
    --g32k-text:   var(--text, #ececec);
    --g32k-muted:  var(--text2, #9b9b9b);
    --g32k-accent: var(--primary, #cc0000);

    box-sizing: border-box;
    max-width: 1120px; margin: 0 auto; padding: 16px 12px 0;
    color: var(--g32k-text);
    background: var(--g32k-panel);
    border: 1px solid var(--g32k-line); border-radius: 10px;
    overflow: hidden;
    font-family: inherit;
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.g32k *, .g32k *::before, .g32k *::after { box-sizing: border-box; }

/* ── Yerleşim (masaüstü) ── */
.g32k-layout {
    display: grid;
    grid-template-columns: 200px auto 240px;
    grid-template-areas: "hud stage words" "actions stage words";
    grid-template-rows: auto 1fr;
    gap: 16px 20px;
    justify-content: center; align-items: start;
}
.g32k-hud   { grid-area: hud; display: grid; gap: 8px; }
.g32k-stage { grid-area: stage; }
.g32k-words-box { grid-area: words; }
.g32k-actions { grid-area: actions; display: grid; gap: 8px; }

.g32k-stat {
    display: flex; flex-direction: column; gap: 4px; min-width: 0;
    padding: 10px 12px;
    background: var(--g32k-panel2); border: 1px solid var(--g32k-line); border-radius: 8px;
}
.g32k-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g32k-muted); }
.g32k-stat b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.g32k-small {
    min-height: 40px; padding: 6px 12px;
    background: transparent; color: var(--g32k-text);
    border: 1px solid var(--g32k-line); border-radius: 8px;
    font: inherit; font-size: 14px; cursor: pointer;
}
.g32k-small:hover { border-color: var(--g32k-muted); }
.g32k-small:disabled { opacity: .45; cursor: default; }

/* ── Tahta ── */
.g32k-stage { position: relative; line-height: 0; border-radius: 6px; overflow: hidden; background: #0f0f14; border: 2px solid var(--g32k-line); }
.g32k-lines { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.g32k-grid  { position: relative; z-index: 1; display: grid; touch-action: none; cursor: pointer; }
.g32k-cell  { display: flex; align-items: center; justify-content: center; font-weight: 800; color: #e6e6ec; line-height: 1; transition: color .15s; }
.g32k-cell.is-found { color: #fff; }
.g32k-cell.is-hint  { color: #fff; background: rgba(209, 15, 15, .6); border-radius: 50%; animation: g32k-pulse .7s ease-in-out infinite; }
@keyframes g32k-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.g32k-found { opacity: .62; }
.g32k-sel   { opacity: .35; }
.g32k-sel.is-bad { opacity: .6; }

/* ── Karşılama / bitiş ekranı ── */
.g32k-overlay {
    position: absolute; inset: 0; z-index: 4;
    display: flex; align-items: center; justify-content: center;
    padding: 10px; overflow: auto; line-height: 1.35; text-align: center;
    background: rgba(10, 10, 14, .9); color: #f1f1f1;
}
.g32k-overlay[hidden], .g32k-ov-start[hidden], .g32k-ov-win[hidden] { display: none; }
.g32k-ov-start, .g32k-ov-win { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.g32k-ov-title { font: italic 900 30px/1.1 Georgia, 'Times New Roman', 'Noto Serif', serif; }
.g32k-ov-text  { margin: 0; font-size: 14px; color: #cfcfd6; }
.g32k-ov-sub   { margin: 0; font-size: 13px; color: #ffb4b4; font-weight: 700; }
.g32k-ov-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-height: 48px; padding: 10px 24px;
    background: var(--g32k-accent); color: #fff; border: 0; border-radius: 8px;
    font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.g32k-ov-btn small { font-size: 12px; font-weight: 600; opacity: .85; }
.g32k-ov-btn:hover { filter: brightness(1.1); }
.g32k-ov-alt {
    min-height: 40px; padding: 8px 18px;
    background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px;
    font: inherit; font-size: 14px; cursor: pointer;
}
.g32k-ov-alt:hover { border-color: #fff; }
.g32k-diff { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; overflow: hidden; }
.g32k-diff button {
    padding: 8px 14px; background: transparent; color: #cfcfd6;
    border: 0; border-right: 1px solid rgba(255, 255, 255, .18);
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.g32k-diff button:last-child { border-right: 0; }
.g32k-diff button[aria-pressed="true"] { background: #fff; color: #111; }

/* ── Kelime listesi ── */
.g32k-words-title { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g32k-muted); }
.g32k-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.g32k-words li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; font-size: 15px; font-weight: 700; letter-spacing: .03em;
    background: var(--g32k-panel2); border: 1px solid var(--g32k-line); border-radius: 6px;
}
.g32k-words li i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: transparent; }
.g32k-words li.is-found { color: var(--g32k-muted); }
.g32k-words li.is-found .g32k-wtx { text-decoration: line-through; text-decoration-thickness: 2px; }
.g32k-help { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--g32k-muted); }

/* ── Manşet bandı ── */
.g32k-flash {
    position: absolute; left: 0; right: 0; top: 14%; z-index: 3;
    display: flex; flex-direction: column; align-items: flex-start;
    pointer-events: none; line-height: 1.2;
    transform: translateX(-110%); opacity: 0;
}
.g32k-flash.is-on { animation: g32k-flash 1.9s cubic-bezier(.2,.8,.2,1) both; }
.g32k-flash-k { padding: 2px 10px; background: #fff; color: #b00000; font: 800 11px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; }
.g32k-flash-t {
    width: 100%; padding: 6px 14px 8px; background: #cc0000; color: #fff;
    font: italic 900 20px/1.15 Georgia, 'Times New Roman', 'Noto Serif', serif;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .55);
}
@keyframes g32k-flash {
    0%   { transform: translateX(-110%); opacity: 1; }
    14%  { transform: translateX(0); }
    78%  { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(110%); opacity: 1; }
}
@keyframes g32k-flash-fade { 0%, 100% { opacity: 0; transform: none; } 12%, 80% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .g32k-flash.is-on { animation: g32k-flash-fade 1.9s both; }
    .g32k-cell.is-hint { animation: none; }
}

/* ── Alt bilgi, bildirim, ekran okuyucu ── */
.g32k-footer {
    margin: 14px -12px 0; padding: 8px 16px;
    border-top: 1px solid var(--g32k-line);
    color: var(--g32k-muted); font-size: 11px; text-align: center; letter-spacing: .02em;
}
.g32k-ver { margin-left: 6px; font-weight: 700; color: var(--g32k-text); }
.g32k-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 99999; transform: translateX(-50%);
    padding: 10px 16px; background: #111; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; font-size: 14px;
}
.g32k-toast[hidden] { display: none; }
.g32k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g32k button:focus-visible { outline: 2px solid var(--g32k-accent); outline-offset: 2px; }

/* ═════════════ Mobil (dar ekran) yerleşimi ═════════════
   Üstte tek satırlık ince bilgi şeridi, altında tahta, altında kelime çipleri, en altta düğmeler. */
.g32k.is-compact { padding: 10px 6px 0; }
.g32k.is-compact .g32k-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hud" "stage" "words" "actions";
    grid-template-rows: auto;
    gap: 16px;   /* tahtanın kırmızı çerçevesi şeride değmesin */
    justify-content: stretch; align-items: stretch;
}
.g32k.is-compact .g32k-hud { grid-template-columns: 1.5fr 1fr 1fr; gap: 6px; }
.g32k.is-compact .g32k-stat { padding: 4px 8px; gap: 2px; border-radius: 8px; }
.g32k.is-compact .g32k-k { font-size: 9px; letter-spacing: .04em; }
.g32k.is-compact .g32k-stat b { font-size: 15px; }
.g32k.is-compact .g32k-stage { justify-self: center; }
.g32k.is-compact .g32k-words { display: flex; flex-wrap: wrap; gap: 6px; }
.g32k.is-compact .g32k-words li { padding: 5px 9px; font-size: 13px; gap: 6px; }
.g32k.is-compact .g32k-words li i { width: 8px; height: 8px; }
.g32k.is-compact .g32k-words-title,
.g32k.is-compact .g32k-help { display: none; }
.g32k.is-compact .g32k-actions { grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
.g32k.is-compact .g32k-small { min-height: 42px; padding: 4px 8px; font-size: 13px; }
.g32k.is-compact .g32k-ov-title { font-size: 22px; }
.g32k.is-compact .g32k-ov-text { font-size: 12.5px; }
.g32k.is-compact .g32k-ov-btn { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.g32k.is-compact .g32k-flash-t { font-size: 15px; padding: 5px 10px 6px; }
.g32k.is-compact .g32k-footer { margin: 14px -6px 0; }

/* ═════════════ Tam genişlik oyun sayfası (sitenin kendi başlığı ve altbilgisiyle) ═════════════ */
body.g32k-themed { overflow-x: hidden; }

.g32k-page {
    position: relative; isolation: isolate; overflow: hidden;
    width: 100vw; max-width: none; margin-left: calc(50% - 50vw);
    background: #09090c; color: #f2f2f2;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.g32k-page:fullscreen { width: 100%; margin: 0; height: 100%; display: flex; flex-direction: column; overflow-y: auto; }
.g32k-page:-webkit-full-screen { width: 100%; margin: 0; height: 100%; display: flex; flex-direction: column; overflow-y: auto; }

.g32k-page::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(1100px 560px at 94% 110%, rgba(204, 0, 0, .30), transparent 62%),
        radial-gradient(760px 480px at -2% -8%, rgba(204, 0, 0, .16), transparent 60%),
        radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0 / 14px 14px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 100%);
            mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 100%);
}
.g32k-page::after {
    content: 'ABC'; position: absolute; left: -2vw; bottom: -6vw; z-index: -1; pointer-events: none;
    font: italic 900 min(46vh, 30vw)/1 Georgia, 'Times New Roman', 'Noto Serif', serif;
    color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .055);
}

.g32k-bar {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
    padding: 10px 16px;
    background: rgba(9, 9, 12, .6);
    border-bottom: 4px double rgba(255, 255, 255, .28);
}
.g32k-title { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.g32k-masthead { font: italic 900 30px/1 Georgia, 'Times New Roman', 'Noto Serif', serif; letter-spacing: -.01em; color: #fff; }
.g32k-date { margin-top: 4px; font-size: 11px; color: #a3a3ab; }
.g32k-tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.g32k-iconbtn {
    width: 40px; height: 40px; padding: 0;
    background: transparent; color: #fff;
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px;
    font-size: 18px; line-height: 1; cursor: pointer;
}
.g32k-iconbtn:hover { border-color: #fff; }
.g32k-iconbtn[hidden] { display: none; }
.g32k-bar :focus-visible { outline: 2px solid #ff4d4d; outline-offset: 2px; }

.g32k-main { position: relative; z-index: 1; display: flex; justify-content: center; }
.g32k-page:fullscreen .g32k-main { flex: 1 1 auto; }
.g32k-page:-webkit-full-screen .g32k-main { flex: 1 1 auto; }

.g32k-page .g32k {
    --g32k-panel: transparent;
    --g32k-panel2: rgba(255, 255, 255, .045);
    --g32k-line: rgba(255, 255, 255, .15);
    --g32k-text: #f2f2f2;
    --g32k-muted: #a3a3ab;
    --g32k-accent: #d10f0f;

    width: 100%; margin: 0 auto; padding: 18px 12px 0;
    background: transparent; border: 0; border-radius: 0; overflow: visible;
}
.g32k-page .g32k.is-compact { padding: 12px 6px 0; }
.g32k-page .g32k-stage {
    border: 0; border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 6px #0c0c10, 0 0 0 7px #d10f0f, 0 24px 90px rgba(209, 15, 15, .26);
}
.g32k-page .g32k-ov-title { font-size: 34px; }
.g32k-page .g32k-flash-t { font-size: 24px; }
.g32k-page .g32k-footer { background: rgba(9, 9, 12, .6); }
.g32k-page .g32k.is-compact .g32k-ov-title { font-size: 24px; }
.g32k-page .g32k.is-compact .g32k-flash-t { font-size: 16px; }

@media (max-width: 719px) {
    .g32k-bar { padding: 6px 10px; gap: 6px; }
    .g32k-masthead { font-size: 22px; }
    .g32k-date { display: none; }
    .g32k-iconbtn { width: 36px; height: 36px; font-size: 16px; }
}
@media (max-height: 560px) { .g32k-date { display: none; } }
