/* CSS Stylesheet: Lokalne Wsparcie The Game */

/* RESET AND CORE SETTINGS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated; /* Ensures pixel-art stays sharp */
    user-select: none;
    -webkit-user-drag: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a1615; /* Earthy dark brown/black */
    font-family: 'Press Start 2P', monospace;
    color: #f0ebd8;
}

/* CUSTOM CRT AND GRID OVERLAY FOR ARCADE VIBE */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 99999;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    opacity: 0.45;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

/* SCREEN MANAGEMENT */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 10;
    overflow: hidden;
    animation: screenFadeIn 0.3s steps(5, end);
}

.screen.active {
    display: flex;
}

@keyframes screenFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* GENERAL MENU BACKGROUND (BLURRED BACKGROUND.PNG) */
.menu-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('src/background.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px) brightness(0.35) contrast(1.1);
    z-index: -1;
    animation: bgScroll 120s linear infinite;
}

@keyframes bgScroll {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* SOUND TOGGLE INDICATOR */
#sound-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    cursor: pointer;
    padding: 10px 14px;
    font-size: 16px;
    margin: 0;
    box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.4);
}

/* PIXEL GRAPHICS BOX (MINECRAFT STYLE) */
.pixel-box {
    border: 4px solid #000;
    background-color: #2e2524; /* Minecraft dark brown dirt tone */
    box-shadow: 
        inset -4px -4px 0px 0px #1a1615, 
        inset 4px 4px 0px 0px #614f4e,
        0 8px 0 0 rgba(0, 0, 0, 0.4);
    padding: 20px;
    color: #f0ebd8;
    position: relative;
}

/* PIXEL BUTTON SYSTEM (MINECRAFT STYLE) */
.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    text-align: center;
    padding: 14px 28px;
    border: 4px solid #000;
    color: #fff;
    cursor: pointer;
    position: relative;
    outline: none;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 0 6px 0 0 rgba(0, 0, 0, 0.4);
    transition: transform 0.05s ease, box-shadow 0.05s ease;
    margin-bottom: 6px;
}

.pixel-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-top: 4px solid rgba(255, 255, 255, 0.35);
    border-left: 4px solid rgba(255, 255, 255, 0.35);
    border-bottom: 4px solid rgba(0, 0, 0, 0.35);
    border-right: 4px solid rgba(0, 0, 0, 0.35);
}

.pixel-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.4);
}

.pixel-btn:active::after {
    border-top: 4px solid rgba(0, 0, 0, 0.35);
    border-left: 4px solid rgba(0, 0, 0, 0.35);
    border-bottom: 4px solid rgba(255, 255, 255, 0.35);
    border-right: 4px solid rgba(255, 255, 255, 0.35);
}

/* BUTTON COLORS */
.btn-green {
    background-color: #4a9c2d; /* Grass green */
}
.btn-green:hover {
    background-color: #5bbd38;
}

.btn-blue {
    background-color: #3b6ea5; /* Water blue */
}
.btn-blue:hover {
    background-color: #4a86c6;
}

.btn-red {
    background-color: #9c2d2d; /* Redstone red */
}
.btn-red:hover {
    background-color: #bd3838;
}

.btn-gray {
    background-color: #707070; /* Cobblestone gray */
}
.btn-gray:hover {
    background-color: #8c8c8c;
}

.btn-key {
    background-color: #3a2e2d;
    font-size: 12px;
    padding: 8px 16px;
    min-width: 120px;
}
.btn-key:hover {
    background-color: #554442;
    border-color: #fcc21b;
}

.btn-disabled {
    background-color: #444;
    color: #888;
    text-shadow: 2px 2px 0px #222;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}
.btn-disabled::after {
    border-color: rgba(255,255,255,0.05) rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(255,255,255,0.05);
}

/* MAIN MENU SPECIFICS */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    z-index: 10;
}

