/* ==========================================================================
   SABBY SIGNAL // SIMPLE CRT TV BOOT SEQUENCE (MATCHING SUNO, NO LOGO)
   ========================================================================== */

.tv-boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: all;
    cursor: default;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tv-boot-overlay.boot-finished {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tv-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.5) 50%),
                linear-gradient(90deg, rgba(0, 240, 255, 0.04), rgba(0, 255, 65, 0.02), rgba(0, 240, 255, 0.04));
    background-size: 100% 3px, 6px 100%;
    z-index: 10;
}

.tv-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.95), inset 0 0 45px rgba(0, 240, 255, 0.22);
    z-index: 11;
}

.tv-screen {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: crtTurnOn 0.85s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform-origin: center center;
}

.tv-beam {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 16px 5px var(--cyan), 0 0 38px 10px rgba(0, 240, 255, 0.85);
    opacity: 0;
    animation: crtBeamFlash 0.85s ease-out forwards;
    pointer-events: none;
}

.tv-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: tvContentFade 0.85s ease-out forwards;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 900px;
}

.tv-glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(20px, 5.2vw, 42px);
    font-weight: 900;
    letter-spacing: clamp(3px, 1vw, 6px);
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 0 10px var(--cyan), 0 0 25px var(--cyan), 0 0 45px rgba(0, 243, 255, 0.7);
}

.tv-subtext {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(11px, 2.5vw, 13px);
    letter-spacing: 3px;
    color: var(--cyan);
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.tv-telemetry-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-top: 4px;
}

.tv-progress-track {
    width: 240px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 14px;
}

.tv-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: tvBootProgress 4s linear forwards;
}

@keyframes tvBootProgress {
    0% { width: 0%; }
    20% { width: 22%; }
    45% { width: 50%; }
    70% { width: 75%; }
    90% { width: 92%; }
    100% { width: 100%; }
}

@keyframes crtTurnOn {
    0% { transform: scale(1, 0.003); filter: brightness(30); opacity: 0.1; }
    30% { transform: scale(1, 0.004); filter: brightness(20); opacity: 0.9; }
    45% { transform: scale(1, 0.015); filter: brightness(15); opacity: 1; }
    60% { transform: scale(1, 1); filter: brightness(1.8); opacity: 1; }
    85% { transform: scale(1, 1); filter: brightness(1.1); opacity: 1; }
    100% { transform: scale(1, 1); filter: brightness(1); opacity: 1; }
}

@keyframes crtBeamFlash {
    0% { opacity: 0; transform: scaleX(0); }
    15% { opacity: 1; transform: scaleX(1); }
    40% { opacity: 0.8; transform: scaleY(3); }
    60% { opacity: 0; transform: scaleY(0); }
    100% { opacity: 0; }
}

@keyframes tvContentFade {
    0%, 35% { opacity: 0; transform: scale(0.96); }
    55% { opacity: 1; transform: scale(1.02); }
    75% { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

/* CRT Boot Password Authentication Box */
.tv-auth-box {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    z-index: 25;
}

.tv-auth-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 2.5px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.tv-input-wrap {
    display: flex;
    width: 100%;
    gap: 6px;
}

.tv-auth-input {
    flex: 1;
    background: rgba(8, 12, 18, 0.95);
    border: 1px solid rgba(0, 243, 255, 0.4);
    border-radius: 3px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    letter-spacing: 2px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 243, 255, 0.15);
    transition: all 0.2s;
}

.tv-auth-input:focus {
    border-color: var(--cyan);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 243, 255, 0.45);
}

.tv-auth-btn {
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    transition: all 0.2s;
}

.tv-auth-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.6);
}

.tv-auth-error {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--red);
    min-height: 16px;
    text-shadow: 0 0 8px rgba(255, 51, 85, 0.6);
    letter-spacing: 1px;
}

.tv-auth-box.shake {
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.tv-skip-btn {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(11, 14, 21, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.35);
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
}

.tv-skip-btn:hover {
    color: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}
