:root {
    --term-bg: #050505;
    --term-green: #00ff41;
    --term-dark-green: #008f11;
    --term-glow: rgba(0, 255, 65, 0.4);
    --term-red: #ff003c;
}

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

body {
    background-color: var(--term-bg);
    color: var(--term-green);
    font-family: 'VT323', monospace;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    
    /* Slight CRT Curvature Effect */
    perspective: 1000px;
}

/* --- CRT EFFECTS --- */
.crt-scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    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: 999;
    pointer-events: none;
}

.crt-flicker {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,255,65,0.02);
    opacity: 0.1;
    z-index: 998;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.05; }
    50% { opacity: 0.15; }
    100% { opacity: 0.05; }
}

/* --- TERMINAL LAYOUT --- */
.terminal {
    max-width: 1200px;
    margin: 0 auto;
    text-shadow: 0 0 5px var(--term-glow);
    /* Transform for screen bulge */
    transform: rotateX(2deg);
}

.term-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--term-green);
}

.term-header pre {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    line-height: 1.2;
    white-space: pre-wrap;
}

.term-grid {
    display: flex;
    gap: 30px;
}

.term-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- ASCII BOXES --- */
.ascii-box {
    border: 2px solid var(--term-green);
    position: relative;
    padding: 20px;
    background: rgba(0, 255, 65, 0.03);
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.box-title {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--term-bg);
    padding: 0 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.box-content {
    font-size: 1.5rem;
    line-height: 1.5;
}

.glow-text {
    color: #fff;
    text-shadow: 0 0 10px var(--term-green);
}

.alert-text {
    color: var(--term-red);
    text-shadow: 0 0 5px var(--term-red);
}

/* --- LOGS AND CURSOR --- */
.log-box {
    height: 100%;
    min-height: 400px;
}

#logsContainer {
    height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#activityList p {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.cursor-line {
    margin-top: 10px;
    display: flex;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

.typing {
    color: #fff;
}

.cursor {
    animation: blink 1s step-end infinite;
    background: var(--term-green);
    color: transparent;
    width: 10px;
    display: inline-block;
    margin-left: 2px;
}

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

/* Scrollbar styling for terminal */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid var(--term-dark-green);
}
::-webkit-scrollbar-thumb {
    background: var(--term-green);
}

.dot-anim {
    display: inline-block;
    width: 20px;
    text-align: left;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}
