/* ===================================
   DevOps Portfolio - Control Center Theme
   =================================== */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #1e2d4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00f3ff;
}

/* Scanline overlay */
.scanline {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    opacity: 0.1;
}

/* Block scrolling during loader */
body.loading {
    overflow: hidden;
}



/* Glitch effect on hover */
.glitch-hover:hover {
    animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

/* Data stream animation */
.data-stream {
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 243, 255, 0.03) 50%,
            transparent 100%);
    background-size: 100% 200%;
    animation: stream 3s linear infinite;
}

@keyframes stream {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 200%;
    }
}

/* Blinking cursor */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.animate-blink {
    animation: blink 1s step-end infinite;
}

/* Float animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse slow */
@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Neon shadows */
.shadow-neon {
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.2), 0 0 10px rgba(0, 243, 255, 0.1);
}

.shadow-neon-strong {
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3), 0 0 20px rgba(0, 243, 255, 0.2);
}

/* Counter styling */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scanline,
    .scan-beam,
    .loader {
        display: none !important;
    }

    .main-content {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ===================================
   Terminal Boot Loader
   =================================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #050505;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-terminal {
    width: 90%;
    max-width: 600px;
    background: #0a192f;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.1);
}

.loader-terminal-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.loader-terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.loader-terminal-dot.red {
    background: #ff5f56;
}

.loader-terminal-dot.yellow {
    background: #ffbd2e;
}

.loader-terminal-dot.green {
    background: #27ca40;
}

.loader-terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8892b0;
    margin-right: 46px;
}

.loader-terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: #00f3ff;
    min-height: 180px;
}

.loader-line {
    opacity: 0;
    transform: translateY(5px);
}

.loader-line.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.loader-line.dim {
    color: #8892b0;
}

.loader-line.success {
    color: #00ff88;
}

.loader-line.warning {
    color: #ffd600;
}

.loader-line.white {
    color: #e6f1ff;
}

.loader-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00f3ff;
    margin-left: 2px;
    animation: cursorBlink 0.6s step-end infinite;
    vertical-align: middle;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.loader-progress {
    margin-top: 15px;
    height: 3px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f3ff, #00ff88);
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* Main content hidden during load */
.main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

/* PCB Background */
.bg-pcb {
    background-image: url('../img/pcb_bg.png');
    background-size: 400px;
    background-repeat: repeat;
    background-blend-mode: soft-light;
    background-color: rgba(10, 25, 47, 0.8);
    /* Blend with panel color */
}