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

:root { --gs-a: #0d9488; --gs-b: #7c3aed; }

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

/* ---------- Harita paneli ---------- */
.sr-side {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 14px 14px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .7), transparent 45%),
        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;
}

.sr-map-wrap {
    position: relative;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 40%, #e0f2fe 0%, #bae6fd 70%, #93c5fd 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.sr-map { display: block; width: 100%; height: auto; aspect-ratio: 869.5 / 383.2; }

.sr-bg { fill: #cbd5e1; stroke: #94a3b8; stroke-width: .6; vector-effect: non-scaling-stroke; }
.sr-land {
    fill: #fff;
    stroke: #94a3b8;
    stroke-width: .6;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transition: fill .35s;
}
.sr-land.pick { fill: #5eead4; stroke: #134e4a; stroke-width: 1.2; }
.sr-land.ok { fill: #4ade80; stroke: #14532d; }
.sr-land.no { fill: #fdba74; stroke: #7c2d12; }
.sr-dot { fill: #0d9488; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sr-dot.ok { fill: #16a34a; }
.sr-dot.no { fill: #ea580c; }

.sr-pin { pointer-events: none; transform-box: fill-box; transform-origin: center; animation: popIn .35s cubic-bezier(.2, 1.4, .5, 1) both; }
.sr-pin circle { fill: var(--navy); stroke: #fff; }
.sr-pin.ok circle { fill: #15803d; }
.sr-pin.no circle { fill: #c2410c; }
.sr-pin text { fill: #fff; font-family: var(--display); font-weight: 700; text-anchor: middle; }

.sr-mascot {
    position: absolute;
    right: 8px;
    bottom: 6px;
    width: clamp(86px, 22%, 130px);
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(2, 20, 60, .3));
    animation: sway 3.6s ease-in-out infinite;
    pointer-events: none;
}

/* ---------- Sıralama alanı ---------- */
.sr-play {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 2px 2px 4px;
}

.sr-question {
    padding: 12px 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 6px 0 rgba(11, 42, 91, .25);
}
.sr-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
}
.sr-question h2 { margin-top: 6px; font: 700 clamp(17px, 2.3vw, 23px)/1.2 var(--display); color: var(--navy); }

.sr-board {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(8, 25, 60, .3);
}

.sr-end {
    justify-self: start;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 12.5px;
    font-weight: 900;
}

.sr-list { list-style: none; display: grid; gap: 8px; }

.sr-card {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 8px 8px 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 0 #99f6e4;
    color: var(--navy);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow .15s, background .2s;
}
.sr-card:hover { box-shadow: 0 4px 0 #0d9488; }
.sr-card.dragging {
    z-index: 5;
    cursor: grabbing;
    background: #f0fdfa;
    box-shadow: 0 16px 30px -8px rgba(19, 78, 74, .55);
    scale: 1.03;
}
.sr-pos { display: grid; place-items: center; min-width: 22px; color: #5eead4; font-size: 20px; line-height: 1; }
.sr-pos.rank {
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font: 700 14px/1 var(--display);
}
.sr-flag {
    width: 40px;
    height: 27px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .15);
    background: #e2e8f0;
    pointer-events: none;
    -webkit-user-drag: none;
}
.sr-name { min-width: 0; font-weight: 900; font-size: clamp(15px, 1.9vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-value { font-weight: 800; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.sr-arrows { display: flex; gap: 4px; }
.sr-arrow {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 13px;
    touch-action: manipulation;
}
.sr-arrow:hover { background: #ccfbf1; }

.sr-list.checked .sr-card { cursor: default; }
.sr-list.checked .sr-arrows { visibility: hidden; }
.sr-card.ok { background: #f0fdf4; box-shadow: 0 4px 0 #22c55e; }
.sr-card.ok .sr-pos.rank { background: #16a34a; }
.sr-card.no { background: #fff7ed; box-shadow: 0 4px 0 #fb923c; }
.sr-card.no .sr-pos.rank { background: #ea580c; }
.sr-list.checked .sr-value { color: var(--navy); }

.sr-help { color: rgba(255, 255, 255, .8); font-size: 12.5px; font-weight: 700; text-align: center; }

.sr-check {
    height: 54px;
    margin-top: auto;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gs-a), var(--gs-b));
    color: #fff;
    font: 700 19px/1 var(--display);
    box-shadow: 0 5px 0 #134e4a;
    flex: none;
}
.sr-check:hover:not(:disabled) { filter: brightness(1.07); }
.sr-check:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #134e4a; }
.sr-check[hidden] { display: none; }

/* Tur sonu kartı listenin üzerine binmesin: akışta kalır, alt kenara yapışır */
.sr-play .gs-round-end { position: sticky; bottom: 0; margin-top: auto; }

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 820px), (orientation: portrait) and (max-width: 1000px) {
    .sr-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 10px;
        padding: 10px;
    }
    .sr-side { padding: 46px 10px 10px; border-radius: 22px; }
    .sr-map-wrap { width: 100%; }
    .sr-mascot { width: 44px; top: 2px; bottom: auto; right: 12px; }
    .sr-side .gs-bubble { max-width: calc(100% - 84px); }
}

@media (max-width: 560px) {
    .sr-card { gap: 2px 8px; min-height: 50px; padding: 6px 6px 6px 8px; grid-template-columns: auto auto 1fr auto; }
    .sr-pos { grid-column: 1; grid-row: 1 / span 2; min-width: 16px; font-size: 18px; }
    .sr-flag { grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 24px; }
    .sr-name { grid-column: 3; grid-row: 1; font-size: 15px; }
    .sr-value { grid-column: 3; grid-row: 2; font-size: 12.5px; white-space: normal; }
    .sr-list:not(.checked) .sr-value { display: none; }
    .sr-list:not(.checked) .sr-name { grid-row: 1 / span 2; }
    .sr-arrows { grid-column: 4; grid-row: 1 / span 2; }
    .sr-arrow { width: 38px; height: 38px; }
    .sr-question { padding: 10px 12px; }
}

@media (max-height: 520px) and (orientation: landscape) {
    .sr-stage { grid-template-columns: 38% 1fr; grid-template-rows: none; gap: 8px; padding: 8px; }
    .sr-side { padding: 40px 8px 8px; }
    .sr-card { min-height: 40px; padding: 4px 6px; }
    .sr-arrow { width: 30px; height: 30px; }
    .sr-check { height: 44px; }
    .sr-help { display: none; }
}
