/* GeoGames — Günün İklim Grafiği (oyuna özel stiller; ortak parçalar /shared/gs-game.css) */

:root {
    --gs-a: #0e7490;
    --gs-b: #f59e0b;
    --ig-temp: #ef4444;
    --ig-prec: #3b82f6;
}

.gs-hud-item[hidden] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

#login-screen.gg-intro .ig-modes { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 460px) {
    #login-screen.gg-intro .ig-modes { grid-template-columns: 1fr !important; }
}
#login-screen.gg-intro .gg-seg > button[hidden] { display: none !important; }

/* ---------- Oyun ekranı ---------- */
.ig-game {
    background:
        radial-gradient(circle at 90% 0%, rgba(251, 191, 36, .25), transparent 40%),
        linear-gradient(160deg, #0c4a6e 0%, #155e75 55%, #0f766e 100%);
}

.ig-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    align-content: start;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
}
@media (max-width: 860px) {
    .ig-main { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
}

.ig-chart-card, .ig-play > div {
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(3, 30, 60, .3);
}
.ig-play { display: grid; gap: 12px; min-width: 0; }

.ig-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ig-chart-head h2 { font: 700 19px/1.2 var(--display); color: var(--navy); }
.ig-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--muted); }
.ig-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ig-legend span::before { content: ''; width: 14px; height: 10px; border-radius: 3px; }
.ig-leg-t::before { height: 3px !important; background: var(--ig-temp); }
.ig-leg-p::before { background: var(--ig-prec); }
.ig-leg-g::before { background: repeating-linear-gradient(90deg, #64748b 0 4px, transparent 4px 7px); height: 3px !important; }

.ig-chart { margin-top: 6px; }
.ig-chart svg { display: block; width: 100%; height: auto; }
.ig-grid { stroke: #e2e8f0; stroke-width: 1; }
.ig-zero { stroke: #94a3b8; stroke-width: 1.4; }
.ig-ax { font: 800 12px var(--ui); fill: #64748b; }
.ig-ax-t { fill: #dc2626; }
.ig-ax-p { fill: #2563eb; }
.ig-month { fill: #334155; font-size: 13px; }
.ig-unit { font: 900 12px var(--ui); }
.ig-bar { fill: var(--ig-prec); opacity: .85; }
.ig-bar-g { fill: none; stroke: #475569; stroke-width: 1.6; stroke-dasharray: 4 3; }
.ig-line { fill: none; stroke: var(--ig-temp); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.ig-line-g { fill: none; stroke: #475569; stroke-width: 2.5; stroke-dasharray: 6 5; }
.ig-dot { fill: #fff; stroke: var(--ig-temp); stroke-width: 2.5; }

.ig-facts, .ig-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ig-facts span, .ig-hints span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.ig-facts b { color: var(--navy); }
.ig-hints span { background: #fef3c7; color: #92400e; animation: popIn .35s ease; }
.ig-hints img { border-radius: 3px; }

/* ---------- Tahmin kutusu ---------- */
.ig-search { position: relative; display: flex; gap: 8px; }
#guess-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    font: 800 16px var(--ui);
    color: var(--ink);
    background: #f8fafc;
}
#guess-input:focus { outline: none; border-color: var(--gs-a); background: #fff; }
.ig-guess-btn {
    flex: none;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gs-a), #0891b2);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 4px 0 #155e75;
}
.ig-guess-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #155e75; }
.ig-guess-btn:disabled, #guess-input:disabled { opacity: .5; }

.ig-suggest {
    position: absolute;
    z-index: 20;
    top: 52px;
    left: 0;
    right: 0;
    max-height: 290px;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .3);
    border: 1px solid #e2e8f0;
}
.ig-suggest li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 800; cursor: pointer; }
.ig-suggest li img { border-radius: 3px; box-shadow: 0 0 0 1px #e2e8f0; flex: none; }
.ig-suggest li.active, .ig-suggest li:hover { background: #ecfeff; color: #155e75; }

.ig-guesses { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.ig-guesses:empty::before {
    content: 'Henüz tahmin yok. Grafikteki ipuçlarını oku: yaz kurak mı? Kış soğuk mu?';
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 700;
    font-size: 13.5px;
}
.ig-guesses li {
    display: grid;
    grid-template-columns: 20px 30px minmax(0, 1fr) auto auto auto 26px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 13.5px;
    font-weight: 800;
    animation: popIn .3s ease;
}
.ig-guesses li.ok { background: #dcfce7; grid-template-columns: 20px 30px minmax(0, 1fr) auto 26px; }
.ig-guesses img { border-radius: 3px; box-shadow: 0 0 0 1px #e2e8f0; }
.ig-g-n { color: #94a3b8; font-weight: 900; }
.ig-g-name { font-weight: 900; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-g-dist { color: #0f172a; white-space: nowrap; }
.ig-g-t { color: #dc2626; white-space: nowrap; }
.ig-g-p { color: #2563eb; white-space: nowrap; }
.ig-g-k { font-size: 18px; text-align: center; }
.ig-g-win { color: #15803d; font-weight: 900; }
@media (max-width: 520px) {
    .ig-guesses li { grid-template-columns: 18px 26px minmax(0, 1fr) auto 22px; row-gap: 2px; }
    .ig-g-dist { grid-column: 4; }
    .ig-g-k { grid-column: 5; grid-row: 1; }
    .ig-g-t, .ig-g-p { grid-row: 2; font-size: 12px; }
    .ig-g-t { grid-column: 3; }
    .ig-g-p { grid-column: 4 / span 2; text-align: right; }
}

/* ---------- İklim tipi seçenekleri ---------- */
.ig-type-q { font: 700 17px/1.3 var(--display); color: var(--navy); margin-bottom: 10px; }
.ig-type-options { display: grid; gap: 8px; }
.ig-type-opt {
    padding: 13px 14px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 900;
    font-size: 15px;
    text-align: left;
    color: var(--navy);
    transition: transform .15s, border-color .15s;
}
.ig-type-opt:hover:not(:disabled) { border-color: var(--gs-a); transform: translateY(-1px); }
.ig-type-opt.right { background: #dcfce7; border-color: #22c55e; color: #166534; }
.ig-type-opt.wrong { background: #fee2e2; border-color: #ef4444; color: #991b1b; }

/* ---------- Sonuç kartı ---------- */
.ig-reveal { animation: popIn .4s cubic-bezier(.2, 1.3, .5, 1); border: 3px solid #fde68a; }
.ig-reveal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.ig-reveal-head img { width: 48px; height: 32px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px #e2e8f0; }
.ig-reveal-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.ig-reveal h3 { font: 700 22px/1.15 var(--display); color: var(--navy); }
.ig-reveal-points { font: 700 24px var(--display); color: #16a34a; }
.ig-reveal-points.zero { color: #94a3b8; }
.ig-reveal-type { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: #ecfeff; color: #155e75; font-weight: 800; font-size: 14px; }
.ig-reveal-text { margin-top: 8px; color: #334155; font-weight: 700; font-size: 14px; line-height: 1.5; }
.ig-reveal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ig-reveal-actions .gs-btn { flex: 1 1 auto; }
.ig-next-daily { margin-top: 10px; text-align: center; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- İstatistik ---------- */
.ig-stats-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.ig-stats-tabs button { padding: 8px; border-radius: 10px; border: 2px solid #e2e8f0; background: #f8fafc; font-weight: 900; }
.ig-stats-tabs button.active { border-color: var(--gs-a); background: #ecfeff; color: #155e75; }
.ig-stats { margin: 8px 0 12px !important; }
.ig-dist { display: grid; gap: 4px; margin-bottom: 14px; }
.ig-dist-row { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 6px; font-weight: 900; color: var(--navy); }
.ig-dist-row i {
    display: block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--gs-a);
    color: #fff;
    font-style: normal;
    font-size: 12px;
    text-align: right;
}

/* ---------- Bildirim ---------- */
.gs-toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 400;
    transform: translateX(-50%);
    padding: 12px 18px;
    border-radius: 14px;
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    animation: popIn .25s ease;
}
.gs-toast[hidden] { display: none; }
