@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Modern, komoly sötét téma (Slate / Tailwind színek alapján) */
    --bg-body: #0f172a;      /* Nagyon sötét kék/szürke háttér */
    --bg-sidebar: #1e293b;   /* Kicsit világosabb oldalsáv */
    --bg-card: #1e293b;      /* Kártyák háttere */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent: #3b82f6;       /* Professzionális kék (Primary) */
    --accent-hover: #2563eb;
    
    --border: #334155;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-main);
}

/* --- APP LAYOUT (Oldalsáv + Főtartalom) --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Oldalsáv (Sidebar) */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.sidebar-header span {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.nav-item.admin {
    color: var(--danger);
}
.nav-item.admin:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border);
}

/* Fő tartalom (Main Content) */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
}

.content-header {
    margin-bottom: 2rem;
}

/* --- KÁRTYÁK ÉS PANELEK --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- GOMBOK --- */
.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

/* --- STATISZTIKA --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-box .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- TÁBLÁZAT (Ranglista) --- */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.modern-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

/* Eredmény színek */
.rank-1 td:first-child { color: var(--warning); font-weight: bold; }
.rank-2 td:first-child { color: #cbd5e1; font-weight: bold; }
.rank-3 td:first-child { color: #b45309; font-weight: bold; }

/* ============================================================================
   MULTIPLAYER — Lobby, Szoba (váróterem), Játék (időzítő, körök, eredmények)
   ============================================================================ */

/* --- Szoba-kód badge --- */
.room-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: var(--bg-body);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
}

.room-code-badge button {
    width: auto;
    font-size: 0.7rem;
    letter-spacing: 0;
    padding: 0.35rem 0.6rem;
}

/* --- Nyitott szobák táblázat / kártyalista --- */
.room-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.6rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.room-row .room-meta { font-size: 0.8rem; color: var(--text-muted); }

/* --- Beállítás-form apró elemek (rounds/time/difficulty) --- */
.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.mode-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* --- Játékos-lista a váróteremben --- */
.player-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
}

.player-row .p-info { display: flex; align-items: center; gap: 0.65rem; font-size: 0.92rem; font-weight: 500; }
.player-row img.p-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }

.ready-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
}
.ready-badge.is-ready { background-color: rgba(16, 185, 129, 0.12); color: var(--success); }
.ready-badge.is-waiting { background-color: rgba(148, 163, 184, 0.12); color: var(--text-muted); }
.host-star { color: var(--warning); font-size: 0.85rem; margin-left: 0.4rem; }

/* ============================================================================
   Immersive game screen (game.php) — timer, HUD, round result panel
   ============================================================================ */
body.game-body { margin: 0; padding: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #05070c; font-family: 'Inter', sans-serif; }

.game-topbar {
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    /* Fix: a z-index önmagában nem hat statikus (position nélküli) elemre —
       ezért a Google Maps/Street View belső, magas z-indexű elemei néha
       "átkattintották" a Kilépés linket. A position:relative teszi
       ténylegesen érvényessé a z-indexet, amit jóval a térkép fölé emelünk. */
    position: relative;
    z-index: 20;
    gap: 1rem;
}
.game-topbar .brand { font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 600; }
.game-topbar .brand span { color: var(--accent); }
.game-topbar a.exit-link { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.game-topbar a.exit-link:hover { color: var(--text-main); }

.round-hud {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timer-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 58px;
    justify-content: center;
}
.timer-pill.low-time { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); animation: pulseTimer 1s infinite; }
@keyframes pulseTimer { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

#streetview-container { flex: 1; width: 100%; background: #111; min-height: 0; position: relative; z-index: 1; overflow: hidden; }
#map-container { height: 38vh; width: 100%; position: relative; z-index: 1; background: #222; border-top: 3px solid var(--accent); overflow: hidden; }

#ui-container {
    height: 64px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-top: 1px solid var(--border);
    /* Fix: ugyanaz mint a .game-topbar-nál — hogy a Kilépés link és a
       Tippelés gomb itt se kerülhessen a térkép belső elemei mögé. */
    position: relative;
    z-index: 20;
}
#ui-container a { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
#ui-container a:hover { color: var(--text-main); }
.game-btn { width: auto; padding: 0.7rem 2.2rem; font-weight: 600; }

.overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(5, 7, 12, 0.82);
    z-index: 9998;
}

