body {
    margin: 0;
    font-family: Arial;
    background: #0b1c2c;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* MENÚ */
.menu-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.title {
    font-size: 40px;
    margin-bottom: 20px;
    animation: glow 2s infinite alternate;
}

.menu-screen button {
    padding: 15px 30px;
    margin: 10px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: #00c3ff;
    color: black;
}

.hidden {
    display: none;
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 20px;
}

.score-group {
    display: flex;
    gap: 10px;
    font-size: 18px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.topbar button {
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
}

/* CANVAS */
canvas {
    display: block;
    margin: auto;
    border: 4px solid white;
    border-radius: 12px;
}

/* WIN SCREEN */
.win-screen {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.9);

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    z-index: 50;
}

.win-screen.show {
    display: flex;
}

.win-screen h1 {
    font-size: 50px;
    color: gold;
}

.win-screen button {
    margin: 10px;
    padding: 15px 30px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
}

/* CONTROLES MOBILE */
#mobileControls {
    position: fixed;
    bottom: 15px;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: space-between;

    pointer-events: none;
    z-index: 20;
}

.mobile-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;

    pointer-events: auto;
}

/* BOTONES */
.mobile-side button {
    width: 85px;
    height: 85px;

    border: none;
    border-radius: 50%;

    font-size: 34px;
    font-weight: bold;

    color: white;

    background: rgba(255,255,255,0.12);

    backdrop-filter: blur(10px);

    box-shadow:
        0 0 20px rgba(255,255,255,0.15),
        inset 0 0 10px rgba(255,255,255,0.15);

    touch-action: none;
}

/* EFECTO TOUCH */
.mobile-side button:active {
    transform: scale(0.92);

    background: rgba(0,195,255,0.5);
}

@media (max-width: 900px) {

    body{
        overflow:hidden;
    }

    /* MENU */
    .menu-screen{
        padding:20px;
    }

    .title{
        font-size:28px;
    }

    .menu-screen button{
        width:220px;
        font-size:18px;
    }

    /* CANVAS */
    canvas{

        width:95vw;
        height:auto;

        max-height:55vh;

        margin-top:10px;

        border-radius:12px;
    }

    /* TOPBAR */
    .topbar{

        padding:8px 10px;

        font-size:14px;
    }

    .score-group{
        gap:6px;
        font-size:14px;
    }

    .btn-group{
        gap:6px;
    }

    /* CONTROLES */
    .mobile-side{

        padding:12px;

        gap:10px;
    }

    .mobile-side button{

        width:70px;
        height:70px;

        font-size:28px;
    }

    /* VICTORIA */
    .win-screen h1{
        font-size:34px;
    }

}

/* OCULTAR EN PC */
@media (min-width: 901px) {
    #mobileControls {
        display: none;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #00c3ff;
    }

    to {
        text-shadow: 0 0 30px #00c3ff;
    }
}

/* FULLSCREEN RESPONSIVE */
:fullscreen canvas,
:-webkit-full-screen canvas {

    width: 100vw;

    height: auto;

    max-height: 85vh;

    object-fit: contain;

    border: none;

    border-radius: 0;
}


/* CONTROLES */
:fullscreen #mobileControls,
:-webkit-full-screen #mobileControls {

    bottom: 30px;
}

/* BOTONES MÁS GRANDES */
:fullscreen .mobile-side button,
:-webkit-full-screen .mobile-side button {

    width: 85px;
    height: 85px;

    font-size: 34px;
}

/* TOPBAR */
:fullscreen .topbar,
:-webkit-full-screen .topbar {

    padding: 12px 20px;

    font-size: 18px;
}

/* ========================= */
/* QUITAR LÍNEA BLANCA */
/* ========================= */

html,
body{

    margin:0;
    padding:0;

    background:#08131f;

    overflow:hidden;
}

/* FULLSCREEN */
:fullscreen,
:-webkit-full-screen{

    background:#08131f;
}

/* CANVAS */
:fullscreen canvas,
:-webkit-full-screen canvas{

    border:none;
    outline:none;
}

/* ========================= */
/* VERTICAL MOBILE FIX */
/* ========================= */

@media (orientation: portrait){

    /* GAME */
    canvas{

        width:95vw;

        height:auto;

        max-height:55vh;

        margin:auto;

        display:block;
    }

    /* TOPBAR */
    .topbar{

        padding:6px 8px;

        font-size:13px;
    }

    .score-group{

        gap:5px;

        font-size:13px;
    }

    .btn-group{

        gap:5px;
    }

    .topbar button{

        padding:5px 8px;

        font-size:12px;
    }

    /* MOBILE CONTROLS */
    #mobileControls{

        bottom:10px;
    }

    .mobile-side{

        padding:10px;

        gap:8px;
    }

    .mobile-side button{

        width:60px;
        height:60px;

        font-size:24px;
    }

    /* MENU */
    .title{

        font-size:28px;
    }

    .menu-screen button{

        width:200px;

        font-size:16px;
    }

    /* WIN SCREEN */
    .win-screen h1{

        font-size:28px;
    }
}

    /* TOPBAR */
    .topbar{

        padding:8px;

        font-size:14px;
    }

    /* CONTROLES */
    #mobileControls{

        bottom:20px;

        align-items:flex-end;
    }

    .mobile-side{

        padding:10px;
        gap:8px;
    }

    .mobile-side button{

        width:65px;
        height:65px;

        font-size:26px;
    }

    /* MENÚ */
    .menu-screen{

        padding:20px;
    }

    .menu-screen button{

        width:220px;
    }

    .title{

        font-size:30px;
    }