body {
    margin: 0; padding: 0; background-color: #1a1c20; color: #dcdfe4;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex; justify-content: center; align-items: center; height: 100vh;
    overflow: hidden;
}

#game-container { position: relative; border: 2px solid #4f586a; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
#gameCanvas { background-color: #282c34; display: block; }

#game-ui {
    position: absolute; top: 0; left: 0; right: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 10px 15px; font-size: 14px; text-shadow: 1px 1px 2px black;
    pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0));
    box-sizing: border-box;
}
.stat-panel { display: flex; flex-direction: column; gap: 4px; flex-basis: 200px; }
#left-stats { text-align: left; }
#right-stats { text-align: right; }
.stat-panel span { font-weight: bold; color: #a9c7e8; }

#weapon-ui {
    display: flex; gap: 8px; justify-content: center; flex-grow: 1;
}
.weapon-slot {
    width: 50px; height: 50px; background-color: rgba(0,0,0,0.4);
    border: 1px solid #4f586a; border-radius: 4px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    font-size: 0.7em;
}
.weapon-name { font-weight: bold; }
.weapon-tier { font-size: 1.2em; font-weight: bold; }
.tier-I { color: #dcdfe4; } .tier-II { color: #28a745; }
.tier-III { color: #007bff; } .tier-IV { color: #9d4edd; }

.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(26, 28, 32, 0.9);
    display: flex; justify-content: center; align-items: center; text-align: center;
    backdrop-filter: blur(5px);
}
.overlay-content {
    background-color: #282c34; padding: 30px; border-radius: 12px;
    border: 1px solid #4f586a; box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    max-height: 90%; overflow-y: auto;
}

#char-options { display: flex; gap: 20px; margin-top: 25px; }
.char-card {
    padding: 20px; border: 2px solid #4f586a; border-radius: 8px;
    cursor: pointer; transition: all 0.2s ease-in-out;
    width: 150px; text-align: left;
}
.char-card:hover { background-color: #3a404c; border-color: #a9c7e8; transform: translateY(-5px); }
.char-card h3 { margin: 0 0 10px 0; color: #a9c7e8; font-size: 1.2em; }
.char-card p { margin: 0 0 5px 0; font-size: 0.9em; }
.char-card .char-desc { font-style: italic; color: #888; font-size: 0.8em; margin-top: 10px; }

.shop-content { min-width: 600px; }
.shop-header { margin-bottom: 20px; border-bottom: 1px solid #4f586a; padding-bottom: 15px; }
#shop-options {
    margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.shop-item {
    padding: 12px; border: 1px solid; border-radius: 5px;
    cursor: pointer; transition: all 0.2s; position: relative;
    text-align: left; background-color: rgba(0,0,0,0.2);
}
.shop-item:hover { background-color: #3a404c; transform: scale(1.03); }
.shop-item h3 { margin: 0 0 5px 0; font-size: 1.1em; }
.shop-item p { margin: 0; font-size: 0.9em; color: #b0b8c4; }
.shop-item .item-cost { font-weight: bold; color: #ffd700; }
.shop-item.disabled { opacity: 0.5; cursor: not-allowed; background-color: #21252b; transform: none; }
.shop-item .upgrade-text { font-weight: bold; }
.lock-checkbox { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; cursor: pointer; }

.rarity-common { border-color: #6c757d; } .rarity-common h3 { color: #dcdfe4; }
.rarity-uncommon { border-color: #28a745; } .rarity-uncommon h3 { color: #28a745; }
.rarity-rare { border-color: #007bff; } .rarity-rare h3 { color: #007bff; }
.rarity-legendary { border-color: #9d4edd; } .rarity-legendary h3 { color: #9d4edd; }
.weapon-item { border-color: #fd7e14; } .weapon-item h3 { color: #fd7e14; }

#pause-stats { text-align: left; margin: 20px 0; columns: 2; column-gap: 40px; }
#pause-stats h3 { border-bottom: 1px solid #4f586a; padding-bottom: 5px; margin-top: 0; }
#pause-stats ul { list-style: none; padding: 0; margin: 0 0 20px 0; }

button {
    padding: 12px 25px; font-size: 1.1em; cursor: pointer;
    background-color: #4f586a; color: #dcdfe4; border: none;
    border-radius: 5px; transition: all 0.2s; font-weight: bold;
}
button:hover { background-color: #6c757d; }
#next-wave-btn, #resume-btn { background-color: #28a745; color: white; }
#next-wave-btn:hover, #resume-btn:hover { background-color: #218838; }
#reroll-btn { background-color: #007bff; color: white; }
#reroll-btn:hover { background-color: #0069d9; }

.status-effect-icon {
    position: absolute;
    top: -15px; 
    font-size: 12px;
    text-shadow: 1px 1px 1px black;
}


#wave-start-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

#wave-start-text {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 20px black;
    animation: wave-start-anim 2s forwards;
}

@keyframes wave-start-anim {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}






