:root {
    --bg-color: #0a0a0a;
    --panel-bg: #111;
    --text-color: #e0e0e0;
    --accent-red: #ff3333;
    --accent-green: #33ff33;
    --accent-blue: #33ccff;
    --border-color: #333;
    --crt-scanline: rgba(18, 16, 16, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* CRT Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.title-box h1 {
    margin: 0;
    color: var(--accent-red);
    font-size: 2.5em;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

.subtitle {
    color: #666;
    font-size: 0.9em;
    letter-spacing: 4px;
}

.retro-btn {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.retro-btn:hover {
    background: var(--accent-green);
    color: #000;
    box-shadow: 0 0 10px var(--accent-green);
}

.game-area {
    display: flex;
    justify-content: space-between;
    background: var(--panel-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    min-height: 300px;
}

.player-area {
    flex: 1;
    padding: 15px;
    background: #161616;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.player-header {
    border-bottom: 1px solid #333;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.player-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #888;
}

.opponent-area .player-header h2 { color: var(--accent-red); }
.self-area .player-header h2 { color: var(--accent-blue); }

.health-display {
    font-size: 24px;
    color: var(--accent-red);
    margin-top: 5px;
    letter-spacing: 5px;
    text-shadow: 0 0 5px var(--accent-red);
    min-height: 30px;
}

.items-container {
    margin-top: auto;
}

.items-label {
    font-size: 0.8em;
    color: #555;
    margin-bottom: 5px;
}

.items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.item-tag {
    background: #222;
    color: #aaa;
    padding: 4px 8px;
    font-size: 0.9em;
    border: 1px solid #444;
    box-shadow: 2px 2px 0 #000;
}

.center-info {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.chamber-display {
    text-align: center;
    background: #0f0f0f;
    padding: 15px;
    border: 1px solid #333;
    width: 100%;
}

.chamber-label {
    color: #666;
    font-size: 0.8em;
    margin-bottom: 5px;
}

.chamber-count {
    font-size: 3em;
    color: #fff;
    font-weight: bold;
}

.chamber-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.9em;
}

.live-count { color: var(--accent-red); }
.blank-count { color: #888; }

.status-alert {
    padding: 8px 15px;
    border: 1px solid;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.status-alert.warning { color: orange; border-color: orange; }
.status-alert.info { color: cyan; border-color: cyan; }
#known-shell { color: yellow; border-color: yellow; }

.turn-display {
    width: 100%;
    text-align: center;
}

.turn-label {
    color: #555;
    font-size: 0.8em;
}

.turn-indicator {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    padding: 10px;
    background: #222;
    border: 1px solid #444;
    margin-top: 5px;
}

.actions-panel {
    background: var(--panel-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.panel-header {
    color: #666;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.separator {
    width: 2px;
    height: 40px;
    background: #333;
    margin: 0 10px;
}

.action-btn {
    padding: 12px 20px;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid #444;
    background: #1a1a1a;
    color: #ccc;
    transition: all 0.1s;
    min-width: 100px;
}

.action-btn:hover:not(:disabled) {
    background: #2a2a2a;
    border-color: #666;
    transform: translateY(-2px);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.action-btn.danger {
    border-color: #600;
    color: #f88;
}

.action-btn.danger:hover:not(:disabled) {
    background: #300;
    box-shadow: 0 0 10px #600;
}

.action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #222;
}

.logs-panel {
    background: #000;
    padding: 15px;
    border: 1px solid #333;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.logs-content {
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #aaa;
}

.log-entry {
    margin-bottom: 4px;
    border-bottom: 1px solid #111;
    padding-bottom: 2px;
}

.log-entry:last-child {
    color: #fff;
    font-weight: bold;
}

.hidden { display: none !important; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111;
}
::-webkit-scrollbar-thumb {
    background: #333;
}
::-webkit-scrollbar-thumb:hover {
    background: #444;
}
