* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #141a24;
    color: #e8ecf2;
    -webkit-tap-highlight-color: transparent;
}

#app { height: 100%; }

.boot-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8fa3bd;
}
.boot-screen h1 { letter-spacing: 6px; color: #e8ecf2; }

.menu-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    position: relative;
    /* Średniowieczna grafika tła + ciemny gradient dla czytelności menu */
    background:
        linear-gradient(180deg, rgba(16,12,8,0.5) 0%, rgba(13,10,6,0.7) 55%, rgba(9,7,4,0.9) 100%),
        url('../img/background/Background_v1.png') center/cover no-repeat #141a24;
}
/* Winieta wzmacniająca skupienie na karcie menu */
.menu-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.menu-screen > * { position: relative; z-index: 1; }

.logo {
    font-size: 42px;
    letter-spacing: 10px;
    font-weight: 800;
    background: linear-gradient(180deg, #ffe6a0, #d68a2e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.logo.small { font-size: 26px; letter-spacing: 6px; }
.tagline { color: #e7d3ab; margin-bottom: 18px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }

.menu-card {
    width: min(360px, 92vw);
    background: linear-gradient(180deg, rgba(34,27,18,0.95), rgba(23,18,12,0.97));
    border: 1px solid #6b532e;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 215, 140, 0.06);
    backdrop-filter: blur(2px);
}
.menu-card .input {
    background: #17130c;
    border-color: #4a3a20;
}
.menu-card .divider { color: #9a7d4f; }

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #33445f;
    background: #121926;
    color: #e8ecf2;
    font-size: 16px;
}
.input.code { text-transform: uppercase; letter-spacing: 4px; text-align: center; }

.menu-row { display: flex; align-items: center; gap: 10px; color: #8fa3bd; font-size: 14px; }
.menu-row input[type=range] { flex: 1; }
.menu-row .value { min-width: 24px; text-align: right; color: #e8ecf2; font-weight: 600; }

.join-row { display: flex; gap: 8px; }
.join-row .input { flex: 1; }

.btn {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #33445f;
    background: #24314a;
    color: #e8ecf2;
    font-size: 15px;
    cursor: pointer;
    touch-action: manipulation;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #d68a2e, #b06a18); border-color: #e9a94f; font-weight: 700; }
.btn.wide { width: 100%; }
.btn.active { outline: 2px solid #ffd97a; }
.btn.danger, .hud-btn.danger { border-color: #7c2f2f; background: #3a1d1d; }
.btn.ghost { background: transparent; border-color: #33445f; color: #8fa3bd; }
.btn.ghost:hover { color: #e8ecf2; border-color: #5f6f8c; }

.divider { text-align: center; color: #5c6f8c; font-size: 13px; }
.error { color: #ff7b6b; font-size: 14px; }
.hint { color: #8fa3bd; font-size: 13px; }

.lobby-code { font-size: 18px; }
.lobby-code strong { letter-spacing: 4px; color: #ffd97a; }
.lobby-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lobby-list li { display: flex; align-items: center; gap: 8px; }

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.game-root { position: relative; height: 100%; }

#game-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    display: block;
}

.hud-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: linear-gradient(180deg, rgba(10,14,20,0.9), rgba(10,14,20,0));
    pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.hud-item { font-size: 15px; font-weight: 600; white-space: nowrap; }
.hud-item small { color: #9fdc8f; font-weight: 400; }
.hud-item.gold { color: #ffd97a; }
.hud-item.sudden { color: #ff7b6b; animation: pulse 1s infinite; }
.hud-spacer { flex: 1; }

.hud-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #33445f;
    background: rgba(28, 37, 52, 0.85);
    color: #e8ecf2;
    font-size: 13px;
    cursor: pointer;
}

/* ---------- Przełącznik języka (flaga + lista) ---------- */
.lang-switch { position: relative; display: inline-block; }
.lang-switch.on-menu { position: fixed; top: 14px; right: 14px; z-index: 30; }

.lang-flag {
    font-size: 20px;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid #33445f;
    background: rgba(28, 37, 52, 0.85);
    cursor: pointer;
}
.lang-flag:hover { border-color: #4a6ea8; }

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1c2534;
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: none;
    border-radius: 7px;
    background: none;
    color: #e8ecf2;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.lang-option:hover { background: #26324a; }
.lang-option.active { background: #34507e; font-weight: 600; }

/* ---------- Ustawienia w HUD (koło zębate) ---------- */
.settings-wrap { position: relative; }
.hud-btn.gear { font-size: 16px; line-height: 1; padding: 5px 10px; }
.hud-btn.gear.active { border-color: #ffd97a; }
.settings-backdrop { position: fixed; inset: 0; z-index: 24; }
.settings-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 25;
    background: #1c2534;
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
.settings-langrow { display: flex; gap: 4px; justify-content: space-between; }
.settings-flag {
    flex: 1;
    font-size: 20px;
    line-height: 1;
    padding: 6px 0;
    border: 1px solid #33445f;
    border-radius: 8px;
    background: #17202e;
    cursor: pointer;
}
.settings-flag.active { border-color: #ffd97a; background: #26324a; }
.settings-item {
    padding: 10px 12px;
    border: 1px solid #33445f;
    border-radius: 8px;
    background: #24314a;
    color: #e8ecf2;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.settings-item:hover { border-color: #5f6f8c; }
.settings-item.danger { border-color: #7c2f2f; background: #3a1d1d; }
.lang-flag-sm { font-size: 17px; }

.domination-bar {
    position: absolute;
    top: 46px; left: 50%;
    transform: translateX(-50%);
    width: min(340px, 80vw);
    background: rgba(28, 37, 52, 0.9);
    border: 1px solid #7c2f2f;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 13px;
    text-align: center;
}
.domination-bar .bar { height: 6px; background: #121926; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.domination-bar .fill { height: 100%; background: linear-gradient(90deg, #d68a2e, #ff7b6b); }

.players-legend {
    position: absolute;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    background: rgba(10, 14, 20, 0.6);
    border-radius: 8px;
    padding: 6px 8px;
    max-height: 40vh;
    overflow-y: auto;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item .dot { width: 9px; height: 9px; }
.legend-item.dead { opacity: 0.4; text-decoration: line-through; }
.legend-item .legend-score { margin-left: auto; padding-left: 10px; color: #ffd97a; font-weight: 700; font-variant-numeric: tabular-nums; }

.spectate-badge {
    position: absolute;
    top: 52px; left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 37, 52, 0.9);
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 5px 14px;
    font-size: 13px;
    z-index: 15;
    pointer-events: none;
}

/* Baner trybu punktu zbornego (widoczna instrukcja po long-pressie osady) */
.rally-badge {
    position: absolute;
    top: 52px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 92vw;
    background: linear-gradient(180deg, rgba(58, 44, 20, 0.95), rgba(40, 30, 14, 0.95));
    border: 1px solid #b98a3a;
    color: #ffe6a0;
    border-radius: 10px;
    padding: 8px 10px 8px 14px;
    font-size: 14px;
    font-weight: 600;
    z-index: 18;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    animation: pulse 1.4s infinite;
}
.rally-cancel-x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 230, 160, 0.4);
    background: rgba(0, 0, 0, 0.3);
    color: #ffe6a0;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.rally-cancel-x:hover { background: rgba(0, 0, 0, 0.55); }

.panel {
    position: absolute;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(300px, 92vw);
    background: rgba(28, 37, 52, 0.95);
    border: 1px solid #33445f;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.panel h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.panel .close { background: none; border: none; color: #8fa3bd; font-size: 16px; cursor: pointer; }

.tech-panel { bottom: auto; top: 52px; }
.btn.tech.owned { border-color: #3f7a46; color: #9fdc8f; }

.tech-item { display: flex; flex-direction: column; gap: 3px; }
.tech-desc { margin: 0 2px; color: #8fa3bd; font-size: 12px; }

.recruit-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.btn.recruit { padding: 8px 4px; font-size: 14px; line-height: 1.3; position: relative; overflow: hidden; }
.btn.recruit small { color: #ffd97a; font-size: 11px; }
.btn.recruit .recruit-content { position: relative; z-index: 1; }
.btn.recruit.dim { opacity: 0.4; }
.btn.recruit.cooling { color: #8fa3bd; }
.cd-fill {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 0;
    background: rgba(255, 217, 122, 0.32);
    border-top: 1px solid rgba(255, 217, 122, 0.6);
    z-index: 0;
    animation-name: cdfill;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
@keyframes cdfill { from { height: 0; } to { height: 100%; } }

.panel-label { font-size: 11px; color: #8fa3bd; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.production-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.btn.prod { padding: 8px 4px; font-size: 12px; line-height: 1.25; }
.btn.prod.active { border-color: #ffd97a; background: #3a3320; color: #ffd97a; }

.battle-panel { bottom: auto; top: 52px; left: 8px; right: auto; width: min(280px, 92vw); border-color: #7c2f2f; }
.battle-side { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.battle-side .dot { width: 11px; height: 11px; }
.side-tag { font-size: 11px; color: #8fa3bd; min-width: 44px; }
.battle-vs { text-align: center; color: #ff7b6b; font-weight: 700; font-size: 13px; }
.ubadge { background: #121926; border: 1px solid #33445f; border-radius: 6px; padding: 2px 7px; font-size: 13px; font-weight: 600; }
.ubadge.empty { color: #5c6f8c; }

.toasts {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    pointer-events: none;
    width: min(420px, 90vw);
}
.toast {
    background: rgba(28, 37, 52, 0.92);
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    animation: fadein 0.25s;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.end-card {
    position: relative;
    background: #1c2534;
    border: 1px solid #33445f;
    border-radius: 16px;
    padding: 28px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.end-close {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 3;                              /* nad banerem — zawsze klikalny/widoczny */
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(12, 16, 22, 0.72);
    border: 1px solid rgba(255, 215, 140, 0.4);
    color: #f0e6d0;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.end-close:hover { background: rgba(34, 46, 62, 0.92); color: #fff; }
.end-card h2 { font-size: 26px; }
.end-card h2.win { color: #f1c40f; }
.end-card h2.lose { color: #e07a7a; }

/* ---------- Tablica wyników (styl AoE2) ---------- */
.stats-card {
    width: min(920px, 94vw);
    max-height: 88vh;
    padding: 22px 24px;
}

/* Baner zwycięstwa/porażki na górze okna wyników (klimat średniowieczny) */
.end-banner {
    position: relative;
    height: 155px;
    margin: -22px -24px 8px;
    border-radius: 16px 16px 0 0;
    background-size: cover;
    background-position: center 35%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px rgba(180, 140, 70, 0.35);
}
.end-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(15, 11, 7, 0.92) 100%);
}
.end-title {
    position: relative;
    margin: 0 0 10px;
    font-size: 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.8);
}
.end-title.win { color: #ffe6a0; }
.end-title.lose { color: #f0b6a6; }
@media (max-width: 520px) {
    .stats-card { padding: 18px 16px; }
    .end-banner { height: 118px; margin: -18px -16px 8px; }
    .end-title { font-size: 22px; }
}

.stats-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}
.stats-tab {
    background: #26324a;
    border: 1px solid #33445f;
    color: #cdd7e6;
    padding: 8px 16px;
    border-radius: 10px 10px 0 0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.stats-tab:hover { background: #2f3d5a; }
.stats-tab.active {
    background: #34507e;
    border-color: #4a6ea8;
    color: #fff;
    font-weight: 600;
}

.stats-scroll {
    overflow: auto;
    border: 1px solid #33445f;
    border-radius: 8px;
    max-height: 56vh;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}
.stats-table th, .stats-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #263041;
}
.stats-table thead th {
    position: sticky;
    top: 0;
    background: #232f45;
    color: #9db2d4;
    font-weight: 600;
    z-index: 1;
}
.stats-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.stats-table tbody tr:hover { background: rgba(74, 110, 168, 0.12); }
.stats-table tr.you { background: rgba(241, 196, 15, 0.10); }
.stats-table tr.you:hover { background: rgba(241, 196, 15, 0.16); }

.stats-table .name-col {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 7px;
}
.stats-table .name-col .dot { width: 11px; height: 11px; }
.stats-table .name-col .dead { text-decoration: line-through; opacity: 0.6; }
.stats-table .name-col .crown, .stats-table .name-col .botmark { font-size: 12px; }
.stats-table td.total { font-weight: 700; color: #f1c40f; }
.stats-table td.score { color: #ffd97a; font-size: 15px; }

#blazor-error-ui {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #7c2f2f;
    padding: 10px 16px;
    z-index: 100;
}

@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Modal "Jak grać" ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
}
.help-card {
    width: min(680px, 96vw);
    max-height: 92vh;
    background: #1c2534;
    border: 1px solid #33445f;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2c3a52;
}
.help-head h2 { font-size: 20px; }
.help-head .close { background: none; border: none; color: #8fa3bd; font-size: 20px; cursor: pointer; }
.help-body { overflow-y: auto; padding: 6px 20px 12px; }
.help-body section { margin: 16px 0; }
.help-body h3 { font-size: 16px; margin-bottom: 6px; color: #ffd97a; }
.help-body p { color: #c4cede; font-size: 14px; line-height: 1.5; }
.help-body ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.help-body li { color: #c4cede; font-size: 14px; line-height: 1.45; padding-left: 16px; position: relative; }
.help-body li::before { content: "•"; color: #d68a2e; position: absolute; left: 2px; }
.help-body strong { color: #e8ecf2; }
.help-card > .btn.primary { margin: 12px 20px 18px; }
.counter-line { color: #ffd97a !important; font-weight: 600; margin-bottom: 10px; }

.unit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0; }
.unit-card { background: #151d2a; border: 1px solid #2c3a52; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.unit-card__img { background: #101722; aspect-ratio: 5 / 6; }
.unit-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unit-card__body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.unit-card__title { font-weight: 700; font-size: 14px; }
.unit-card__desc { font-size: 12px; color: #a9b6c9; line-height: 1.4; }
.unit-card__counter { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; font-size: 11px; }
.unit-card__counter .strong { color: #9fdc8f; }
.unit-card__counter .weak { color: #ff9a8a; }

/* Jednostki neutralne: kwadratowy kadr z ramką — zawsze cały widoczny; karta na całą szerokość */
.unit-card--wide { grid-column: 1 / -1; flex-direction: row; }
.unit-card--wide .unit-card__img { width: min(280px, 42%); flex-shrink: 0; aspect-ratio: 1 / 1; }
.unit-card--wide .unit-card__img img { object-fit: contain; }
.unit-card--wide .unit-card__body { flex: 1; justify-content: center; }

@media (max-width: 520px) {
    .unit-cards { grid-template-columns: 1fr; }
    /* Piechota/kawaleria/łucznicy: obok tekstu, ale cała ramka widoczna (contain, nie crop) */
    .unit-card { flex-direction: row; align-items: stretch; }
    .unit-card__img { width: 40%; max-width: 150px; flex-shrink: 0; aspect-ratio: 5 / 6; }
    .unit-card__img img { object-fit: contain; }
    .unit-card__body { flex: 1; justify-content: center; }

    /* Jednostki neutralne (kwadratowy kadr): napis POD obrazkiem, cały kadr widoczny */
    .unit-card--wide { flex-direction: column; }
    .unit-card--wide .unit-card__img { width: 100%; max-width: none; aspect-ratio: auto; height: min(52vw, 240px); }
}

/* ---------- Konta, ranking, matchmaking, sojusze ---------- */
.profile-chip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #121926;
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
}
.profile-name { font-weight: 700; }
.profile-elo { color: #ffd97a; font-weight: 700; }
.profile-record { color: #8fa3bd; font-size: 12px; }
.profile-chip .btn.mini { margin-left: auto; }
.btn.mini { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

.auth-tabs { display: flex; gap: 4px; background: #121926; border-radius: 10px; padding: 4px; }
.auth-tabs .tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    border-radius: 7px;
    background: none;
    color: #8fa3bd;
    font-size: 13px;
    cursor: pointer;
}
.auth-tabs .tab.active { background: #24314a; color: #e8ecf2; font-weight: 600; }

.ranked-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.queue-card {
    background: #1c2534;
    border: 1px solid #33445f;
    border-radius: 16px;
    padding: 26px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(360px, 92vw);
}
.queue-card h2 { font-size: 20px; }
.queue-mode { color: #ffd97a; font-weight: 700; }
.queue-spinner {
    width: 42px; height: 42px;
    margin: 4px auto;
    border: 4px solid #33445f;
    border-top-color: #d68a2e;
    border-radius: 50%;
    animation: qspin 0.9s linear infinite;
}
@keyframes qspin { to { transform: rotate(360deg); } }
.hint.warn { color: #ffd97a; }

.ranking-table td, .ranking-table th { text-align: center; padding: 6px 8px; }
.ranking-table .left { text-align: left; }
.ranking-table tr.me td { background: rgba(214, 138, 46, 0.16); }
.ranking-table tr.sep td { border-top: 2px dashed #33445f; }

.lobby-list li { display: flex; align-items: center; gap: 8px; }
.lobby-nick { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #33445f;
    background: #121926;
    color: #8fa3bd;
    flex-shrink: 0;
}
.team-chip.clickable { cursor: pointer; }
.team-chip.clickable:hover { border-color: #5f6f8c; }
.team-chip.team-0 { background: #1d3a5f; color: #8ec5ff; border-color: #2f5f96; }
.team-chip.team-1 { background: #4a2323; color: #ff9a8a; border-color: #7c3a3a; }
.team-chip.team-2 { background: #1f3d27; color: #9fdc8f; border-color: #35603f; }
.team-chip.team-3 { background: #43325a; color: #cdb4f6; border-color: #64518a; }

.elo-delta { font-size: 20px; font-weight: 800; }
.elo-delta.up { color: #9fdc8f; }
.elo-delta.down { color: #ff7b6b; }

/* Placeholder slotu reklamowego — nieaktywny do czasu włączenia Ads:Enabled (docs/MONETIZATION.md) */
.ad-slot {
    width: 100%;
    min-height: 0;
    display: none;
}
.ad-slot.enabled {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    border: 1px dashed #33445f;
    border-radius: 10px;
    color: #5c6f8c;
    font-size: 12px;
}
