:root {
    --bg-black: #050505;
    --panel-bg: rgba(20, 20, 20, 0.85);
    --accent-green: #42f485;
    --frame-grey: #666;
    --text-dim: #888;
}

body {
    background-color: var(--bg-black);
    color: #eee;
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 20px;
}

.outer-frame {
    border: 1px solid var(--frame-grey);
    padding: 10px 15px;
    width: 98vw;    /* Use more screen width */
    max-width: 1600px;
    background: rgba(0,0,0,0.1);
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.duel-stage {
    display: flex;
    align-items: flex-start; /* Make boxes equal height */
    gap: 10px;            /* Tighter gap */
    margin-bottom: 20px;
}

.player-box {
    flex: 1;         /* Slightly narrower to "bunch" more */
    background: var(--panel-bg);
    min-width: 300px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Pushes content to the top */
    gap: 5px;
    overflow: hidden;
    backdrop-filter: blur(10px); /* The "frosted" effect */
}

.pane-title {
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--accent-green);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.stat-line {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;      /* Slightly smaller text */
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 2px 0;
    display: flex;
    justify-content: space-between;
}

.registration-form input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-family: 'Courier New';
    text-align: right;
    width: 60%;
}

.load-btn, .start-btn, .help-btn {
    background: transparent;
    border: 1px solid var(--frame-grey);
    color: white;
    font-family: 'Courier New', monospace;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.load-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(66, 244, 133, 0.05);
}

.start-btn {
    border-color: var(--accent-green);
    color: var(--accent-green);
    letter-spacing: 2px;
}

.help-btn {
    border-color: #00ffff;
    color: #00ffff;
    letter-spacing: 2px;
}
.help-btn:hover {
    border-color: #00ffff;
    color: #000000;
    letter-spacing: 2px;
    background: #00ffff;
}

/* Pulse animation for the Stability Test button */
.pulse-green {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(66, 244, 133, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(66, 244, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 244, 133, 0); }
}

/* Forbidden Alert State for Registered Glyphs */
.terminal-input-alert {
    color: #ff3333 !important;
    border-color: #ff3333 !important;
    background: rgba(255, 51, 51, 0.08) !important;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.2) inset;
    animation: terminalPulseRed 2s infinite alternate;
}

/* Global keyframe animation for the red alert flash */
@keyframes terminalPulseRed {
    0% {
        border-color: #aa2222;
        box-shadow: 0 0 5px rgba(170, 34, 34, 0.2);
    }
    100% {
        border-color: #ff3333;
        box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
    }
}

/* --- Global Entropy-Style Scrollbars --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* Added for horizontal scrollbars if needed */
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #222;
    border: 1px solid rgba(66, 244, 133, 0.2);
}

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