@font-face {
    font-family: Outfit;
    src: url("/fonts/Outfit/Outfit-VariableFont_wght.ttf");
}
@keyframes brillo {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(2);
    }
    100% {
        filter: brightness(1);
    }
}
body {
    font-family:
        Outfit,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
}
#videoContainer {
    position: fixed;
    margin: 0;
    padding: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: -10;
    align-items: center;
    justify-content: center;
    background-image: cover;
    background-position: center;
    display: none;
}
#emision {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
    transform-origin: center center;
    opacity: 0;
}
/* Instrucciones: se desvanecen a los 10s, al conectar o al mover el ratón. */
#instruccionesLang {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 40px;
    z-index: 200;
    transition: opacity 1.5s ease-in-out;
}
#instruccionesLang.oculto {
    opacity: 0;
    pointer-events: none;
}
/* Aviso de error en pantalla (sustituye a los alert()) */
#errorMsg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    text-align: center;
    color: whitesmoke;
    background-color: rgba(0, 0, 0, 0.88);
}
#errorMsg h2 {
    margin: 0;
    font-size: 2.2em;
    color: lightsalmon;
}
#errorMsg p {
    margin: 0;
    max-width: 560px;
    font-size: 1.1em;
}
#errorMsg button {
    padding: 12px 24px;
    font-size: 1em;
}
/* Botón de pantalla completa: se opera con el mando (flechas + Enter). */
#btnCompleto {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    color: whitesmoke;
    background-color: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}
#btnCompleto.visible {
    display: flex;
}
#btnCompleto:hover {
    background-color: rgba(0, 0, 0, 0.85);
    border-color: whitesmoke;
}
/* Foco visible: imprescindible para moverse con el mando. */
:focus-visible {
    outline: 3px solid lightsalmon;
    outline-offset: 2px;
}
#emision:focus-visible {
    outline: 3px solid lightsalmon;
    outline-offset: -8px;
}
#pantallaInfo {
    position: fixed;
    background: #ffffff;
    background: linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.8) 22%,
        rgba(255, 255, 255, 0) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 300;
    bottom: 0;
    left: 0;
    width: 100vw;
    padding-bottom: 10px;
}

#pantallaInfo::before {
    mask: linear-gradient(
        0deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    backdrop-filter: blur(30px);
}

#idNum {
    font-size: 4em;
    margin: 10px;
    margin-top: 20px;
    font-family: monospace;
}

body {
    height: 100vh;
    width: 100vw;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

.connTarjeta {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    max-width: 300px;
    height: 500px;
    backdrop-filter: blur(8px);
    border-radius: 21px;
    overflow-y: scroll;
    transition: 1s all;
}
/* Cuando está conectado el texto puede desbordar: se deja espacio abajo
   para que el botón flotante no lo tape, y la tarjeta termina por encima
   del botón para que nunca lo cubra. */
.connTarjeta.conectado {
    padding-bottom: 30px;
    max-height: calc(100vh - 170px);
    margin-bottom: 80px;
}
/* Botón de desconectar: siempre visible, no se va con el scroll. */
#btnDesconectar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: min(280px, calc(100vw - 40px));
    min-height: 45px;
    z-index: 600;
    background-color: red;
    border: 0 none;
    color: whitesmoke;
    padding: 15px;
    border-radius: 16px;
    white-space: nowrap;
}
/* Código QR con el destino. */
#qrBloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
#qrDestino {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: whitesmoke;
    border-radius: 16px;
}
#qrDestino img,
#qrDestino canvas {
    display: block;
}
#qrBloque p {
    margin: 0;
    font-size: 0.9em;
}

form {
    transition: all 0.5s;
    display: flex;
    gap: 5px;
    flex-direction: column;
}

button {
    border: 2px solid black;
    border-radius: 8px;
    background-color: black;
    padding: 5px 10px;
    color: lightsalmon;
    transition: all 0.3s;

    font-weight: bolder;
}
#idHold {
    border: 2px solid darkgray;
    border-radius: 8px;
    background-color: white;
    transition: all 0.3s;
    font-size: 18px;
    padding: 10px 10px;
    text-align: center;
}
#idHold:focus {
    border: 2px solid lightsalmon;
    outline: none;
    transition: all 0.3s;
}

#annWindow {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.05);
    background-image: url("/bg.png");
    background-size: 80px;
    background-repeat: repeat;
    border-radius: 21px;
    margin-top: 20px;
    padding: 10px;
    opacity: 1;
    transition: all 1s;
    gap: 14px;
    p{
        margin: 0;
        padding: 0;
    }
}
#cercade {
    transition: 0.3s all;

    overflow: hidden;
}
