/* TV Loading Content */
.tv-loading-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000 0%, #1a0033 25%, #000 50%, #1a0033 75%, #000 100%);
    background-size: 400% 400%;
    animation: retroGradient 3s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

/* Retro gradient animation */
@keyframes retroGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* TV Loading container */
.tv-loading-container {
    text-align: center;
    animation: loadingPulse 2s ease-in-out infinite alternate;
}

/* Loading pulse animation */
@keyframes loadingPulse {
    0% {
        transform: scale(0.98);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.02);
        opacity: 1;
    }
}

/* TV Loading text */
.tv-loading-text {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
    text-shadow:
        0 0 10px #53d8d7,
        0 0 20px #53d8d7,
        0 0 30px #53d8d7,
        0 0 40px #53d8d7;
}

/* Individual character animation */
.tv-loading-char {
    display: inline-block;
    color: #53d8d7;
    animation: charGlow 1.5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.2s);
}

.tv-loading-char:nth-child(1) {
    --char-index: 0;
}

.tv-loading-char:nth-child(2) {
    --char-index: 1;
}

.tv-loading-char:nth-child(3) {
    --char-index: 2;
}

.tv-loading-char:nth-child(4) {
    --char-index: 3;
}

@keyframes charGlow {

    0%,
    100% {
        transform: scale(1) rotateY(0deg);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1) rotateY(180deg);
        filter: brightness(1.5);
    }
}

/* TV Loading bar */
.tv-loading-bar {
    width: 200px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #53d8d7;
    border-radius: 4px;
    margin: 0 auto 1.5rem auto;
    overflow: hidden;
    box-shadow:
        inset 0 0 10px rgba(83, 216, 215, 0.3),
        0 0 20px rgba(83, 216, 215, 0.5);
}

/* TV Loading progress */
.tv-loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #53d8d7 0%, #8b5cf6 50%, #53d8d7 100%);
    background-size: 200% 100%;
    animation: progressFlow 2s ease-in-out infinite, progressFill 3s ease-out forwards;
    box-shadow: 0 0 10px #53d8d7;
}

@keyframes progressFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* TV Loading subtitle */
.tv-loading-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #53d8d7;
    letter-spacing: 0.1em;
    text-shadow:
        0 0 5px #53d8d7,
        0 0 10px #53d8d7,
        0 0 15px #53d8d7;
    animation: subtitleBlink 1s ease-in-out infinite;
}

@keyframes subtitleBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

/* TV Retro scanlines overlay */
.tv-loading-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(83, 216, 215, 0.03) 50%);
    background-size: 100% 4px;
    animation: scanlines 0.1s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

/* TV Retro noise overlay */
.tv-loading-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="1" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.1"/></svg>');
    opacity: 0.1;
    pointer-events: none;
    z-index: 2;
}

/* TV Loading Responsive design */
@media (max-width: 768px) {
    .tv-loading-text {
        font-size: 2rem;
        letter-spacing: 0.2em;
    }

    .tv-loading-bar {
        width: 150px;
        height: 5px;
    }

    .tv-loading-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.08em;
    }
}

@media (max-width: 480px) {
    .tv-loading-text {
        font-size: 1.8rem;
        letter-spacing: 0.15em;
    }

    .tv-loading-bar {
        width: 120px;
        height: 4px;
    }

    .tv-loading-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 360px) {
    .tv-loading-text {
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }

    .tv-loading-bar {
        width: 100px;
        height: 3px;
    }

    .tv-loading-subtitle {
        font-size: 0.5rem;
        letter-spacing: 0.03em;
    }
}