#gameBoard {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 70; background: rgba(20, 20, 40, 0.9); padding: 20px;
    border-radius: 12px; border: 2px solid #4caf50; display: none;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
    flex-direction: row; align-items: flex-start; gap: 16px;
    max-width: 94vw; box-sizing: border-box;
}
#gameBoard h3 { color: #4caf50; margin: 0 0 12px; text-align: center; font-size: 18px; }
#gameSidePanel { display: flex; flex-direction: column; gap: 8px; min-width: 140px; max-width: 180px; }
@media (max-width: 480px) {
    #gameBoard { flex-direction: column; align-items: center; }
    #gameSidePanel { max-width: 100%; align-items: center; }
}
#boardGrid {
    display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); gap: 4px;
    background: #1a1a3a; padding: 8px; border-radius: 8px; box-sizing: border-box;
    width: min(320px, 82vw); aspect-ratio: 7 / 6;
}
.boardCell {
    width: 100%; height: 100%; border-radius: 50%;
    background: #2a2a5a; border: 1px solid #4caf50;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(12px, 4.5vw, 20px);
}
.boardCell:hover { background: #3a3a6a; box-shadow: 0 0 8px rgba(76, 175, 80, 0.6); }
.boardCell.red { background: #d32f2f; }
.boardCell.yellow { background: #fbc02d; }

#panel {
    position:fixed; top:16px; left:16px; z-index:50;
    background: rgba(18, 30, 20, 0.75);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: #f3ece7; padding: 10px 20px; border-radius: 30px;
    font-size: 13px; letter-spacing: 0.5px; display:flex; align-items:center; gap:18px;
    border: 1px solid rgba(229, 200, 209, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
#panel .nick { color: #f2d49b; font-weight: 600; font-family: 'Cormorant Garamond', serif; font-size: 16px; }
#panel .count { color: #a8d5ba; font-weight: 600; }
#logoutBtn {
    border: 1px solid rgba(229, 200, 209, 0.4); border-radius: 20px;
    background: rgba(180, 80, 100, 0.3); color: #fcefe8;
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; padding: 6px 14px; transition: all 0.3s ease;
}
#logoutBtn:hover { background: rgba(210, 90, 115, 0.6); border-color: #f2d49b; }
#settingsBtn {
    border: 1px solid rgba(242, 212, 155, 0.4); border-radius: 20px;
    background: rgba(242, 212, 155, 0.15); color: #f2d49b;
    font-size: 13px; cursor: pointer; padding: 5px 10px; transition: all 0.3s ease;
}
#settingsBtn:hover { background: rgba(242, 212, 155, 0.35); }

/* Faza 2: menu ustawień konta — ten sam styl modala co #gameBoard, inny akcent koloru */
#settingsOverlay {
    position: fixed; inset: 0; z-index: 90; display: none;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,0.45);
}
#settingsBox {
    background: rgba(22, 38, 25, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    color: #f7f3f0; padding: 28px 32px; border-radius: 18px; text-align: center;
    min-width: 280px; max-width: 90vw;
    border: 1px solid rgba(242, 212, 155, 0.35);
    box-shadow: 0 16px 50px rgba(0,0,0,0.5);
}
#settingsBox h3 { margin: 0 0 14px; font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #f2d49b; }
#settingsMsg { color: #a8d5ba; font-size: 12px; min-height: 16px; margin: 0 0 10px; }
.settings-item { text-align: left; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(242, 212, 155, 0.15); }
.settings-item:last-of-type { border-bottom: none; }
.settings-item-label { color: #d1c2bd; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.settings-item-row { display: flex; align-items: center; gap: 10px; }
.settings-item-row.settings-item-col { flex-direction: column; align-items: stretch; }
#settingsBox input[type="password"] {
    padding: 10px 12px; border: 1px solid rgba(229, 200, 209, 0.25); border-radius: 10px;
    background: rgba(12, 22, 14, 0.6); color: #fff; font-size: 13px; box-sizing: border-box; width: 100%;
}
#settingsBox input[type="password"]:focus { border-color: #f2d49b; outline: none; }
#settingsBox input[type="color"] { width: 48px; height: 38px; border: 1px solid rgba(229, 200, 209, 0.3); border-radius: 10px; background: transparent; cursor: pointer; padding: 2px; }
/* Faza 3.3: punkty w menu ustawień — sam odczyt, bez inputu/przycisku */
#settingsPoints { font-size: 20px; font-weight: 700; color: #f2d49b; font-family: 'Cormorant Garamond', serif; }
/* Faza 3.3: ikonka "złota moneta z 1 na środku" zamiast gwiazdki — używana
   zarówno w pasku HUD (obok #pointsText) jak i w menu ustawień (obok #settingsPoints). */
