*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:Arial,sans-serif;
    overflow:hidden;
    background:
    radial-gradient(circle at top,#441111,#110000 70%);
    color:white;
}

/* PANTALLAS */
.screen{
    width:100vw;
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
}

.hidden{
    display:none;
}

/* MENU */
.menu-card,
.shop-card{
    background:rgba(0,0,0,0.45);
    backdrop-filter:blur(10px);
    padding:40px;
    border-radius:30px;
    box-shadow:0 0 30px rgba(255,80,0,0.5);
    text-align:center;
}

h1{
    font-size:3rem;
    color:#ff6a00;
    text-shadow:0 0 20px red;
}

.subtitle{
    margin-top:10px;
    color:#ddd;
    margin-bottom:30px;
}

.menu-buttons{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    justify-content:center;
}

/* BOTONES */
button{
    border:none;
    border-radius:18px;
    padding:14px 24px;
    font-size:1rem;
    font-weight:bold;
    cursor:pointer;
    color:white;
    background:linear-gradient(to bottom,#ff7b00,#cc3300);
    box-shadow:
    0 5px 0 #992200,
    0 10px 20px rgba(0,0,0,0.4);

    transition:0.2s;
}

button:hover{
    transform:translateY(-3px) scale(1.05);
}

button:active{
    transform:translateY(2px);
}

/* GAME HEADER */
.game-header{
    position:absolute;
    top:10px;
    left:0;
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    z-index:100;
    flex-wrap:wrap;
}

#score{
    background:rgba(0,0,0,0.5);
    padding:10px 20px;
    border-radius:15px;
    font-weight:bold;
}

/* GRID */
#grid{
    display:grid;
    grid-template-columns:repeat(5,70px);
    grid-template-rows:repeat(4,70px);
    gap:12px;
    margin-top:80px;
}

/* ESPACIOS */
.space{
    width:70px;
    height:70px;
    border-radius:16px;
    background:#333;
    position:relative;
    box-shadow:inset 0 0 15px rgba(255,255,255,0.08);
}

/* LAVA */
.space.lava{
    background:
    linear-gradient(45deg,
    red,
    orange,
    yellow);

    animation:lavaAnim .4s infinite alternate;
}

@keyframes lavaAnim{
    0%{
        transform:scale(1);
        filter:brightness(1);
    }

    100%{
        transform:scale(1.1);
        filter:brightness(1.5);
    }
}

/* PLAYER */
.player{
    width:50px;
    height:50px;
    border-radius:50%;
    position:absolute;
    top:10px;
    left:10px;

    animation:playerGlow 1s infinite alternate;
}

@keyframes playerGlow{
    from{
        box-shadow:0 0 10px white;
    }
    to{
        box-shadow:0 0 25px white;
    }
}

/* TIENDA */
.colors-section{
    display:flex;
    gap:40px;
    margin:25px 0;
    flex-wrap:wrap;
    justify-content:center;
}

.color-group{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
}

.color-btn{
    width:45px;
    height:45px;
    border-radius:50%;
    border:3px solid white;
}

/* CONTROLES MÓVIL */
#mobileControls{
    width:100%;
    position:absolute;
    bottom:10px;
    left:0;

    display:flex;
    justify-content:space-between;
    padding:0 20px;
    pointer-events:none;
}

.controls{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
}

.middle-row{
    display:flex;
    gap:8px;
}

.ctrl-btn{
    width:60px;
    height:60px;
    border-radius:50%;
    font-size:1.5rem;
    pointer-events:auto;
}

/* RESPONSIVE */
@media(max-width:768px){

    h1{
        font-size:2rem;
    }

    #grid{
        grid-template-columns:repeat(5,55px);
        grid-template-rows:repeat(4,55px);
        gap:8px;
    }

    .space{
        width:55px;
        height:55px;
    }

    .player{
        width:38px;
        height:38px;
        top:8px;
        left:8px;
    }

    .ctrl-btn{
        width:55px;
        height:55px;
        font-size:1.2rem;
    }

    button{
        font-size:.9rem;
        padding:12px 18px;
    }

}