body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { width: 100%; height: 100% }
#unity-canvas { background: #231F20 }
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-light.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-light.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-light.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* ========================================
   SCANNING FRAME STYLES
   ======================================== */

/* Container principale del frame di scanning */
#scanning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* Assicura che la scanline sia visibile anche in fullscreen */
:-webkit-full-screen #scanning,
:-moz-full-screen #scanning,
:-ms-fullscreen #scanning,
:fullscreen #scanning {
    z-index: 9999;
}

/* Quando visibile */
#scanning.visible {
    opacity: 1;
    visibility: visible;
}

/* Area interna del frame (quadrato responsive) */
#scanning .inner {
    position: relative;
    width: min(80vw, 80vh);
    height: min(80vw, 80vh);
    box-sizing: border-box;
}

/* Stile base per gli angoli */
#scanning .corner {
    position: absolute;
    width: 50px;
    height: 50px;
    border-style: solid;
    border-color: #FFD700;
    border-width: 0;
}

/* Angolo top-left */
#scanning .corner-tl {
    top: 0;
    left: 0;
    border-top-width: 4px;
    border-left-width: 4px;
    border-top-left-radius: 8px;
}

/* Angolo top-right */
#scanning .corner-tr {
    top: 0;
    right: 0;
    border-top-width: 4px;
    border-right-width: 4px;
    border-top-right-radius: 8px;
}

/* Angolo bottom-left */
#scanning .corner-bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 4px;
    border-left-width: 4px;
    border-bottom-left-radius: 8px;
}

/* Angolo bottom-right */
#scanning .corner-br {
    bottom: 0;
    right: 0;
    border-bottom-width: 4px;
    border-right-width: 4px;
    border-bottom-right-radius: 8px;
}

/* Linea di scanning animata */
#scanning .scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        transparent 0%,
        #FFD700 20%,
        #FFA500 40%,
        #FFA742 50%,
        #F19628 60%,
        #FF8C00 80%,
        transparent 100%
    );
    box-shadow: 0 0 15px #FFD700, 0 0 30px #FFA500;
    animation: move 3s ease-in-out infinite;
    opacity: 0.9;
}

/* Animazione della scanline (dall'alto verso il basso) */
@keyframes move {
    0%, 100% {
        top: 10%;
    }
    50% {
        top: 90%;
    }
}