.coinIcon {
    display: inline-block; width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6d0 0%, #f2d49b 35%, #c9a227 70%, #8a6d1a 100%);
    color: #5c3d05; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
    box-shadow: 0 0 4px rgba(242,212,155,0.6), inset 0 0 2px rgba(255,255,255,0.7);
    vertical-align: middle;
}
#settingsBox button {
    border: none; border-radius: 20px; padding: 9px 16px;
    background: linear-gradient(135deg, #e5c8d1 0%, #c896a6 100%);
    color: #1a1018; font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
    cursor: pointer; transition: all 0.3s ease;
}
#settingsBox button:hover { background: linear-gradient(135deg, #f2d49b 0%, #e5c8d1 100%); }
#settingsCloseBtn { margin-top: 4px; background: rgba(180, 80, 100, 0.3) !important; color: #fcefe8 !important; }
#settingsCloseBtn:hover { background: rgba(210, 90, 115, 0.6) !important; }

.joyZone { position:fixed; bottom:110px; right:25px; width:150px; height:150px; z-index:60; touch-action:none; display:none; }
#joyZoneDir { bottom:40px; right:25px; }
.joyBase { position:absolute; left:0; top:0; width:150px; height:150px; border-radius:50%; background:rgba(255,255,255,0.08); border:1px solid rgba(242,212,155,0.3); box-sizing:border-box; }
.joyStick { position:absolute; left:45px; top:45px; width:60px; height:60px; border-radius:50%; border:1px solid rgba(255,255,255,0.8); box-sizing:border-box; }
#joyStickDir { background:rgba(242,212,155,0.4); }
.joyLabel { position:absolute; bottom:-22px; left:0; width:150px; text-align:center; color:rgba(255,255,255,0.7); font-size:11px; letter-spacing:1px; text-transform:uppercase; pointer-events:none; }

#sprintBtn, #jumpBtn {
    position:fixed; left:25px; z-index:60; width:56px; height:56px; border-radius:50%;
    display:none; align-items:center; justify-content:center; touch-action:none; user-select:none; -webkit-user-select:none;
    font-size:24px; font-family:Arial;
}
#sprintBtn {
    bottom:25px;
    border:2px solid rgba(255,215,0,0.9); background:rgba(0,0,0,0.55); color:#ffd700;
    box-shadow:0 0 12px rgba(255,215,0,0.35);
}
#sprintBtn.active { background:rgba(255,215,0,0.35); box-shadow:0 0 22px rgba(255,215,0,0.8); }
#jumpBtn {
    bottom:95px;
    border:2px solid rgba(0,176,240,0.9); background:rgba(0,0,0,0.55); color:#00b0f0;
    box-shadow:0 0 12px rgba(0,176,240,0.35);
}
#jumpBtn.active { background:rgba(0,176,240,0.35); box-shadow:0 0 22px rgba(0,176,240,0.8); }
#joinGameBtn {
    position:fixed; left:25px; bottom:235px; z-index:60; width:56px; height:56px; border-radius:50%;
    align-items:center; justify-content:center; text-align:center; padding:2px; line-height:1.05;
    white-space:normal; font-size:10px;
}
@media (pointer:coarse){ .joyZone{ display:block; } #sprintBtn{ display:flex; } #jumpBtn{ display:flex; } }

/* Przycisk pizzerii — pojawia się po zbliżeniu do budynku, otwiera sklep w nowej karcie */
#pizzaBtn {
    position:fixed; left:25px; bottom:305px; z-index:60; width:64px; height:64px; border-radius:50%;
    display:none; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:2px; line-height:1.05; white-space:normal;
    touch-action:none; user-select:none; -webkit-user-select:none; cursor:pointer;
    border:2px solid rgba(230,74,25,0.9); background:rgba(0,0,0,0.55); color:#ff8a50;
    box-shadow:0 0 12px rgba(230,74,25,0.4); font-size:10px; font-weight:600; letter-spacing:0.5px;
    transition: background 0.2s, box-shadow 0.2s;
}
#pizzaBtn:hover, #pizzaBtn.active { background:rgba(230,74,25,0.35); box-shadow:0 0 22px rgba(230,74,25,0.8); }
#pizzaBtn .emoji { font-size:20px; line-height:1; margin-bottom:2px; }
