.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.loading-overlay.hidden { opacity: 0; visibility: hidden; }

.loader-container { position: relative; width: 120px; height: 120px; }
.tv-loader { width: 100%; height: 100%; position: relative; }

.tv-frame {
    width: 100px; height: 70px;
    background: linear-gradient(145deg, #2a2a3a, #1a1a25);
    border-radius: 8px;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px #333, 0 0 0 6px #222, 0 20px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.tv-screen {
    position: absolute; inset: 6px;
    background: #000; border-radius: 4px; overflow: hidden;
}

.tv-screen::before {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1), rgba(0,0,0,0.1) 1px, transparent 1px, transparent 2px);
    pointer-events: none; z-index: 2;
}

.color-bars {
    display: flex; height: 100%;
    animation: staticNoise 0.5s steps(5) infinite;
}
.color-bars div { flex: 1; animation: colorShift 2s infinite; }
.color-bars div:nth-child(1) { background: #fff; animation-delay: 0s; }
.color-bars div:nth-child(2) { background: #ffff00; animation-delay: 0.1s; }
.color-bars div:nth-child(3) { background: #00ffff; animation-delay: 0.2s; }
.color-bars div:nth-child(4) { background: #00ff00; animation-delay: 0.3s; }
.color-bars div:nth-child(5) { background: #ff00ff; animation-delay: 0.4s; }
.color-bars div:nth-child(6) { background: #ff0000; animation-delay: 0.5s; }
.color-bars div:nth-child(7) { background: #0000ff; animation-delay: 0.6s; }

@keyframes colorShift { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes staticNoise { 0% { transform: translateX(0); } 100% { transform: translateX(-5px); } }

.tv-stand {
    position: absolute; bottom: 5px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 8px;
    background: linear-gradient(145deg, #333, #222);
    border-radius: 0 0 4px 4px;
}

.glow-ring {
    position: absolute; inset: -10px;
    border: 3px solid transparent; border-radius: 50%;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spinGlow 1.5s linear infinite;
}
.glow-ring::before {
    content: ""; position: absolute; inset: -3px;
    border: 3px solid transparent; border-radius: 50%;
    border-bottom-color: var(--accent);
    border-left-color: var(--gold);
    animation: spinGlow 2s linear infinite reverse;
}
@keyframes spinGlow { to { transform: rotate(360deg); } }

.loader-text {
    margin-top: 30px; font-size: 14px; font-weight: 600;
    letter-spacing: 3px; text-transform: uppercase;
}
.loader-text span {
    display: inline-block;
    animation: bounce 1.4s infinite;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.loader-text span:nth-child(1) { animation-delay: 0s; }
.loader-text span:nth-child(2) { animation-delay: 0.1s; }
.loader-text span:nth-child(3) { animation-delay: 0.2s; }
.loader-text span:nth-child(4) { animation-delay: 0.3s; }
.loader-text span:nth-child(5) { animation-delay: 0.4s; }
.loader-text span:nth-child(6) { animation-delay: 0.5s; }
.loader-text span:nth-child(7) { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.loader-progress {
    width: 200px; height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px; margin-top: 20px; overflow: hidden;
}
.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    width: 0%; transition: width 0.3s;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
