/* GeoGames — Dünya Tarım Kartları (oyuna özel stiller; ortak parçalar /shared/gs-game.css) */

:root { --gs-a: #15803d; --gs-b: #ca8a04; }

.uk-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 34%);
    gap: 14px;
    padding: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Harita ---------- */
.uk-map-panel {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 56px 12px 40px;
    border-radius: 26px;
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
    border: 4px solid rgba(255, 255, 255, .85);
    box-shadow: 0 16px 36px -14px rgba(2, 20, 60, .6);
    overflow: hidden;
}
.uk-map { display: block; width: 100%; height: auto; max-height: 100%; user-select: none; -webkit-user-select: none; }
.uk-map.zoomed { touch-action: none; cursor: grab; }
.uk-map.zoomed .uk-prov { stroke-width: calc(.45px / var(--z, 1)); }
.uk-map.zoomed .uk-bg { stroke-width: calc(.4px / var(--z, 1)); }
.uk-map.zoomed .uk-prov.chosen { stroke-width: calc(2px / var(--z, 1)); }
.uk-map.zoomed .uk-prov.chosen-region { stroke-width: calc(.9px / var(--z, 1)); }
.uk-map.zoomed .uk-label { font-size: calc(12px / var(--z, 1)); stroke-width: calc(3px / var(--z, 1)); }

