:root {
    --bg-color: #050505;
    --monitor-bg: #000;
    --terminal-green: #33ff00;
    --terminal-cyan: #00ffff;
    --terminal-dim: #004400;
    --text-color: #b3ffb3;
    --accent-color: #33ff00;
    --scanline-color: rgba(0, 0, 0, 0.5);
    --font-body: 'VT323', monospace;
    --font-header: 'Share Tech Mono', monospace;
}

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

body {
    background-color: #111;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 20px; /* VT323 needs to be a bit larger */
    line-height: 1.4;
    height: 100vh;
    overflow: hidden; /* Hide body scroll, scroll inside screen */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Monitor Bezel & Screen */
.monitor {
    width: 100%;
    height: 100%;
    background: var(--monitor-bg);
    position: relative;
    overflow: hidden;
    padding: 2vmin; /* Bezel thickness */
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.screen {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    position: relative;
    overflow-y: auto; /* Scroll inside the screen */
    overflow-x: hidden;
    border-radius: 2rem; /* Screen curvature corners */
    box-shadow: inset 0 0 10rem rgba(0,0,0,0.75); /* Vignette */
    padding: 20px;
    
    /* Text Flicker Animation applied to the whole screen */
    animation: textShadow 1.6s infinite;
}

/* CRT Effects */
.scanline {
    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;
    pointer-events: none;
    z-index: 100;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 60%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 99;
    
    /* Screen flicker */
    animation: flicker 0.15s infinite;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100% - 100px); /* Subtract footer height */
    overflow: hidden;
}

.sidebar-logs {
    border-right: 1px dashed var(--terminal-dim);
    padding-right: 15px;
    overflow: hidden;
    font-size: 0.8em;
    color: #00aa00;
    display: flex;
    flex-direction: column;
}

.log-header {
    border-bottom: 1px solid var(--terminal-dim);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--terminal-green);
}

#live-log-container {
    overflow-y: hidden; /* Auto-scroll handled by JS */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.log-line {
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
}

.content-wrapper {
    overflow-y: auto;
    padding-right: 10px;
    height: 100%;
}

.terminal-container {
    /* Deprecated in split view, but keeping for legacy */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-bottom: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-logs {
        display: none;
    }
}

/* Boot Sequence */
.boot-sequence {
    margin-bottom: 40px;
    color: var(--terminal-green);
    font-family: var(--font-header);
}

.log-entry {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.log-entry:nth-child(1) { animation-delay: 0.2s; }
.log-entry:nth-child(2) { animation-delay: 0.8s; }
.log-entry:nth-child(3) { animation-delay: 1.5s; }

/* Typography & Sections */
h2.section-header {
    font-family: var(--font-header);
    color: var(--terminal-cyan);
    border-bottom: 1px solid var(--terminal-dim);
    padding-bottom: 10px;
    margin-top: 60px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px var(--terminal-cyan);
    font-size: 1.5em;
}

h3 {
    font-family: var(--font-header);
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--terminal-cyan);
    text-decoration: none;
    border-bottom: 1px dashed var(--terminal-cyan);
    transition: all 0.3s ease;
}

a:hover {
    background-color: var(--terminal-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--terminal-cyan);
}

/* ASCII Art */
.ascii-art {
    font-family: monospace; /* Keep monospace for ASCII alignment */
    white-space: pre;
    font-size: 10px;
    line-height: 10px;
    overflow-x: auto;
    color: var(--accent-color);
    margin: 40px 0;
    text-align: center;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .ascii-art {
        font-size: 14px;
        line-height: 14px;
    }
}

/* Terminal Boxes */
.terminal-box {
    border: 1px solid #333;
    padding: 20px;
    background-color: rgba(0, 20, 0, 0.1);
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.05);
}

.terminal-box.border-dashed {
    border-style: dashed;
}

.emphasis-box {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 20px 0;
}

.inset-box {
    background-color: rgba(0, 20, 0, 0.3);
    padding: 15px;
    border: 1px solid #333;
}

/* Lists */
ul {
    list-style: none;
}

ul.data-list li::before {
    content: "> ";
    color: var(--accent-color);
}

ul.checklist li {
    margin-bottom: 8px;
}

/* Progress Bar */
.progress-bar-container {
    margin: 20px 0;
    font-family: var(--font-header);
}

.progress-bar {
    height: 20px;
    background-color: #111;
    border: 1px solid var(--terminal-green);
    margin: 5px 0;
    position: relative;
}

.progress-bar .fill {
    height: 100%;
    background-color: var(--terminal-green);
    box-shadow: 0 0 10px var(--terminal-green);
    animation: loadBar 2s ease-out forwards;
}

/* Repo Card */
.repo-card {
    border: 1px solid var(--terminal-cyan);
    padding: 15px;
    margin-top: 15px;
    transition: transform 0.2s;
    background: rgba(0, 255, 255, 0.05);
}