#resultModal, .round-panel {
    display: none;
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    z-index: 9999;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
    width: 92%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
}
#resTitle { color: var(--accent); font-size: 1.3rem; }
#resName { margin: 1rem 0 0.25rem; font-weight: 700; }
#resDistance { font-size: 1rem; color: var(--text-muted); }
#resPoints { font-size: 3rem; margin: 0.75rem 0 0; color: var(--text-main); font-family: 'Poppins', sans-serif; }

.waiting-panel {
    display: none;
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: 1.75rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    z-index: 9999;
    text-align: center;
    min-width: 260px;
}
.waiting-spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.round-result-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; text-align: left; }
.round-result-table th, .round-result-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--border); }
.round-result-table th { color: var(--text-muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }
.round-result-table tr:first-child td { color: var(--success); font-weight: 700; }

.final-leaderboard { list-style: none; margin-top: 0.75rem; text-align: left; }
.final-leaderboard li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}
.final-leaderboard li:first-child { border-color: var(--warning); }
.final-leaderboard li:first-child .fl-name { color: var(--warning); font-weight: 700; }

#userSearch {
  width: 100%;
  max-width: 350px;
  padding: 12px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: #334155;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 9999px; /* Teljesen lekerekített (pill) forma */
  outline: none;
  margin-left: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Placeholder színe */
#userSearch::placeholder {
  color: #94a3b8;
  font-style: italic;
}

/* Fókusz (aktív) állapot */
#userSearch:focus {
  background-color: #ffffff;
  border-color: #6366f1; /* Modern indigó szín */
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Hover (egérrel fölötte) állapot, ha nincs fókuszban */
#userSearch:hover:not(:focus) {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  background-color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  color: #05070c;
}

.form-control:hover:not(:focus) {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

#joinCode {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background-color: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="checkbox"]:checked {
  background-color: #6366f1;
  border-color: #6366f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
}

/* ============================================================================
   MOBIL / RESZPONZÍV OPTIMALIZÁCIÓ — csak CSS, HTML módosítás nélkül
   Elv: a .sidebar-nav egy sticky, vízszintesen görgethető "tab bar"-rá alakul
   mobilon (nem oldalra kicsúszó menü, hanem fixen a tetején maradó, szépen
   megoldott chip-sor), így nincs szükség hamburger gombra vagy JS-re.
   ============================================================================ */

/* Alap védelem: ne legyen oldalra görgethető az egész oldal, és a betűk
   ne skálázódjanak automatikusan iOS-en */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    overflow-x: hidden;
}

/* --- Táblázatok: pure CSS vízszintes görgetés a <table> elemen magán,
   hogy a keskeny mobil képernyőn se törjön el a Ranglista / Round result --- */
@media (max-width: 768px) {
    .modern-table,
    .round-result-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: thin;
    }
    .modern-table thead,
    .modern-table tbody,
    .modern-table tr,
    .round-result-table thead,
    .round-result-table tbody,
    .round-result-table tr {
        display: table;
        width: 100%;
        table-layout: auto;
    }
}

