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

:root { --gs-a: #65a30d; --gs-b: #d97706; }

.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%; }

.uk-prov {
    fill: #fefce8;
    stroke: #94a3b8;
    stroke-width: 1;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill .3s;
}
.uk-prov:hover { fill: #fde68a; }

/* Bölge modu: her bölge hafif farklı tonda */
.uk-prov.reg-0 { fill: #fef3c7; }
.uk-prov.reg-1 { fill: #e0f2fe; }
.uk-prov.reg-2 { fill: #ffedd5; }
.uk-prov.reg-3 { fill: #fef9c3; }
.uk-prov.reg-4 { fill: #dcfce7; }
.uk-prov.reg-5 { fill: #ede9fe; }
.uk-prov.reg-6 { fill: #fee2e2; }
.uk-prov.hover { fill: #fcd34d; stroke: #92400e; }

/* 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: 3; }
.uk-prov.chosen-region { stroke: #dc2626; stroke-width: 1.6; }

.uk-label {
    font: 800 15px var(--ui);
    fill: var(--navy);
    text-anchor: middle;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 4px;
    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 {
    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: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 { font-weight: 900; color: var(--navy); }
.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: 118px 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); }

.uk-side .gs-round-end { position: sticky; bottom: 0; margin-top: auto; }

/* ---------- 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: 22px; }
}

@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; }
}