.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.menu-logo-img {
    width: 280px;
    height: auto;
    filter: drop-shadow(0px 8px 0px #000);
    margin-bottom: 15px;
    animation: floatingLogo 4s ease-in-out infinite;
}

.game-title {
    font-size: 28px;
    text-align: center;
    color: #fff;
    line-height: 1.4;
    text-shadow: 4px 4px 0px #000, -2px -2px 0px #4a3e3d;
    letter-spacing: -1px;
    animation: breathingTitle 3s ease-in-out infinite;
}

.game-title .subtitle {
    font-size: 34px;
    color: #fcc21b; /* Minecraft Gold */
    text-shadow: 4px 4px 0px #000, 0 0 10px rgba(252, 194, 27, 0.4);
}

@keyframes floatingLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes breathingTitle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.high-score-banner {
    background-color: #1a1615;
    padding: 12px 25px;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 30px;
    border-color: #fcc21b; /* Golden border for score */
    color: #fcc21b;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    width: 320px;
    gap: 15px;
}

.menu-footer {
    margin-top: 40px;
    font-size: 8px;
    color: #888;
    text-align: center;
}

/* MAIN PANEL LAYOUT */
.main-panel {
    width: 90%;
    max-width: 900px;
    height: 80%;
    display: flex;
    flex-direction: column;
    padding-top: 50px;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 10px;
    padding: 8px 16px;
}

.panel-title {
    font-size: 22px;
    text-align: center;
    color: #fcc21b;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 25px;
}

/* CHARACTER SELECTION LAYOUT */
.char-selection-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    overflow: hidden;
}

.char-grid-container {
    flex: 1.2;
    background-color: #1a1615;
    overflow-y: auto;
    padding: 15px;
    max-height: 100%;
}

/* Scrollbar styles for retro look */
.char-grid-container::-webkit-scrollbar,
.settings-content::-webkit-scrollbar {
    width: 12px;
}
.char-grid-container::-webkit-scrollbar-track,
.settings-content::-webkit-scrollbar-track {
    background: #000;
}
.char-grid-container::-webkit-scrollbar-thumb,
.settings-content::-webkit-scrollbar-thumb {
    background: #4a3e3d;
    border: 3px solid #000;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.char-card {
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #3e3130;
    border: 3px solid #000;
    box-shadow: inset -3px -3px 0px 0px #201918, inset 3px 3px 0px 0px #5c4a48;
    padding: 10px;
    transition: transform 0.1s ease, border-color 0.1s ease;
    position: relative;
    text-align: center;
}

.char-card:hover {
    border-color: #fcc21b;
    background-color: #4c3d3c;
}

.char-card.selected {
    border-color: #fcc21b;
    background-color: #4a3e3d;
    box-shadow: 
        inset -3px -3px 0px 0px #221918, 
        inset 3px 3px 0px 0px #87796f,
        0 0 12px rgba(252, 194, 27, 0.6);
}

.char-card.locked {
    filter: grayscale(1);
    opacity: 0.6;
}

.char-card-name {
    font-size: 8px;
    color: #fff;
    margin-top: 8px;
    text-shadow: 1px 1px 0px #000;
    word-break: break-all;
}

.char-card-avatar {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.char-card-lock-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
}

/* SELECTED CHAR DETAILS */
.char-details-panel {
    flex: 0.8;
    background-color: #3e3130;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.char-preview-box {
    width: 140px;
    height: 110px;
    border: 4px solid #000;
    background-color: #1a1615;
    box-shadow: inset 4px 4px 0 0 rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

#char-preview-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: floatingPreview 3s ease-in-out infinite;
}

.locked-placeholder {
    font-size: 48px;
    color: #555;
    font-weight: bold;
    display: none;
}

@keyframes floatingPreview {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

#char-details-name {
    font-size: 14px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 10px;
}

.status-badge {
    font-size: 8px;
    padding: 6px 12px;
    border: 2px solid #000;
    margin-bottom: 15px;
}
.status-badge.unlocked {
    background-color: #3a8c27;
    color: #fff;
}
.status-badge.locked {
    background-color: #8c2727;
    color: #fff;
}

.char-description {
    font-size: 8px;
    line-height: 1.6;
    color: #bbb;
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
}

.start-game-btn {
    width: 100%;
    font-size: 11px;
    padding: 12px;
}

/* SETTINGS PANEL SPECIFICS */
.settings-panel {
    max-width: 800px;
}

.settings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 5px;
}

.settings-section {
    background-color: #1a1615;
    padding: 15px;
}

.settings-section h3 {
    font-size: 12px;
    color: #fcc21b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 12px;
    border-bottom: 2px solid #3a2e2d;
    padding-bottom: 8px;
}

.settings-hint {
    font-size: 7px;
    color: #888;
    margin-bottom: 15px;
    line-height: 1.4;
}

.control-bindings-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #2e2524;
    border: 2px solid #000;
}

.control-label {
    font-size: 8px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
}

