:root {
    --bg-color: #050505;
    --text-color: #00ff00;
    --dim-text: #005500;
    --highlight: #00ff00;
    --font-family: "Courier New", Courier, monospace;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dim-text);
    padding-bottom: 1rem;
    flex-shrink: 0;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 5px var(--highlight);
}

p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

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

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.cmd-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.cmd-btn:hover:not(:disabled) {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--highlight);
}

.cmd-btn:disabled {
    color: var(--dim-text);
    border-color: var(--dim-text);
    cursor: not-allowed;
}

.panels {
    display: flex;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dim-text);
    padding: 1rem;
    background: rgba(0, 20, 0, 0.3);
    min-height: 0;
}

h2 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: var(--dim-text);
}

.content-box {
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.4;
    scrollbar-width: thin;
    scrollbar-color: var(--dim-text) var(--bg-color);
    padding-right: 10px;
}

.logs-box {
    flex: 1;
    overflow-y: auto;
    font-size: 0.8rem;
    color: var(--dim-text);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-right: 10px;
}

.hidden {
    display: none !important;
}

.placeholder {
    color: var(--dim-text);
    font-style: italic;
}

.result-row {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.result-row .label {
    color: var(--dim-text);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.result-row .value {
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 0 3px var(--highlight);
}

.truth-value {
    color: #ffaa00;
    text-shadow: 0 0 3px #ffaa00 !important;
}

.terminal-input {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--dim-text);
    font-family: var(--font-family);
    font-size: 0.9rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    outline: none;
    transition: all 0.2s;
}

.terminal-input:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 5px var(--highlight);
}

.terminal-input::placeholder {
    color: var(--dim-text);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--dim-text);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* CRT Effects */
.crt::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    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));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.crt::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 255, 0, 0.05);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

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

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