/* Loading Screen CSS - User-Provided Implementation with Fade Transitions */

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c&display=swap');

/* === LOADING SCREEN === */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; /* Fallback for browsers without dvh support */
    height: 100dvh; /* Dynamic viewport height - adjusts for mobile UI */
    background-color: #000; /* Black background as requested */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Smooth fade-out */
    z-index: 9999; /* Ensure it's on top */
}

/* Ensure loading screen is completely removed when hidden */
#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important; /* Force complete removal */
}

#main-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in, visibility 0.5s ease-in; /* Smooth fade-in */
}

/* Loading text */
.loading-text {
    color: #ebe441;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-family: 'Courier New', monospace;
    font-weight: normal;
    margin-bottom: 3rem;
    text-align: center;
    /* Plain yellow text - no shadows or decorations */
}

/* User-provided loader animation */
.loader-div {
    position: relative; /* Changed from fixed since it's inside loading-screen */
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    position: relative;
    width: 10vw;
    height: 5vw;
    padding: 1.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader span {
    position: absolute;
    height: 0.8vw;
    width: 0.8vw;
    border-radius: 50%;
    background-color: #e1d751;
}

.loader span:nth-child(1) {
    animation: loading-dotsA 0.5s infinite linear;
}

.loader span:nth-child(2) {
    animation: loading-dotsB 0.5s infinite linear;
}

@keyframes loading-dotsA {
    0% {
        transform: none;
    }
    25% {
        transform: translateX(2vw);
    }
    50% {
        transform: none;
    }
    75% {
        transform: translateY(2vw);
    }
    100% {
        transform: none;
    }
}

@keyframes loading-dotsB {
    0% {
        transform: none;
    }
    25% {
        transform: translateX(-2vw);
    }
    50% {
        transform: none;
    }
    75% {
        transform: translateY(-2vw);
    }
    100% {
        transform: none;
    }
}

/* === POWER BUTTON INSTRUCTION === */
/* Power instruction positioning moved to core-layout.css to match TV element positioning */

.power-instruction.hidden {
    display: none;
}

/* Power instruction text styling moved to core-layout.css */

.power-instruction b span {
    animation: blink linear infinite 2s;
}

.power-instruction b span:nth-of-type(2) {
    animation: blink linear infinite 3s;
}

@keyframes blink {
    78% {
        color: inherit;
        text-shadow: inherit;
    }
    79% {
        color: #333;
    }
    80% {
        text-shadow: none;
    }
    81% {
        color: inherit;
        text-shadow: inherit;
    }
    82% {
        color: #333;
        text-shadow: none;
    }
    83% {
        color: inherit;
        text-shadow: inherit;
    }
    92% {
        color: #333;
        text-shadow: none;
    }
    92.5% {
        color: inherit;
        text-shadow: inherit;
    }
}

/* === RESPONSIVE ADJUSTMENTS === */

/* Wide screens - no override needed, power instruction positions relative to TV container */

/* Mobile */
@media (max-width: 768px) {
    .loading-text {
        font-size: clamp(1rem, 3vw, 2rem);
        margin-bottom: 2rem;
    }

    /* Power instruction sizing removed - now handled by TV container scaling */
}