html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* evita scroll */
    width: 100%;
    height: 100%;
}

canvas {
    display: block; /* evita que el canvas tenga espacio inline */
    width: 100%;
    height: 100%;
}

/* Contenedor UI - escritorio */
#ui {
    position: fixed;
    top: 50%;
    right: 60px;  /* espacio desde el borde derecho */
    transform: translateY(-50%);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botones comunes */
.floor-btn {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: white;
    cursor: pointer;
    transition: opacity 0.6s ease, background 0.3s ease,/*animacion*/ transform 0.15s ease, box-shadow 0.15s ease;
    opacity: 0;
    pointer-events: none;

    /*animacion*/
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

}

/*animacion*/

.floor-btn.pressed {
    transform: scale(1.08) translateY(2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Estados */
.floor-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.floor-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.floor-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.floor-btn:not(:disabled):hover {
    /*background: #555;*/ /*no necesario porque quita el rojo de return mode y se quda como disabled*/
}

.floor-btn.return-mode {
    background: #a33;
}

/* --- MEDIA QUERY PARA MÓVIL --- */
@media (max-width: 968px) {
    #ui {
        top: auto;       /* quitamos centrar vertical */
        bottom: 20px;    /* pegado abajo */
        left: 50%;       /* centrado horizontal */
        right: auto;     /* anulamos el right de escritorio */
        transform: translateX(-50%);  /* centramos horizontal */
        flex-direction: column;
        gap: 16px;
        width: 90%;      /* ancho grande para móvil */
        max-width: 400px;
    }

    .floor-btn {
        font-size: 2rem;   /* aún más grande */
        padding: 1.5rem 2rem;
        border-radius: 1rem;
    }

    .info-box {
        bottom: 300px;  /* sobre los botones grandes de móvil */
        width: 90%;
        max-width: 400px;
        padding: 20px;
    }
    /*----------------cajas movil----------*/
    .info-box h3 {
        font-size: 1.5rem;
    }

    .info-box p {
        font-size: 1.2rem;
    }

    .info-btn {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
}
/*----------------cajas-----*/
.info-box {
    position: fixed;
    bottom: 200px; /* sobre los botones si es móvil, o ajusta */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(50, 50, 50, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 10000;
}

.info-box.visible {
    opacity: 1;
    pointer-events: auto;
}

.info-box h3 {
    margin: 0 0 8px 0;
    font-size: 2rem;
}

.info-box p {
    margin: 0 0 12px 0;
    font-size: 1.9rem;
}

.info-btn {
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background: #a33;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.info-btn:hover {
    background: #c55;
}

/* Móvil: más grande y arriba de los botones */
@media (max-width: 768px) {

}
