@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Share+Tech+Mono&display=swap');

:root {
    --bg-color: #050510;
    --primary-color: #00f3ff;
    /* Cyberpunk Cyan */
    --secondary-color: #ff0055;
    /* Cyberpunk Pink */
    --text-color: #e0e0e0;
    --glass-bg: rgba(10, 15, 30, 0.75);
    --glass-border: 1px solid rgba(0, 243, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden;
    /* Prevent scrolling for matrix canvas */
    height: 100vh;
    width: 100vw;
}

#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1.0;
    /* Full visibility */
}

/* Scanline Effect - More subtle */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    padding: 1rem;
    /* backdrop-filter: blur(2px); REMOVED for clarity */
}

.terminal-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding: 2.5rem;
    width: 100%;
    max-width: 700px;
    box-shadow:
        0 0 20px rgba(0, 243, 255, 0.15),
        0 0 40px rgba(255, 0, 85, 0.1);
    position: relative;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.terminal-container::before {
    content: "NETRUNNER_INTERFACE_V2.0";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--primary-color);
    font-size: 0.8rem;
    letter-spacing: 2px;
    border: 1px solid var(--glass-border);
}

.header {
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.prompt {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.content {
    min-height: 80px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
    white-space: pre-wrap;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.glitch-wrapper {
    text-align: center;
    margin: 2rem 0;
}

.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    position: relative;
    text-shadow:
        2px 2px 0px var(--secondary-color),
        -2px -2px 0px var(--primary-color);
    animation: pulse 3s infinite;
}

.status-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
}

#load-status {
    color: var(--primary-color);
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.2s ease-out;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    95% {
        opacity: 0.9;
    }
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 768px) {
    .terminal-container {
        padding: 1.5rem;
        width: 95%;
    }

    .glitch {
        font-size: 1.8rem;
    }

    .content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .terminal-container {
        padding: 1.2rem;
        border-width: 1px;
    }

    .terminal-container::before {
        font-size: 0.6rem;
        top: -10px;
    }

    .glitch {
        font-size: 1.4rem;
        /* Smaller title on mobile */
        letter-spacing: 1px;
    }

    .header {
        font-size: 1rem;
    }

    .prompt {
        display: block;
        /* Stack prompt for space */
        margin-bottom: 0.2rem;
    }
}

/* TERMINAL INPUT */
.input-line {
    display: flex;
    align-items: center;
}

.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 2rem 0;
}

#cmd-input {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    flex: 1;
    margin-left: 10px;
    outline: none;
    caret-color: var(--primary-color);
}

/* --- HACKER CENTRAL NAV --- */
.hacker-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 2rem 0;
    min-height: 60px;
    /* Placeholder during load */
}

.hacker-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px 25px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hacker-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.1;
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: -1;
}

.hacker-btn:hover::before {
    transform: translateX(0);
}

.hacker-btn:hover {
    box-shadow: 0 0 15px var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
    letter-spacing: 2px;
}

/* Color Variants */
.hacker-btn.gold {
    border-color: #FFD700;
    color: #FFD700;
}

.hacker-btn.gold::before {
    background: #FFD700;
}

.hacker-btn.gold:hover {
    box-shadow: 0 0 15px #FFD700;
    text-shadow: 0 0 8px #FFD700;
}

.hacker-btn.pink {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.hacker-btn.pink::before {
    background: var(--secondary-color);
}

.hacker-btn.pink:hover {
    box-shadow: 0 0 15px var(--secondary-color);
    text-shadow: 0 0 8px var(--secondary-color);
}

.hacker-btn.red {
    border-color: #ff3333;
    color: #ff3333;
}

.hacker-btn.red::before {
    background: #ff3333;
}

.hacker-btn.red:hover {
    box-shadow: 0 0 15px #ff3333;
    text-shadow: 0 0 8px #ff3333;
}

/* Responsive Grid */
@media (max-width: 600px) {
    .hacker-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .hacker-btn {
        justify-content: center;
    }
}