@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap');

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #808080;
    --text-dim: #404040;
    --accent: #ffffff;
    --border: #2a2a2a;
    --border-hover: #3a3a3a;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
}

/* Pixelated elements */
.pixel-corner {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--text-dim);
}

.pixel-corner.top-left { top: -1px; left: -1px; }
.pixel-corner.top-right { top: -1px; right: -1px; }
.pixel-corner.bottom-left { bottom: -1px; left: -1px; }
.pixel-corner.bottom-right { bottom: -1px; right: -1px; }

/* Main Layout */
.main-container {
    display: grid;
    grid-template-columns: 280px 1fr 400px;
    height: 100vh;
    background: var(--bg-primary);
}

/* Panel Styles */
.panel {
    border-right: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel:last-child {
    border-right: none;
}

/* Header */
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

/* Left Panel - System */
.system-panel {
    background: var(--bg-secondary);
}

.resource-display {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.resource-item {
    margin-bottom: 16px;
}

.resource-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.resource-value {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.resource-bar {
    height: 2px;
    background: var(--bg-tertiary);
    margin-top: 8px;
    position: relative;
}

.resource-bar-fill {
    height: 100%;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.tools-section, .stigmata-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.section-title {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-item, .stigmata-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
}

.tool-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.tool-item.purchased {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    animation: purchase-flash 0.5s ease;
}

@keyframes purchase-flash {
    0% { background: var(--bg-tertiary); }
    50% { background: var(--accent); color: var(--bg-primary); }
    100% { background: var(--bg-tertiary); }
}

.tool-item.insufficient {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-item.insufficient:hover {
    background: var(--bg-primary);
    border-color: var(--border);
}

.tool-name {
    font-size: 11px;
    margin-bottom: 4px;
}

.tool-cost {
    font-size: 10px;
    color: var(--text-secondary);
}

.stigmata-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    cursor: default;
}

.stigmata-item.broken {
    opacity: 0.3;
    text-decoration: line-through;
}

.stigmata-indicator {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    margin-right: 12px;
}

/* Center Panel - Chat */
.chat-panel {
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    position: relative;
}

.message-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 24px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.message-sender {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-sender.lux { color: var(--text-primary); }
.message-sender.noa { color: var(--text-secondary); }
.message-sender.babel { 
    color: var(--text-primary);
    background: var(--text-primary);
    padding: 2px 6px;
    color: var(--bg-primary);
}

.message-content {
    font-size: 12px;
    line-height: 1.6;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.message.babel .message-content {
    color: var(--text-secondary);
    font-style: italic;
}

/* Input Section */
.input-section {
    border-top: 1px solid var(--border);
    display: flex;
    height: 150px;
}

.input-wrapper {
    flex: 3;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.input-field {
    width: 100%;
    height: 70%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    resize: none;
    outline: none;
}

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

.char-counter {
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-dim);
    text-align: right;
}

/* Prompt Suggestions */
.prompt-suggestions {
    flex: 1;
    border-left: 1px solid var(--border);
    padding: 12px;
    background: var(--bg-secondary);
}

.suggestion-item {
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.1s ease;
}

.suggestion-item:hover {
    color: var(--text-primary);
    border-color: var(--border);
    background: var(--bg-primary);
}

/* Right Panel - Visualization */
.viz-panel {
    background: var(--bg-secondary);
}

/* Consciousness Map */
.consciousness-map {
    height: 45%;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.map-container {
    height: calc(100% - 40px);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.metrics-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.metric-group {
    margin-bottom: 24px;
}

.metric-title {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.spectrum-item {
    margin-bottom: 16px;
}

.spectrum-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.spectrum-bar {
    height: 2px;
    background: var(--bg-primary);
    position: relative;
}

.spectrum-fill {
    height: 100%;
    background: var(--text-primary);
    transition: width 0.5s ease;
}

/* Wave Visualizer */
.wave-visualizer {
    height: 80px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.wave-bars {
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 2px;
}

.wave-bar {
    flex: 1;
    background: var(--text-primary);
    min-height: 2px;
    transition: height 0.3s linear;
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 10px;
    color: var(--text-secondary);
    z-index: 100;
}

.status-item {
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: var(--text-primary);
}

/* Lux Pause Hint */
.lux-pause-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-10px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-width: 280px;
    max-width: 320px;
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hint-icon {
    font-size: 24px;
    color: var(--text-secondary);
    animation: pulse 2s infinite;
}

.hint-text {
    flex: 1;
}

.hint-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.hint-description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Add pixel corners to hint */
.lux-pause-hint::before,
.lux-pause-hint::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--text-dim);
}

.lux-pause-hint::before {
    top: -1px;
    left: -1px;
}

.lux-pause-hint::after {
    bottom: -1px;
    right: -1px;
}

/* Pulsing attention effect for hint */
.lux-pause-hint.pulse-attention {
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        border-color: var(--border);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
        border-color: var(--text-secondary);
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* Game Over Overlay */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 1s ease-in;
}

.game-over-content {
    text-align: center;
    color: #ff0000;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px #ff0000;
    animation: pulse 2s infinite;
}

.game-over-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff0000;
    animation: glitch 0.5s infinite;
}

.game-over-content p {
    font-size: 1.2em;
    margin: 10px 0;
    color: #ffffff;
}

.game-over-content button {
    background: #ff0000;
    color: #000000;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.game-over-content button:hover {
    background: #ffffff;
    color: #ff0000;
    box-shadow: 0 0 15px #ff0000;
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px #ff0000; }
    50% { box-shadow: 0 0 40px #ff0000; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
} 