:root {
    --bg-color: #0b0e14;
    --neon-cyan: #00f0ff;
    --neon-green: #0f0;
    --text-color: #e0e6ed;
    --terminal-bg: #1a1f29;
    --cyber-font: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono-font: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--cyber-font);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Overlays */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
    opacity: 0.05;
    pointer-events: none;
    z-index: 999;
}

/* Header & Space Background */
.space-header {
    height: 50vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 2px solid var(--neon-cyan);
}

.nebula-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%; /* Wider for sliding */
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    animation: slide-bg 60s linear infinite alternate;
    z-index: 1;
}

@keyframes slide-bg {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 10;
}

/* Glitch Effect */
.glitch {
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 900;
    color: var(--text-color);
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                 -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
                 0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    animation: glitch 1s infinite;
    text-transform: lowercase;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch 650ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-0.025em, -0.0125em);
    opacity: 0.8;
}

.glitch::after {
    animation: glitch 375ms infinite;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(0.0125em, 0.025em);
    opacity: 0.8;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
}

.subtitle {
    font-family: var(--mono-font);
    color: var(--neon-cyan);
    letter-spacing: 5px;
    margin-top: 10px;
}

/* Terminal Styling */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.terminal-window {
    background: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    overflow: hidden;
}

.terminal-header {
    background: #2a2f39;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
    color: #888;
    font-size: 0.8rem;
    margin-left: 10px;
    font-family: var(--mono-font);
}

.terminal-body {
    padding: 20px;
    font-family: var(--mono-font);
    font-size: 0.95rem;
    color: var(--neon-green);
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

#matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.25; /* Subtle background rain */
    pointer-events: none;
}

.terminal-msg { 
    margin-bottom: 8px; 
    position: relative; 
    z-index: 10; 
    transition: opacity 0.8s ease-in-out;
}

.terminal-msg.fade-out {
    opacity: 0;
}
.prompt { color: #888; margin-right: 10px; }

/* Cyber Button */
.actions {
    text-align: center;
    margin-top: 40px;
}

.cyber-button {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
}

.cyber-button:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--neon-cyan);
}

footer {
    text-align: center;
    padding: 40px;
    font-size: 0.7rem;
    color: #555;
    font-family: var(--mono-font);
}