.repo-card:hover {
    transform: translateX(5px);
    box-shadow: -5px 5px 0 rgba(0, 255, 255, 0.2);
}

.repo-card .tags {
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
}

/* Footer */
.terminal-footer {
    margin-top: 80px;
    border-top: 2px solid var(--terminal-dim);
    padding-top: 20px;
    color: #666;
    font-size: 0.9em;
}

/* Interactive Terminal */
.interactive-terminal {
    margin-top: 40px;
    border-top: 1px dashed #333;
    padding-top: 20px;
    font-family: var(--font-body);
}

.terminal-output {
    margin-bottom: 10px;
    color: #ccc;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--terminal-green);
    margin-right: 10px;
    text-shadow: 0 0 5px var(--terminal-green);
}

#command-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 20px;
    width: 100%;
    outline: none;
    caret-color: var(--terminal-green);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loadBar {
    from { width: 0%; }
    to { width: 97%; }
}

.blink {
    animation: blinker 1s linear infinite;
}

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

.hidden {
    opacity: 0;
}

.visible {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

/* Glitch Effect (Simple) */
.glitch-text {
    position: relative;
    color: var(--text-color);
    font-weight: bold;
    letter-spacing: 2px;
}

/* Text Flicker Animation */
@keyframes textShadow {
    0% { text-shadow: 0.4389924193300864px 0 1px rgba(0,30,255,0.5), -0.4389924193300864px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    5% { text-shadow: 2.7928974010788217px 0 1px rgba(0,30,255,0.5), -2.7928974010788217px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    10% { text-shadow: 0.02956275843481219px 0 1px rgba(0,30,255,0.5), -0.02956275843481219px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    15% { text-shadow: 0.4021853855287816px 0 1px rgba(0,30,255,0.5), -0.4021853855287816px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    20% { text-shadow: 3.4794037899852017px 0 1px rgba(0,30,255,0.5), -3.4794037899852017px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    25% { text-shadow: 1.6125630401149584px 0 1px rgba(0,30,255,0.5), -1.6125630401149584px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    30% { text-shadow: 0.7015590085143956px 0 1px rgba(0,30,255,0.5), -0.7015590085143956px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    35% { text-shadow: 3.896914047650351px 0 1px rgba(0,30,255,0.5), -3.896914047650351px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    40% { text-shadow: 3.870905614848819px 0 1px rgba(0,30,255,0.5), -3.870905614848819px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    45% { text-shadow: 2.231056963361899px 0 1px rgba(0,30,255,0.5), -2.231056963361899px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    50% { text-shadow: 0.08084290417898504px 0 1px rgba(0,30,255,0.5), -0.08084290417898504px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    55% { text-shadow: 2.3758461067427543px 0 1px rgba(0,30,255,0.5), -2.3758461067427543px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    60% { text-shadow: 2.202193051050636px 0 1px rgba(0,30,255,0.5), -2.202193051050636px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    65% { text-shadow: 2.8638780614874975px 0 1px rgba(0,30,255,0.5), -2.8638780614874975px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    70% { text-shadow: 0.48874025155497314px 0 1px rgba(0,30,255,0.5), -0.48874025155497314px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    75% { text-shadow: 1.8948491305757957px 0 1px rgba(0,30,255,0.5), -1.8948491305757957px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    80% { text-shadow: 0.0833037308038857px 0 1px rgba(0,30,255,0.5), -0.0833037308038857px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    85% { text-shadow: 0.09769827255241735px 0 1px rgba(0,30,255,0.5), -0.09769827255241735px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    90% { text-shadow: 3.443339761481782px 0 1px rgba(0,30,255,0.5), -3.443339761481782px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    95% { text-shadow: 2.1841838852799786px 0 1px rgba(0,30,255,0.5), -2.1841838852799786px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
    100% { text-shadow: 2.6208764473832513px 0 1px rgba(0,30,255,0.5), -2.6208764473832513px 0 1px rgba(255,0,80,0.3), 0 0 3px; }
}

@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    15% { opacity: 0.95; }
    20% { opacity: 0.99; }
    25% { opacity: 0.95; }
    30% { opacity: 0.9; }
    35% { opacity: 0.96; }
    40% { opacity: 0.98; }
    45% { opacity: 0.95; }
    50% { opacity: 0.99; }
    55% { opacity: 0.93; }
    60% { opacity: 0.9; }
    65% { opacity: 0.96; }
    70% { opacity: 1; }
    75% { opacity: 0.97; }
    80% { opacity: 0.95; }
    85% { opacity: 0.92; }
    90% { opacity: 0.98; }
    95% { opacity: 0.99; }
    100% { opacity: 0.96; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-green);
}