.volume-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #2e2524;
    border: 2px solid #000;
    margin-bottom: 15px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pixel-slider {
    -webkit-appearance: none;
    width: 150px;
    height: 16px;
    background: #000;
    border: 2px solid #4a3e3d;
    outline: none;
}

.pixel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 24px;
    background: #fcc21b;
    border: 2px solid #000;
    box-shadow: inset -2px -2px 0px 0px #9c6e0c, inset 2px 2px 0px 0px #ffea70;
    cursor: pointer;
}

#volume-value {
    font-size: 8px;
    min-width: 45px;
    text-align: right;
}

.danger-zone {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.danger-zone button {
    width: 100%;
    font-size: 10px;
    padding: 12px;
}

/* GAMEPLAY VIEW */
#game-screen {
    padding: 0;
    background-color: #000;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #222;
}

/* HUD OVERLAYS */
#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* Let clicks pass through to game */
    z-index: 50;
}

.hud-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto; /* Enable hover/clicks on HUD parts if needed */
    margin-top: 60px; /* Shift down to avoid overlap with mute button */
}

.hud-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto; /* Enable hover/clicks on HUD parts if needed */
}

.hearts-container {
    display: flex;
    gap: 6px;
}

.pixel-heart {
    width: 26px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(2px 2px 0px #000);
}

.hud-score-box, .hud-high-score {
    padding: 10px 15px;
    font-size: 10px;
    background-color: rgba(46, 37, 36, 0.85);
    border-color: #000;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
}

.hud-high-score {
    border-color: #fcc21b;
    color: #fcc21b;
}

.hud-center {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wave-text {
    font-size: 18px;
    color: #ff3e3e;
    text-shadow: 3px 3px 0px #000;
    animation: pulseWave 1s infinite alternate;
    background-color: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border: 3px solid #000;
}

@keyframes pulseWave {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.hud-weapon-indicator {
    background-color: rgba(46, 37, 36, 0.85);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-color: #000;
}

.weapon-label {
    font-size: 6px;
    color: #aaa;
}

.weapon-preview-frame {
    width: 48px;
    height: 48px;
    border: 3px solid #000;
    background-color: #1a1615;
    box-shadow: inset 3px 3px 0px rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

#hud-next-weapon-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    animation: weaponSpin 4s linear infinite;
}

@keyframes weaponSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.combo-bubble {
    position: absolute;
    top: 140px;
    left: 20px;
    background-color: #fcc21b;
    color: #000;
    border: 3px solid #000;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s;
}

.combo-bubble.show {
    opacity: 1;
    transform: scale(1);
}

/* PAUSE AND ACTION BUTTONS */
.pause-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 10px;
    padding: 8px 16px;
    z-index: 50;
}

/* MODAL OVERLAYS */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    animation: modalFade 0.2s steps(4, end);
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalFade {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.7); }
}

.modal-box {
    width: 90%;
    max-width: 450px;
    padding: 30px;
    text-align: center;
    background-color: #2e2524;
}

.modal-box h2 {
    font-size: 16px;
    color: #fcc21b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 20px;
}

.modal-box p {
    font-size: 8px;
    line-height: 1.6;
    color: #bbb;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* GAME OVER PANEL SPECIFICS */
.game-over-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(132, 27, 27, 0.5); /* Red tinted overlay */
    z-index: -1;
}

.game-over-box {
    border-color: #9c2d2d; /* Red border */
    box-shadow: 
        inset -4px -4px 0px 0px #4d1515, 
        inset 4px 4px 0px 0px #c14242,
        0 8px 0 0 rgba(0, 0, 0, 0.6);
}

.game-over-title {
    font-size: 32px;
    color: #ff3e3e;
    text-shadow: 4px 4px 0px #000;
    margin-bottom: 25px;
    animation: gameoverGlow 1.5s infinite alternate;
}

