/* Bloomberg Terminal Professional Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
    font-family: 'Doto', 'Courier New', monospace;
}

/* Pixel Effect Overlay */
.pixel-effect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.pixel-effect-overlay.active {
    opacity: 1;
}

.pixel-effect-overlay.fade-out {
    opacity: 0;
    transition: opacity 2s ease-out;
}

.startup-pixel {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #ff6600;
    animation: pixelFade 3s ease-out forwards;
}

@keyframes pixelFade {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.loader-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 600px;
    width: 100%;
    padding: 20px;
}

/* Terminal Logo Animation */
.terminal-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(12, 8px);
    grid-template-rows: repeat(6, 8px);
    gap: 1px;
    animation: logoScan 3s ease-in-out infinite;
}

.logo-pixel {
    width: 8px;
    height: 8px;
    background: #ff6600;
    opacity: 0;
    animation: pixelBuild 2s ease-out infinite;
}

/* Bloomberg-style pixel pattern */
.logo-pixel:nth-child(1), .logo-pixel:nth-child(2), .logo-pixel:nth-child(3), .logo-pixel:nth-child(10), .logo-pixel:nth-child(11), .logo-pixel:nth-child(12) { animation-delay: 0.1s; }
.logo-pixel:nth-child(13), .logo-pixel:nth-child(24), .logo-pixel:nth-child(25), .logo-pixel:nth-child(36) { animation-delay: 0.2s; }
.logo-pixel:nth-child(37), .logo-pixel:nth-child(38), .logo-pixel:nth-child(39), .logo-pixel:nth-child(46), .logo-pixel:nth-child(47), .logo-pixel:nth-child(48) { animation-delay: 0.3s; }
.logo-pixel:nth-child(49), .logo-pixel:nth-child(60), .logo-pixel:nth-child(61), .logo-pixel:nth-child(72) { animation-delay: 0.4s; }

@keyframes pixelBuild {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    30% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

@keyframes logoScan {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.2);
    }
}

/* Professional Terminal Text */
.terminal-brand {
    color: #ff6600;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: brandFlicker 4s ease-in-out infinite;
}

@keyframes brandFlicker {
    0%, 90%, 100% {
        opacity: 1;
    }
    95% {
        opacity: 0.8;
    }
}

/* Data Stream Animation */
.terminal-stream {
    width: 100%;
    max-width: 500px;
    height: 120px;
    background: #0a0a0a;
    padding: 15px;
    overflow: hidden;
    position: relative;
}

.stream-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    font-family: 'Doto', monospace;
    opacity: 0;
    animation: streamIn 0.8s ease-out forwards;
}

.stream-line:nth-child(1) { animation-delay: 0.5s; }
.stream-line:nth-child(2) { animation-delay: 0.8s; }
.stream-line:nth-child(3) { animation-delay: 1.1s; }
.stream-line:nth-child(4) { animation-delay: 1.4s; }
.stream-line:nth-child(5) { animation-delay: 1.7s; }

.stream-prefix {
    color: #666;
    margin-right: 10px;
    min-width: 60px;
}

.stream-data {
    color: #ff6600;
    font-weight: 500;
}

.stream-status {
    color: #888;
    margin-left: auto;
    font-size: 10px;
}

@keyframes streamIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Professional Progress Bar */
.terminal-progress {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}

.progress-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8833 0%, #ff6600 50%, #ff4400 100%);
    width: 0%;
    animation: terminalProgress 4s ease-out forwards;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 102, 0, 0.3) 100%);
    animation: progressGlow 1s ease-in-out infinite;
}

@keyframes terminalProgress {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 35%; }
    60% { width: 55%; }
    80% { width: 80%; }
    100% { width: 100%; }
}

@keyframes progressGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Status Indicators */
.status-indicators {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #ff6600;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-item:nth-child(2) .status-dot { animation-delay: 0.3s; }
.status-item:nth-child(3) .status-dot { animation-delay: 0.6s; }

@keyframes statusPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Data Visualization Bars */
.data-viz {
    display: flex;
    align-items: end;
    gap: 3px;
    height: 40px;
    margin-top: 20px;
}

.viz-bar {
    width: 4px;
    background: #ff6600;
    border-radius: 0;
    animation: dataFlow 2s ease-in-out infinite;
    opacity: 0.6;
}

.viz-bar:nth-child(1) { height: 20%; animation-delay: 0s; }
.viz-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.viz-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.viz-bar:nth-child(4) { height: 80%; animation-delay: 0.3s; }
.viz-bar:nth-child(5) { height: 30%; animation-delay: 0.4s; }
.viz-bar:nth-child(6) { height: 70%; animation-delay: 0.5s; }
.viz-bar:nth-child(7) { height: 50%; animation-delay: 0.6s; }
.viz-bar:nth-child(8) { height: 90%; animation-delay: 0.7s; }
.viz-bar:nth-child(9) { height: 35%; animation-delay: 0.8s; }
.viz-bar:nth-child(10) { height: 65%; animation-delay: 0.9s; }

@keyframes dataFlow {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.1);
    }
}

/* Terminal Cursor */
.terminal-cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: #ff6600;
    margin-left: 5px;
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Loading Text with Professional Styling */
.loader-text {
    color: #ff6600;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-top: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loader-subtext {
    color: #666;
    font-size: 11px;
    text-align: center;
    margin-top: 8px;
    letter-spacing: 1px;
    animation: textFade 3s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loader-container {
        gap: 30px;
        padding: 15px;
    }
    
    .terminal-brand {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .data-stream {
        height: 100px;
        padding: 12px;
    }
    
    .stream-line {
        font-size: 10px;
        margin-bottom: 6px;
    }
}