@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Outfit:wght@300;500;700;900&display=swap');

:root {
    --bg-dark: #020202;
    --neon-green: #89e600; 
    --text-light: #ffffff;
    --hacker-green: rgba(137, 230, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Share Tech Mono', monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* CRT Scanlines */
.scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    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;
    z-index: 10;
    pointer-events: none;
}

/* Radial Noise CSS */
.noise {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at center, transparent 0%, var(--bg-dark) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(137, 230, 0, 0.03) 2px, rgba(137, 230, 0, 0.03) 4px);
    z-index: 11;
    pointer-events: none;
}

/* HUD Corners */
.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--hacker-green);
    z-index: 5;
    opacity: 0.5;
}
.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* Background Terminal Output */
.terminal-bg {
    position: absolute;
    top: 0; left: 20px; right: 0; bottom: 0;
    color: var(--hacker-green);
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.15;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Share Tech Mono', monospace;
}

/* Main Container */
.loader-container {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 20, 0, 0.8) 0%, transparent 60%);
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 600px;
}

.glitch-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Glitch Effect on Logo/Fallback */
.glitch-effect {
    filter: drop-shadow(0 0 15px rgba(137, 230, 0, 0.4));
    animation: glitchLogo 3s infinite alternate;
}

@keyframes glitchLogo {
    0% { transform: skew(0deg); opacity: 1; filter: drop-shadow(0 0 15px rgba(137, 230, 0, 0.4)); }
    5% { transform: skew(-5deg); opacity: 0.8; filter: drop-shadow(0 0 15px rgba(137, 230, 0, 0.8)); }
    10% { transform: skew(5deg); opacity: 1; }
    15% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.sys-info {
    font-size: 0.8rem;
    color: var(--hacker-green);
    display: flex;
    justify-content: space-between;
    width: 400px;
    letter-spacing: 2px;
    border-bottom: 1px dashed rgba(137, 230, 0, 0.3);
    padding-bottom: 5px;
}

.loading-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.loading-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bracket {
    color: var(--hacker-green);
    font-size: 1.5rem;
    font-weight: 300;
}

.loading-bar-container {
    flex-grow: 1;
    height: 12px;
    background-color: rgba(137, 230, 0, 0.05);
    border: 1px solid rgba(137, 230, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    position: relative;
}

/* Hacker stripes on loading bar */
.loading-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(0,0,0, 0.3) 25%,
        transparent 25%,
        transparent 50%,
        rgba(0,0,0, 0.3) 50%,
        rgba(0,0,0, 0.3) 75%,
        transparent 75%,
        transparent
    );
    background-size: 15px 15px;
    animation: moveStripes 0.5s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 15px 0; }
}

.status-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: flex-start;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 0 0 5px var(--neon-green);
}

/* Blinking cursor effect on text */
.loading-text::after {
    content: ' _';
    animation: blinkCursor 1s step-end infinite;
}

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

.percentage {
    font-size: 1rem;
    color: var(--neon-green);
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-green);
}
