:root {
    --neon-green: #0f0;
    --neon-pink: #f0f;
    --neon-blue: #0ff;
    --bg-black: #050505;
    --dark-green: #001100;
}

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

body {
    background-color: var(--bg-black);
    color: var(--neon-green);
    font-family: 'Share Tech Mono', monospace;
    min-height: 100vh;
    /* Changed from height to min-height */
    /* overflow: hidden; Removed to allow scrolling if needed */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

/* CRT EFFECTS */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 100%), linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.1;
    animation: scan 4s linear infinite;
    z-index: 998;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

/* CONTAINER */
.terminal-container {
    width: 900px;
    min-height: 800px;
    /* Increased height */
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2), inset 0 0 20px rgba(0, 255, 0, 0.1);
    background: rgba(0, 10, 0, 0.9);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Ensure it scales */
    max-width: 95vw;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid var(--neon-green);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    font-size: 1.2rem;
}

.glitch {
    font-size: 5rem;
    font-weight: 700;
    text-shadow: 2px 2px var(--neon-pink), -2px -2px var(--neon-blue);
    margin-bottom: 1rem;
    animation: glitch 1s infinite alternate;
}

@keyframes glitch {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-10deg);
    }

    40% {
        transform: skew(10deg);
    }

    60% {
        transform: skew(-5deg);
    }

    80% {
        transform: skew(5deg);
    }

    100% {
        transform: skew(0deg);
    }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 4rem;
    opacity: 0.8;
}

/* GRID */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Changed flex to grid */
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    border: 1px solid var(--neon-green);
    padding: 1rem;
    background: rgba(0, 20, 0, 0.3);
}

.card-header {
    background: var(--neon-green);
    color: black;
    padding: 0.25rem 0.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    /* Changed to inline block aesthetic */
    width: 100%;
}

.progress-bar-retro {
    height: 20px;
    border: 2px solid var(--neon-green);
    padding: 2px;
    margin-top: 1rem;
}

.fill {
    width: 70%;
    height: 100%;
    background: repeating-linear-gradient(90deg, var(--neon-green) 0, var(--neon-green) 10px, transparent 10px, transparent 15px);
    animation: load 2s infinite ease-in-out;
}

@keyframes load {
    0% {
        width: 10%;
    }

    50% {
        width: 90%;
    }

    100% {
        width: 10%;
    }
}

.data-list {
    list-style: none;
}

.data-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.green {
    color: var(--neon-green);
}

.red {
    color: var(--neon-pink);
}

.yellow {
    color: #fe0;
}

/* NEW WIDGETS */
.net-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.net-node {
    height: 30px;
    border: 1px solid var(--neon-green);
    background: rgba(0, 255, 0, 0.1);
}

.net-node.active {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.net-node.inactive {
    border-color: #333;
}

.net-node.warning {
    background: #fe0;
    border-color: #fe0;
    box-shadow: 0 0 10px #fe0;
}

.small-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.bar-wrap {
    flex: 1;
    height: 10px;
    background: #002200;
    border: 1px solid var(--neon-green);
}

.bar-fill {
    height: 100%;
    background: var(--neon-green);
}

/* LOGS */
.logs-container {
    border: 1px solid var(--neon-green);
    padding: 1rem;
    margin-bottom: 2rem;
    height: 150px;
    overflow-y: hidden;
    position: relative;
}

.log-content p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.log-content p:last-child {
    animation: blink 1s infinite;
}

/* FOOTER */
.terminal-footer {
    margin-top: auto;
    border-top: 1px solid var(--neon-green);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* CMD */
.command-line {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.prompt {
    color: var(--neon-pink);
}

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

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ACTIONS */
.actions {
    display: flex;
    gap: 2rem;
}

.btn-cyber {
    background: var(--neon-green);
    color: black;
    text-decoration: none;
    padding: 1rem 3rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.25rem;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: 0.2s;
}

.btn-cyber:hover {
    background: white;
    box-shadow: 0 0 20px var(--neon-green);
}

.btn-cyber-alt {
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    text-decoration: none;
    padding: 1rem 3rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.25rem;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: 0.2s;
}

.btn-cyber-alt:hover {
    background: var(--neon-pink);
    color: black;
    box-shadow: 0 0 20px var(--neon-pink);
}

/* Mobile */
@media (max-width: 950px) {
    .terminal-container {
        width: 100%;
        height: 100%;
        border: none;
    }

    .glitch {
        font-size: 3rem;
    }

    .grid-layout {
        flex-direction: column;
    }
}