html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background-image: url("FondoGuardianes.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* ------------------------------------------------------------
   CONTENEDOR UNITY
   ------------------------------------------------------------ */

#unity-container {
    position: fixed;

    left: 0;
    top: 0;

    width: 100vw;
    height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;
}


/* ------------------------------------------------------------
   CANVAS
   El tamaño real 16:9 lo controla resizeCanvas() desde index.html
   ------------------------------------------------------------ */

#unity-canvas {
    display: block;

    outline: none;

    background: transparent;
}


/* ------------------------------------------------------------
   PANTALLA DE CARGA
   ------------------------------------------------------------ */

#unity-loading-bar {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    display: none;

    z-index: 10000;
}


/* Contenedor del logo y de la barra */

#loading-content {
    width: 500px;

    display: flex;

    flex-direction: column;

    align-items: center;
}


/* ------------------------------------------------------------
   LOGO GUARDIANES
   ------------------------------------------------------------ */

#loading-logo {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
}


/* ------------------------------------------------------------
   BARRA DE CARGA - FONDO
   ------------------------------------------------------------ */

#unity-progress-bar-empty {
    position: relative;

    width: 100%;
    height: 14px;

    margin-top: 25px;

    padding: 0;

    background: rgba(255, 255, 255, 0.35);

    border-radius: 7px;

    overflow: hidden;

    box-sizing: border-box;
}


/* ------------------------------------------------------------
   BARRA DE CARGA - PROGRESO
   ------------------------------------------------------------ */

#unity-progress-bar-full {
    position: absolute;

    left: 0;
    top: 0;

    width: 0%;
    height: 100%;

    margin: 0;
    padding: 0;

    background: #ffffff;

    border-radius: 7px;

    box-sizing: border-box;
}


/* ------------------------------------------------------------
   MENSAJES DE UNITY
   ------------------------------------------------------------ */

#unity-warning {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;

    z-index: 9999;
}


/* ------------------------------------------------------------
   MODALES LEGALES
   ------------------------------------------------------------ */

.legal-modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;
    box-sizing: border-box;

    background: rgba(17, 24, 39, 0.55);

    z-index: 20000;

    font-family: Arial, Helvetica, sans-serif;
}

.legal-modal-box {
    width: min(900px, 100%);
    max-height: 85vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;
    border-radius: 10px;

    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.30);
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 22px;

    background: #f8f8f8;
    border-bottom: 1px solid #e5e7eb;
}

.legal-modal-header h3 {
    margin: 0;

    color: #006341;

    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}

.legal-modal-close {
    flex: 0 0 auto;

    padding: 0;
    margin: 0;

    border: 0;
    background: transparent;

    color: #6b7280;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}

.legal-modal-close:hover {
    color: #1f2937;
}

.legal-modal-body {
    min-height: 0;
    overflow-y: auto;

    padding: 28px 34px;

    color: #374151;

    font-size: 14px;
    line-height: 1.55;
    text-align: justify;

    overscroll-behavior: contain;
}

.legal-modal-body h4 {
    margin: 22px 0 9px;

    color: #006341;

    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.legal-modal-body h4:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin: 0 0 10px;
}

.legal-modal-body ul {
    margin: 8px 0 16px;
    padding-left: 28px;
}

.legal-modal-body li {
    margin: 4px 0;
}

.legal-modal-body .list-none {
    list-style: none;
    padding-left: 0;
}

.legal-modal-body .list-disc {
    list-style: disc;
}

.legal-modal-body a {
    color: #006341;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.legal-modal-body strong,
.legal-modal-body .font-bold,
.legal-modal-body .font-semibold {
    font-weight: 700;
}

.legal-modal-body .text-right {
    text-align: right;
}

.legal-modal-body .italic {
    font-style: italic;
}

.legal-modal-footer {
    padding: 14px 22px;

    text-align: right;

    background: #f8f8f8;
    border-top: 1px solid #e5e7eb;
}

.legal-modal-button {
    padding: 10px 24px;

    border: 0;
    border-radius: 5px;

    background: #006341;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.legal-modal-button:hover {
    background: #004f34;
}

@media (max-width: 700px) {
    .legal-modal {
        padding: 12px;
    }

    .legal-modal-box {
        max-height: 92vh;
    }

    .legal-modal-header {
        padding: 14px 16px;
    }

    .legal-modal-header h3 {
        font-size: 18px;
    }

    .legal-modal-body {
        padding: 20px 18px;

        font-size: 13px;
        text-align: left;
    }

    .legal-modal-footer {
        padding: 12px 16px;
    }
}
