#paret1{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/puerta\ abierta.png);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

#paret2{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/ventana2.png);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

#paret4{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/puerta\ cerrada.png);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

#paret3{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/ventana.png);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

#paret5{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/suelo.png);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;

    /* Rotación inicial (se ajustará con JS) */
    transform: rotate(0deg);
    transition: transform 0.5s ease; /* animación suave */
}

#paret6{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url(img/parets/techo.PNG);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

body{
    margin: 0;
    background-color: #C6BFBA;
}

/* Contenedor general */
.pantalla{
    display: none;
    width: 100vw;
    height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
}

.activa{
    display: block;
}

/* Flechas */
.flecha{
    position: absolute;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 5%;
    height: 5%;
    cursor: pointer;
}

.bt_derecha{
    background-image: url(img/objectes/derecha.svg);
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.bt_izquierda{
    background-image: url(img/objectes/izquierda.svg);
    left: 4%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.bt_arriba{
    background-image: url(img/objectes/arriba.svg);
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.bt_abajo{
    background-image: url(img/objectes/abajo.svg);
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.flecha:hover{
    opacity: 0.5;
}


/* Barra superior */
#barra-superior{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000; /* Que quede encima de todo */
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Título */
#titulo{
    font-size: 1.5rem;
    font-weight: bold;
}

/* Inventario */
#inventario{
    display: flex;
    gap: 10px;
}

/* Slots de inventario */
.slot{
    width: 50px;
    height: 50px;
    background-color: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slot img{
    max-width: 90%;
    max-height: 90%;
    display: none; /* Solo se muestra al recoger objeto */
}

#cadenas{
    position: absolute;
    top: 47%;
    left: 28%;
    z-index: 1;
}

#palanca{
    position: absolute;
    top: 65%;
    left: 32.7%;
}
#puerta{
    position: absolute;
    top: 48%;
    left: 38%;
}

#mochilaLado{
    position: absolute;
    bottom: -2%;
    left: 48%;
}

#moxillaOculta{
    position: absolute;
    top: 28%;
    left: 2%;
}

#MochilaArriba{
    position: absolute;
    bottom: 48%;
    left: 8%;
    z-index: 1;
}
#extintor{
    position: absolute;
    bottom: 1%;
    left: 58%;
}

#extintorArriba{
    position: absolute;
    bottom: 60%;
    right: 18%;
    z-index: 1;
}

#extintorArribaOculto{
    position: absolute;
    bottom: 8%;
    left: 7%;
    z-index: 1;
}

#extintorOculto{
    position: absolute;
    bottom: 1%;
    left: 78%;
}

#llave{
    position: absolute;
    bottom: 55%;
    left: 15%;
}

#llaveOculta{
    position: absolute;
    bottom: 30%;
    left: 48%;
    z-index: 2;
}

.fondo-suelo, .fondo-techo{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 0;
}

.fondo-suelo{
    background-image: url(img/parets/suelo.png);
}

.fondo-techo{
    background-image: url(img/parets/techo.PNG);
}

/* ══════════════════════════════════════════════════════
   OBJETOS CLICABLES — efecto brillo/pulso
   ══════════════════════════════════════════════════════ */

/* Objetos recogibles del juego */
.objeto-clicable {
    filter: drop-shadow(0 0 6px rgba(255, 220, 50, 0.0));
    transition: filter 0.3s ease, transform 0.3s ease;
    animation: pulso-objeto 2.5s ease-in-out infinite;
}

.objeto-clicable:hover {
    filter: drop-shadow(0 0 10px rgba(255, 220, 50, 1)) brightness(1.2);
    transform: scale(1.08);
    animation: none;
}

@keyframes pulso-objeto {
    0%   { filter: drop-shadow(0 0 3px rgba(255, 220, 50, 0.2)); }
    50%  { filter: drop-shadow(0 0 8px rgba(255, 220, 50, 0.8)); }
    100% { filter: drop-shadow(0 0 3px rgba(255, 220, 50, 0.2)); }
}

/* Zonas de uso (donde se coloca el objeto) */
.zona-clicable {
    border: 2px dashed rgba(100, 200, 255, 0.0);
    border-radius: 6px;
    animation: pulso-zona 2.5s ease-in-out infinite;
    box-sizing: border-box;
}

.zona-clicable:hover {
    background: rgba(100, 200, 255, 0.15) !important;
    border: 2px dashed rgba(100, 200, 255, 0.9);
    animation: none;
}

@keyframes pulso-zona {
    0%   { border-color: rgba(100, 200, 255, 0.0);  box-shadow: none; }
    50%  { border-color: rgba(100, 200, 255, 0.6);  box-shadow: 0 0 10px rgba(100, 200, 255, 0.3); }
    100% { border-color: rgba(100, 200, 255, 0.0);  box-shadow: none; }
}

/* Slots del inventario con objeto disponible */
.slot-activo {
    animation: pulso-slot 2.5s ease-in-out infinite;
}

.slot-activo:hover {
    background-color: rgba(255, 255, 255, 0.35) !important;
    animation: none;
}

@keyframes pulso-slot {
    0%   { box-shadow: 0 0 0px rgba(255, 220, 50, 0.0); }
    50%  { box-shadow: 0 0 8px rgba(255, 220, 50, 0.7); }
    100% { box-shadow: 0 0 0px rgba(255, 220, 50, 0.0); }
}

/* Palanca activada */
.palanca-activa {
    animation: pulso-palanca 1.5s ease-in-out infinite;
}

@keyframes pulso-palanca {
    0%   { filter: drop-shadow(0 0 3px rgba(50, 255, 100, 0.2)); }
    50%  { filter: drop-shadow(0 0 10px rgba(50, 255, 100, 1)) brightness(1.3); }
    100% { filter: drop-shadow(0 0 3px rgba(50, 255, 100, 0.2)); }
}