/* ===================== FŐ TÖRÉSPONT: TABLET / MOBIL (<=768px) ===================== */
@media (max-width: 768px) {

    .app-wrapper {
        flex-direction: column;
    }

    /* --- Sidebar -> sticky felső sáv --- */
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 30;
        flex-direction: column;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .sidebar-header {
        padding: 0.9rem 1.25rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-header h2 {
        font-size: 1.15rem;
    }

    /* --- A navigáció vízszintesen görgethető chip-sorrá alakul,
       "safe" megoldás: jól látható elválasztás, snap-elés, elrejtett
       scrollbar, elmosódó szél jelzi hogy van tovább tartalom --- */
    .sidebar-nav {
        flex-direction: row;
        flex: none;
        padding: 0.6rem 0.9rem;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        padding-bottom: 0.9rem;
        -ms-overflow-style: none;
        mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    }
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 0.6rem 0.9rem;
        white-space: nowrap;
        font-size: 0.88rem;
    }

    /* --- Lábléc: kompaktabb, elválasztva a tartalomtól --- */
    .sidebar-footer {
        padding: 0.75rem 1.25rem;
        border-top: 1px solid var(--border);
    }

    /* --- Fő tartalom --- */
    .main-content {
        height: auto;
        padding: 1.25rem 1rem 2rem;
    }

    .content-header {
        margin-bottom: 1.25rem;
    }

    .card {
        padding: 1.1rem;
        border-radius: 10px;
    }

    /* --- Statisztika: 3 oszlopból 3 marad, de szűkebb paddinggel,
       ha valamiért kevés a hely, tördelődhet --- */
    .stat-grid {
        gap: 0.6rem;
    }
    .stat-box {
        padding: 0.75rem 0.5rem;
    }
    .stat-box .value {
        font-size: 1.25rem;
    }

    /* --- Gombok: nagyobb érintési felület (min. ajánlott 44px) --- */
    .btn-primary {
        padding: 0.8rem 1.4rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
    }

    /* --- Multiplayer: szoba-kód, sorok --- */
    .room-code-badge {
        font-size: 1.05rem;
        letter-spacing: 2px;
        width: 100%;
        justify-content: center;
    }
    .room-row {
        padding: 0.75rem 0.9rem;
    }
    .player-row .p-info {
        font-size: 0.88rem;
    }

    /* --- Beviteli mezők: 16px alatt iOS automatikusan zoomol fókuszra,
       ezért itt mindenhol legalább 16px a betűméret --- */
    #userSearch,
    .form-control,
    #joinCode {
        font-size: 16px;
        margin-left: 0;
    }
    #userSearch {
        max-width: 100%;
        width: 100%;
    }

    input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    /* --- Játék képernyő (game.php) mobilon --- */
    .game-topbar {
        padding: 0 0.9rem;
        height: 50px;
        gap: 0.6rem;
        padding-top: env(safe-area-inset-top, 0);
        height: calc(50px + env(safe-area-inset-top, 0px));
    }
    .game-topbar .brand {
        font-size: 0.92rem;
    }
    .round-hud {
        font-size: 0.75rem;
        gap: 0.6rem;
    }
    .timer-pill {
        font-size: 0.85rem;
        padding: 0.25rem 0.6rem;
        min-width: 48px;
    }

    #map-container {
        height: 34vh;
    }

    #ui-container {
        height: 60px;
        padding: 0 1rem;
        padding-bottom: env(safe-area-inset-bottom, 0);
        height: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    .game-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.92rem;
    }

    #resultModal, .round-panel, .waiting-panel {
        width: 90%;
        padding: 1.5rem 1.25rem;
        max-height: 80vh;
    }
    #resPoints {
        font-size: 2.4rem;
    }
}

/* ===================== KIS MOBIL (<=480px) ===================== */
@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    .sidebar-header {
        padding: 0.75rem 1rem;
    }
    .sidebar-header h2 {
        font-size: 1.05rem;
    }

    .nav-item {
        padding: 0.55rem 0.75rem;
        font-size: 0.82rem;
        gap: 0.5rem;
    }

    .main-content {
        padding: 1rem 0.75rem 1.5rem;
    }

    /* --- Statisztika: itt már 2 oszlopra vált, hogy ne préselődjön össze --- */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-box:only-child,
    .stat-grid > .stat-box:first-child:nth-last-child(3) {
        grid-column: span 1;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .room-row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .room-row .btn-primary {
        margin-top: 0.4rem;
    }

    .settings-row {
        grid-template-columns: 1fr;
    }

    .room-code-badge {
        font-size: 0.95rem;
        letter-spacing: 1.5px;
        padding: 0.55rem 0.85rem;
    }

    #joinCode {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }

    /* --- Játék képernyő: még kompaktabb HUD --- */
    .game-topbar .brand {
        font-size: 0.85rem;
    }
    .round-hud {
        gap: 0.4rem;
        font-size: 0.7rem;
    }
    .timer-pill {
        font-size: 0.78rem;
        padding: 0.2rem 0.5rem;
        min-width: 42px;
    }
    #map-container {
        height: 32vh;
    }
    .game-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.85rem;
    }

    #resultModal, .round-panel, .waiting-panel {
        width: 94%;
        padding: 1.25rem 1rem;
    }
    #resTitle {
        font-size: 1.1rem;
    }
    #resPoints {
        font-size: 2rem;
    }

    .final-leaderboard li {
        padding: 0.5rem 0.65rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
}

/* ===================== MOBIL FEKVŐ (landscape) A JÁTÉK KÉPERNYŐN =====================
   Alacsony magasságú, fekvő nézetben (pl. telefon oldalra fordítva játék közben)
   a térkép ne foglaljon túl sok függőleges helyet a Street View rovására. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .game-topbar {
        height: 42px;
    }
    #ui-container {
        height: 52px;
    }
    #map-container {
        height: 45vh;
        max-height: 220px;
    }
    #resultModal, .round-panel, .waiting-panel {
        max-height: 90vh;
        padding: 1rem 1.25rem;
    }
}