@keyframes gameoverGlow {
    from { text-shadow: 4px 4px 0px #000, 0 0 10px rgba(255, 62, 62, 0.4); }
    to { text-shadow: 4px 4px 0px #000, 0 0 20px rgba(255, 62, 62, 0.8); }
}

.game-over-stats {
    background-color: #1a1615;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.game-over-stats p {
    font-size: 9px;
    margin-bottom: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.game-over-stats p:last-child {
    margin-bottom: 0;
}

.highlight-yellow { color: #fcc21b; }
.highlight-gold { color: #fcc21b; font-weight: bold; }
.highlight-purple { color: #cc66ff; }

/* SMALL UTILITIES */
.small-text {
    font-size: 6px !important;
    color: #666 !important;
    margin-top: 10px;
}

/* BUTTON YELLOW COLOR FOR RESULTS (GOLD STYLE) */
.btn-yellow {
    background-color: #c6951b;
}
.btn-yellow:hover {
    background-color: #e5b225;
}

/* ==========================================
 * GAME MODE SELECTION VIEW
 * ========================================== */
.mode-selection-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    width: 100%;
}

.mode-box {
    flex: 1;
    background-color: #3e3130;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mode-box h3 {
    font-size: 11px;
    color: #fcc21b;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    text-shadow: 2px 2px 0 #000;
}

.mode-desc {
    font-size: 8px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 20px;
    text-align: center;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

.level-btn {
    font-size: 9px;
    padding: 10px 5px;
    margin-bottom: 0;
    line-height: 1.4;
}

.lvl-sub {
    font-size: 6px;
    color: #ffcc00;
}

.infinite-mode-box {
    justify-content: center;
    align-items: center;
}

.start-infinite-btn {
    width: 100%;
    font-size: 10px;
    padding: 16px;
}

/* ==========================================
 * LEADERBOARD VIEW
 * ========================================== */
.leaderboard-container {
    flex: 1;
    background-color: #1a1615;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
}

.leaderboard-headers, .leaderboard-row {
    display: grid;
    grid-template-columns: 40px 1.5fr 1fr 0.8fr 1fr 1.2fr;
    font-size: 8px;
    padding: 10px 5px;
    text-align: left;
}

.leaderboard-headers {
    border-bottom: 3px solid #000;
    color: #fcc21b;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.leaderboard-rows {
    flex: 1;
    overflow-y: auto;
    margin-top: 5px;
}

.leaderboard-row {
    border-bottom: 2px solid #2e2524;
    color: #fff;
    align-items: center;
}

.leaderboard-row:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.leaderboard-row.highlight-self {
    background-color: rgba(252, 194, 27, 0.15);
    border-color: #fcc21b;
}

.col-rank { color: #888; }
.leaderboard-row:nth-child(1) .col-rank { color: #fcc21b; font-weight: bold; }
.leaderboard-row:nth-child(2) .col-rank { color: #cccccc; font-weight: bold; }
.leaderboard-row:nth-child(3) .col-rank { color: #c68a4c; font-weight: bold; }

/* ==========================================
 * MULTIPLAYER MATCHMAKING VIEW
 * ========================================== */
.mp-panel {
    max-width: 900px;
}

.nickname-section {
    width: 100%;
    background-color: #3e3130;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    margin-bottom: 15px;
    border-color: #fcc21b;
}

.nickname-label {
    font-size: 9px;
    color: #fcc21b;
    text-shadow: 1px 1px 0 #000;
}

.pixel-input {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 10px;
    border: 3px solid #000;
    background-color: #000;
    color: #fff;
    outline: none;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.1);
}

.pixel-input::placeholder {
    color: #555;
}

#mp-nickname-input {
    width: 250px;
    text-align: center;
    border-color: #fcc21b;
}

.mp-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    width: 100%;
    overflow: hidden;
}

.mp-actions {
    flex: 0.8;
    background-color: #1a1615;
    padding: 15px;
}

.mp-actions h3, .mp-rooms-list h3 {
    font-size: 10px;
    color: #fcc21b;
    margin-bottom: 15px;
    text-shadow: 1px 1px 0 #000;
}

.spacing-top {
    margin-top: 30px !important;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group button {
    width: 100%;
    margin-bottom: 0;
    padding: 10px;
    font-size: 9px;
}

.uppercase {
    text-transform: uppercase;
}

.mp-rooms-list {
    flex: 1.2;
    background-color: #1a1615;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.rooms-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.room-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3e3130;
    border: 2px solid #000;
    padding: 10px 15px;
    transition: border-color 0.1s;
}

.room-card:hover {
    border-color: #fcc21b;
}

.room-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.room-card-name {
    font-size: 9px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.room-card-meta {
    font-size: 6px;
    color: #aaa;
}

.room-card button {
    margin-bottom: 0;
    font-size: 8px;
    padding: 8px 12px;
}

/* ==========================================
 * MULTIPLAYER LOBBY ROOM VIEW
 * ========================================== */
.lobby-panel {
    max-width: 900px;
}

.lobby-code-badge {
    background-color: #1a1615;
    padding: 10px 20px;
    font-size: 10px;
    text-align: center;
    border-color: #fcc21b;
    margin-bottom: 20px;
}

.lobby-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    width: 100%;
}

.lobby-players-grid {
    flex: 1.5;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 3px solid #4a3e3d;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    min-height: 290px;
}

.lobby-player-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
    min-height: 250px;
    transition: transform 0.2s ease-out;
}

.lobby-player-slot:hover {
    transform: scale(1.05);
}

.slot-avatar {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Pedestal beneath the character */
.lobby-player-slot::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 90px;
    height: 18px;
    background: radial-gradient(ellipse at center, rgba(100, 100, 100, 0.3) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.lobby-player-slot:not(.empty)::after {
    background: radial-gradient(ellipse at center, rgba(255, 68, 68, 0.4) 0%, rgba(0,0,0,0) 70%);
}

.lobby-player-slot.ready-glow::after {
    background: radial-gradient(ellipse at center, rgba(91, 189, 56, 0.7) 0%, rgba(0,0,0,0) 70%);
    box-shadow: 0 0 10px rgba(91, 189, 56, 0.4);
}

.lobby-player-slot.empty {
    opacity: 0.4;
}

.slot-name {
    font-size: 8px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.4;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border: 2px solid #555;
    border-radius: 4px;
    width: 95%;
    box-sizing: border-box;
    z-index: 10;
}

.slot-status {
    font-size: 6px;
    padding: 3px 8px;
    background-color: #000;
    border: 1px solid #444;
    z-index: 10;
}

.lobby-player-slot:not(.empty) .slot-status {
    background-color: #2c6e1f;
    color: #fff;
    border-color: #4a9c2d;
}

.lobby-player-slot.is-host::before {
    content: '★ HOST';
    position: absolute;
    top: 5px;
    font-size: 6px;
    color: #fcc21b;
    background: rgba(0,0,0,0.8);
    padding: 2px 6px;
    border: 1px solid #fcc21b;
    border-radius: 3px;
    z-index: 15;
}

.lobby-settings {
    flex: 0.7;
    background-color: #1a1615;
    padding: 15px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.lobby-settings h3 {
    font-size: 10px;
    color: #fcc21b;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.lobby-setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.setting-label {
    font-size: 8px;
    color: #bbb;
}

.pixel-select {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px;
    background-color: #000;
    color: #fff;
    border: 3px solid #000;
    outline: none;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.1);
    cursor: pointer;
}

.lobby-start-box {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.lobby-start-btn {
    width: 100%;
    margin-bottom: 0;
    padding: 14px;
    font-size: 10px;
}

.wait-text {
    font-size: 8px;
    color: #ff3e3e;
    text-align: center;
    animation: breathingTitle 2s infinite;
}

/* ==========================================
 * SUPER POWER HUD AND EFFECTS STYLING
 * ========================================== */
.hud-power-box {
    padding: 10px 15px;
    font-size: 8px;
    background-color: rgba(46, 37, 36, 0.85);
    border: 3px solid #000;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 200px;
    pointer-events: auto;
}

.power-label {
    font-size: 6px;
    color: #aaa;
}

.power-bar-container {
    width: 100%;
    height: 16px;
    background-color: #000;
    border: 2px solid #4a3e3d;
    position: relative;
    box-shadow: inset 2px 2px 0px rgba(0, 0, 0, 0.6);
}

.power-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffcc00, #ff6600);
    box-shadow: inset -2px -2px 0px rgba(0, 0, 0, 0.4), inset 2px 2px 0px rgba(255, 255, 255, 0.4);
    transition: width 0.1s ease;
}

.power-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    font-family: 'Press Start 2P', monospace;
    white-space: nowrap;
}

/* Glowing animation when ready */
@keyframes powerGlow {
    from {
        box-shadow: 0 0 6px #ffcc00, inset -2px -2px 0px rgba(0, 0, 0, 0.4);
        background: linear-gradient(90deg, #ffe600, #ff8800);
    }
    to {
        box-shadow: 0 0 16px #ff3300, inset -2px -2px 0px rgba(0, 0, 0, 0.4);
        background: linear-gradient(90deg, #ff8800, #ff0000);
    }
}

.power-bar-fill.ready {
    animation: powerGlow 0.5s infinite alternate;
}

