@font-face {
    font-family: "KolbiSans";
    src: url("fonts/KolbiSans-Bold.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    overflow: hidden;
    background: #000;
    width: 100vw;
    height: 100vh;
}

#unity-container {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#unity-canvas {
    background: #000;
    position: absolute;
    touch-action: auto;
}

#unity-loading-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    gap: 14px; /* espacio controlado entre logo, barra y texto */
}

#unity-logo {
    background: url('logo.png') center no-repeat;
    background-size: contain;
    width: 200px;
    height: 200px;
}

#unity-progress-bar-empty {
    width: 280px;          /* 🔒 ancho fijo */
    height: 8px;           /* 🔒 altura fija */
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;        /* 🔑 evita deformación */
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: #4caf50;
}

#rotation-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: black;
    color: white;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

#rotation-warning p {
    font-family: "KolbiSans", sans-serif;
    font-size: 18px;      
    font-weight: bold;
    margin: 0;
    padding: 0 20px;
    text-align: center;

    /* iOS / Safari fixes */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
    #rotation-warning p {
        font-size: 16px;
    }
}

#rotation-warning img {
    width: 25%;
    margin-bottom: 20px;
}


#loading-text {
    width: 280px;         
    min-height: 32px;   
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    opacity: 0.85;
    font-family: "KolbiSans", sans-serif;
    line-height: 1.4;
    transition: opacity 0.3s ease;

    /* iOS / Safari fixes */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#loading-text {
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    #unity-progress-bar-empty,
    #loading-text {
        width: 240px;
    }

    #loading-text {
        font-size: 13px;
    }
}