:root {
    --lb-red: #ea2027;
    --lb-black: #1e272e;
    --cn-black: #2f3542;
    --cn-green: #2ecc71;
    --gold: #f1c40f;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Fredoka', sans-serif;
    background: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #1e272e;
}

/* OVERLAYS */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.menu-box {
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 800px;
    border: 10px solid var(--lb-red);
    box-shadow: 0 0 50px rgba(234, 32, 39, 0.5);
}

.logo {
    font-size: 4rem;
    font-weight: 900;
    color: var(--lb-red);
    letter-spacing: 5px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 var(--lb-black);
}

.char-selection {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.char-card {
    flex: 1;
    padding: 20px;
    border: 4px solid #eee;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.char-card img {
    width: 150px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
}

.char-card:hover {
    transform: scale(1.05);
    border-color: var(--lb-red);
    background: rgba(234, 32, 39, 0.1);
}

.char-card.selected {
    border-color: var(--lb-red);
    background: rgba(234, 32, 39, 0.2);
    box-shadow: 0 0 20px var(--lb-red);
}

#select-catnoir.selected {
    border-color: var(--cn-green);
    background: rgba(46, 204, 113, 0.2);
    box-shadow: 0 0 20px var(--cn-green);
}

button {
    background: var(--lb-red);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* HUD */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
}

.hp-container, .mana-container {
    width: 300px;
}

.hp-bar-outer, .mana-bar-outer {
    height: 25px;
    background: rgba(0,0,0,0.5);
    border: 3px solid #fff;
    border-radius: 15px;
    overflow: hidden;
}

#hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff4d4d, #b30000);
    transition: 0.3s;
}

#mana-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    transition: 0.3s;
}

#char-name, #mana-text {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

#score {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
}

/* FLASH EFFECT */
.flash-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 90;
    pointer-events: none;
    animation: flash-anim 1s forwards;
}

@keyframes flash-anim {
    0% { background: rgba(255,255,255,1); }
    100% { background: rgba(255,255,255,0); }
}

.win-title { color: var(--cn-green); font-size: 3rem; }
.lose-title { color: var(--lb-red); font-size: 3rem; }

.hidden { display: none !important; }