.uk-zoom {
    position: absolute;
    right: 12px;
    bottom: 6px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.uk-zoom button {
    width: 34px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
    color: var(--navy);
    font: 900 22px/1 var(--ui);
    box-shadow: 0 3px 0 rgba(11, 42, 91, .25);
    touch-action: manipulation;
}
.uk-zoom button:disabled { opacity: .45; }

.uk-bg { fill: #cbd5e1; stroke: #94a3b8; stroke-width: .4; pointer-events: none; }

.uk-prov {
    fill: #fefce8;
    stroke: #64748b;
    stroke-width: .45;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill .3s;
}
.uk-prov:hover { fill: #fde68a; }

/* Kıta modu: her kıta farklı tonda (düğmelerle aynı renkler) */
.uk-prov.cont-0, .uk-region-btn.cb-0::before { fill: #fde68a; background: #fde68a; }
.uk-prov.cont-1, .uk-region-btn.cb-1::before { fill: #bfdbfe; background: #bfdbfe; }
.uk-prov.cont-2, .uk-region-btn.cb-2::before { fill: #fed7aa; background: #fed7aa; }
.uk-prov.cont-3, .uk-region-btn.cb-3::before { fill: #bbf7d0; background: #bbf7d0; }
.uk-prov.cont-4, .uk-region-btn.cb-4::before { fill: #ddd6fe; background: #ddd6fe; }
.uk-prov.cont-5, .uk-region-btn.cb-5::before { fill: #fecdd3; background: #fecdd3; }
.uk-prov.hover { fill: #f59e0b; stroke: #78350f; }

/* Isı haritası */
.uk-prov.heat-0 { fill: #f8fafc; }
.uk-prov.heat-1, .uk-legend .l1 { fill: #ecfccb; background: #ecfccb; }
.uk-prov.heat-2, .uk-legend .l2 { fill: #bef264; background: #bef264; }
.uk-prov.heat-3, .uk-legend .l3 { fill: #84cc16; background: #84cc16; }
.uk-prov.heat-4, .uk-legend .l4 { fill: #4d7c0f; background: #4d7c0f; }
.uk-prov.heat-5, .uk-legend .l5 { fill: #1a2e05; background: #1a2e05; }
.uk-prov.chosen { stroke: #dc2626; stroke-width: 2; }
.uk-prov.chosen-region { stroke: #dc2626; stroke-width: .9; }

.uk-label {
    font: 800 12px var(--ui);
    fill: var(--navy);
    text-anchor: middle;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 3px;
    stroke-linejoin: round;
    pointer-events: none;
}

.uk-legend {
    position: absolute;
    left: 12px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--navy);
}
.uk-legend[hidden] { display: none; }
.uk-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }

/* ---------- Yan panel ---------- */
.uk-side {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 2px 2px 4px;
}

.uk-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff 0%, #fefce8 100%);
    border: 3px solid #fde047;
    box-shadow: 0 6px 0 rgba(161, 98, 7, .35), 0 16px 30px -16px rgba(2, 20, 60, .6);
}
.uk-card.flip { animation: cardIn .45s cubic-bezier(.2, 1.3, .5, 1); }
@keyframes cardIn { from { transform: rotateY(80deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.uk-card-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 0 0 2px #fde68a;
    font-size: 38px;
}
.uk-card-group { font-size: 11.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #a16207; }
.uk-card-name { font: 700 clamp(20px, 2.6vw, 26px)/1.1 var(--display); color: var(--navy); margin: 2px 0 4px; }
.uk-card-total { font-size: 13px; font-weight: 800; color: var(--muted); }

.uk-question { color: #fff; font-weight: 800; font-size: 14px; line-height: 1.4; }

.uk-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.uk-regions[hidden] { display: none; }
.uk-region-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    min-height: 42px;
    padding: 6px 10px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 4px 0 rgba(11, 42, 91, .25);
    touch-action: manipulation;
}
.uk-region-btn::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(11, 42, 91, .25); }
.uk-region-btn:hover:not(:disabled) { background: #fef3c7; }
.uk-region-btn.ok { background: #22c55e; color: #fff; }
.uk-region-btn.no { background: #fca5a5; color: #7f1d1d; }
.uk-region-btn:disabled:not(.ok):not(.no) { opacity: .55; }

.uk-result {
    padding: 12px 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 0 rgba(11, 42, 91, .22);
}
.uk-result[hidden] { display: none; }
.uk-result h3 { font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.uk-result h3 + * { margin-bottom: 10px; }
.uk-top { list-style: none; counter-reset: t; display: grid; gap: 4px; }
.uk-top li {
    counter-increment: t;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px 5px 30px;
    position: relative;
    border-radius: 10px;
    background: #f7fee7;
    font-size: 13.5px;
}
.uk-top li::before {
    content: counter(t);
    position: absolute;
    left: 8px;
    font-weight: 900;
    color: #4d7c0f;
}
.uk-top-name { display: flex; align-items: center; gap: 6px; font-weight: 900; color: var(--navy); min-width: 0; }
.uk-flag { flex: none; width: 20px; height: 14px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }

.uk-tr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 10px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 900;
}
.uk-tr[hidden] { display: none; }
.uk-tr.gold { background: #fef3c7; color: #92400e; }
.uk-top-val { font-weight: 700; color: var(--muted); white-space: nowrap; }

.uk-bars { display: grid; gap: 4px; }
.uk-bar { display: grid; grid-template-columns: 124px 1fr 52px; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--navy); }
.uk-bar-track { height: 10px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.uk-bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #84cc16, #4d7c0f); }
.uk-bar-val { text-align: right; color: var(--muted); }

/* Tur sonu kartı üretim listesinin üstüne binmesin: akış içinde, listenin üstünde ve kompakt durur.
   Önceden yapışkan (sticky) kart "En çok üreten 5" listesini ve payları kapatıyordu. */
.uk-side .gs-round-end { position: static; order: 1; padding: 0; flex-shrink: 0; }
.uk-side #result-box { order: 2; }
.uk-side .gs-round-card { padding: 10px 14px; gap: 4px 12px; border-width: 3px; border-radius: 18px; box-shadow: 0 8px 20px -10px rgba(2, 20, 60, .6); }
.uk-side .gs-round-card > img { width: 48px; height: 48px; }
.uk-side .gs-round-title { font-size: 17px; }
.uk-side .gs-round-answer { font-size: 15px; margin-top: 2px; }
.uk-side .gs-round-points { font-size: 22px; }
.uk-side .gs-next { height: 44px; }
/* Cevap verildikten sonra soru metnine gerek yok: yer listeye kalsın */
.uk-side:has(.gs-round-end:not([hidden])) .uk-question { display: none; }

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
    .uk-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; padding: 10px; }
    .uk-map-panel { padding: 50px 8px 34px; border-radius: 22px; }
}

@media (max-width: 560px) {
    .uk-card { padding: 10px 12px; gap: 10px; }
    .uk-card-icon { width: 52px; height: 52px; font-size: 30px; }
    .uk-bar { grid-template-columns: 96px 1fr 46px; font-size: 11.5px; }
    .uk-region-btn { font-size: 13px; }
    .uk-label { font-size: 20px; stroke-width: 4px; }
    .uk-map.zoomed .uk-label { font-size: calc(20px / var(--z, 1)); stroke-width: calc(4px / var(--z, 1)); }
    .uk-prov.chosen { stroke-width: 2.5; }
    .uk-zoom { right: 8px; bottom: 4px; }
}

@media (max-height: 520px) and (orientation: landscape) {
    .uk-stage { grid-template-columns: 1fr 42%; grid-template-rows: none; gap: 8px; padding: 8px; }
    .uk-map-panel { padding: 44px 8px 30px; }
}
