/* Video Intro Overlay Styles */
.video-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    visibility: visible; /* Assicura che sia sempre visibile */
}

.video-intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.video-intro-overlay video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

.video-skip-message {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
    z-index: 10001;
    opacity: 0.8;
    pointer-events: none;
    display: none; /* Nascosto inizialmente */
}

.video-skip-message:hover {
    opacity: 1;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    z-index: 10001;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .video-intro-overlay video {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        border-radius: 0;
        max-width: none;
        max-height: none;
        min-width: 100vw;
        min-height: 100vh;
        object-position: center center;
    }

    .video-skip-message {
        bottom: 20px;
        right: 20px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .video-loading {
        font-size: 1.2rem;
    }
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .video-intro-overlay video {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        border: none;
    }

    .video-skip-message {
        bottom: 50px;
        right: 50px;
        padding: 12px 20px;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .video-intro-overlay video {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        border-radius: 0;
        max-width: none;
        max-height: none;
        min-width: 100vw;
        min-height: 100vh;
        object-position: center center;
    }

    .video-skip-message {
        bottom: 15px;
        right: 15px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .video-loading {
        font-size: 1rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .video-intro-overlay video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }

    .video-skip-message {
        bottom: 10px;
        right: 15px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

/* Schermi extra lunghi (aspect ratio alto) */
@media (max-width: 768px) and (min-aspect-ratio: 16/9) {
    .video-intro-overlay video {
        width: 100%;
        height: 100vh;
        object-fit: cover;
        border-radius: 0;
        max-width: none;
        max-height: none;
        min-height: 100vh;
        min-width: 100vw;
    }
}

/* Schermi molto lunghi (come 20:9, 21:9) */
@media (max-width: 768px) and (min-aspect-ratio: 18/9) {
    .video-intro-overlay video {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        object-position: center center;
        border-radius: 0;
        max-width: none;
        max-height: none;
        min-height: 100vh;
        min-width: 100vw;
        transform: scale(1.1);
    }
}

/* Cursore personalizzato per video overlay */
.video-intro-overlay * {
    cursor: none !important;
}

.video-intro-overlay .cursor {
    z-index: 10002 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}
