* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    overflow: hidden;
    background: #0f1419;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

/* CELOWNIK I WSKAŹNIKI RĄK */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
}

.hand-indicator {
    position: fixed;
    top: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.45);
    transition: transform 0.1s, background 0.12s;
}

#ind-left {
    left: calc(50% - 38px);
}

#ind-right {
    left: calc(50% + 14px);
}

.hand-reach {
    transform: translateY(-50%) scale(1.2);
    background: #ffdd59;
    color: #1e272e;
}

.hand-grab {
    transform: translateY(-50%) scale(1.38);
    background: #05c46b !important;
    color: #fff !important;
    border-color: #fff;
    box-shadow: 0 0 14px #05c46b;
}

/* HUD W TRAKCIE GRY */
#hud {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10;
    pointer-events: none;
    background: rgba(13, 19, 26, 0.84);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    width: 440px;
}

.hud-top {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

#map-badge {
    background: #ff5e57;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

#cp-badge {
    background: #3742fa;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

#timer {
    margin-left: auto;
    font-family: monospace;
    font-size: 16px;
    color: #0be881;
    font-weight: bold;
}

#hud h2 {
    margin: 0 0 4px 0;
    font-size: 19px;
    color: #ffdd59;
}

#hud p {
    margin: 0;
    font-size: 13.5px;
    color: #d2dae2;
    line-height: 1.4;
}

#mp-status-bar {
    margin-top: 8px;
    font-size: 12px;
    color: #7bed9f;
    font-weight: 600;
}

.hud-keys {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11.5px;
    color: #a4b0be;
}

kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
}

#climb-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 196, 107, 0.94);
    color: #0f1419;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    z-index: 12;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

#climb-hint.visible {
    opacity: 1;
}

#banner {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(13, 19, 26, 0.95);
    padding: 22px 44px;
    border-radius: 18px;
    border: 2px solid #ffdd59;
    text-align: center;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s, transform 0.35s;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.65);
}

#banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#banner h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #ffdd59;
}

#banner p {
    margin: 0;
    font-size: 15px;
    color: #dfe4ea;
}

/* GŁÓWNE LOBBY 3-KOLUMNOWE */
#lobby-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 22, 30, 0.35) 0%, rgba(10, 14, 20, 0.92) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 24px;
}

.lobby-container {
    display: grid;
    grid-template-columns: 310px 480px 310px;
    gap: 20px;
    max-width: 1140px;
    width: 100%;
    align-items: stretch;
}

.lobby-panel {
    background: rgba(18, 26, 36, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.center-panel {
    background: rgba(18, 26, 36, 0.72);
    text-align: center;
}

.lobby-panel h2 {
    margin: 0 0 14px 0;
    font-size: 20px;
    color: #ffdd59;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 8px;
}

.center-panel h1 {
    margin: 0;
    font-size: 32px;
    color: #ffdd59;
    letter-spacing: 0.5px;
}

.tagline {
    margin: 4px 0 12px 0;
    font-size: 13px;
    color: #0be881;
    font-weight: 600;
}

.avatar-preview-space {
    height: 150px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    margin-bottom: 14px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.35));
}

.avatar-preview-space span {
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
}

label {
    display: block;
    font-size: 12.5px;
    color: #ced6e0;
    margin: 10px 0 5px 0;
    font-weight: 600;
    text-align: left;
}

input[type="text"],
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    outline: none;
}

.color-picker {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.12s;
}

.color-swatch.active {
    border: 3px solid #fff;
    transform: scale(1.16);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.skin-tip {
    margin-top: auto;
    background: rgba(255, 221, 89, 0.1);
    border: 1px solid rgba(255, 221, 89, 0.3);
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #ffdd59;
    line-height: 1.4;
}

/* LISTA MAP W LOBBY */
.map-selector {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
    max-height: 245px;
    overflow-y: auto;
    padding-right: 4px;
}

.map-card {
    text-align: left;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.map-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.map-card.active {
    background: rgba(5, 196, 107, 0.18);
    border-color: #05c46b;
}

.map-num {
    background: #3742fa;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 6px;
}

.map-card strong {
    font-size: 14px;
    color: #fff;
}

.map-card small {
    display: block;
    font-size: 11.5px;
    color: #a4b0be;
    margin-top: 2px;
}

.btn-start {
    margin-top: auto;
    background: linear-gradient(135deg, #05c46b, #0be881);
    color: #0f1419;
    border: none;
    padding: 15px;
    font-size: 17px;
    font-weight: 800;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(5, 196, 107, 0.45);
    transition: transform 0.15s;
}

.btn-start:hover {
    transform: translateY(-2px);
}

/* PANEL MULTIPLAYER */
.mp-desc {
    font-size: 12.5px;
    color: #a4b0be;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.mp-box {
    background: rgba(0, 0, 0, 0.35);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-mp {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.15s;
}

.btn-mp.host {
    background: #3742fa;
}

.btn-mp.join {
    background: #ff5e57;
    margin-top: 8px;
}

.btn-mp:hover {
    opacity: 0.9;
}

#host-code-display {
    margin-top: 10px;
    text-align: center;
    background: rgba(5, 196, 107, 0.15);
    border: 1px solid #05c46b;
    padding: 8px;
    border-radius: 8px;
}

#host-code-display span {
    font-size: 10px;
    display: block;
    color: #7bed9f;
}

#host-code-display strong {
    font-size: 22px;
    letter-spacing: 3px;
    color: #ffdd59;
}

#host-code-display small {
    display: block;
    font-size: 11px;
    color: #ced6e0;
}

.mp-divider {
    text-align: center;
    font-size: 11px;
    color: #747d8c;
    margin: 12px 0;
    font-weight: 700;
}

.mp-players-box {
    margin-top: auto;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 12px;
}

.mp-players-box h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #ffdd59;
}

#lobby-player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #dfe4ea;
}

#lobby-player-list li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}