* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Courier New', monospace; background: #1a1a2e; color: #e0e0e0; min-height: 100vh; }

/* Layout */
#game-container { display: none; max-width: 1200px; margin: 0 auto; padding: 10px; }
#setup-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

/* Header bar */
#header { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; background: #16213e; padding: 8px; border-radius: 6px; margin-bottom: 10px; border: 1px solid #0f3460; }
.stat-box { text-align: center; padding: 4px; }
.stat-box .label { font-size: 10px; color: #888; text-transform: uppercase; }
.stat-box .value { font-size: 16px; font-weight: bold; color: #e94560; }
.stat-box .value.money { color: #4ecca3; }

/* Main grid */
#main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 800px) { #main-grid { grid-template-columns: 1fr; } }

/* Panels */
.panel { background: #16213e; border: 1px solid #0f3460; border-radius: 6px; padding: 12px; margin-bottom: 10px; }
.panel h2 { font-size: 14px; text-transform: uppercase; color: #e94560; margin-bottom: 10px; border-bottom: 1px solid #0f3460; padding-bottom: 6px; }
.panel h3 { font-size: 12px; color: #ccc; margin: 8px 0 4px; }

/* Buttons */
button { font-family: 'Courier New', monospace; background: #0f3460; color: #e0e0e0; border: 1px solid #e94560; padding: 6px 12px; cursor: pointer; border-radius: 4px; font-size: 12px; transition: background 0.2s; }
button:hover { background: #e94560; color: #fff; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.small { padding: 3px 8px; font-size: 11px; }
button.primary { background: #e94560; color: #fff; }
button.primary:hover { background: #c73650; }

/* Project cards */
.project-card { background: #1a1a2e; border: 1px solid #0f3460; border-radius: 4px; padding: 8px; margin-bottom: 6px; font-size: 12px; }
.project-card .title { font-weight: bold; color: #fff; margin-bottom: 4px; }
.project-card .details { color: #999; line-height: 1.6; }
.tech-tag { display: inline-block; background: #0f3460; padding: 1px 6px; border-radius: 3px; margin: 1px; font-size: 10px; color: #4ecca3; }
.price { color: #4ecca3; font-weight: bold; }
.risk { color: #e94560; }

/* Progress bars */
.progress-bar { background: #1a1a2e; border-radius: 3px; height: 14px; margin: 2px 0; overflow: hidden; position: relative; }
.progress-bar .fill { height: 100%; background: #e94560; transition: width 0.3s; border-radius: 3px; }
.progress-bar .fill.green { background: #4ecca3; }
.progress-bar .text { position: absolute; top: 0; left: 4px; font-size: 10px; line-height: 14px; color: #fff; }

/* Skill list */
.skill-item { display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin-bottom: 3px; }
.skill-item .name { min-width: 100px; }
.skill-item .bar { flex: 1; margin: 0 8px; }

/* Employee list */
.employee-item { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 4px 0; border-bottom: 1px solid #0f3460; gap: 8px; }
.employee-item > div:last-child { white-space: nowrap; }

/* Log */
#log-panel { max-height: 200px; overflow-y: auto; }
#log-panel .log-entry { font-size: 11px; padding: 2px 0; border-bottom: 1px solid #0f3460; }
#log-panel .log-entry .date { color: #888; }
#log-panel .log-entry.good { color: #4ecca3; }
#log-panel .log-entry.bad { color: #e94560; }
#log-panel .log-entry.info { color: #7ec8e3; }

/* Setup screen */
#setup-screen h1 { font-size: 28px; color: #e94560; margin-bottom: 5px; }
#setup-screen .subtitle { color: #888; margin-bottom: 30px; }
.setup-section { margin-bottom: 20px; width: 100%; max-width: 500px; }
.setup-section.wide { max-width: 800px; }
.setup-section label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; text-transform: uppercase; }
.setup-section select, .setup-section input { width: 100%; padding: 8px; background: #16213e; border: 1px solid #0f3460; color: #e0e0e0; font-family: 'Courier New', monospace; border-radius: 4px; }
.setup-section .option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow-y: auto; }
.setup-section .option-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) {
  .setup-section .option-grid.three-col { grid-template-columns: 1fr 1fr; }
}
.setup-section .option-btn { padding: 8px; text-align: center; background: #16213e; border: 1px solid #0f3460; border-radius: 4px; cursor: pointer; font-size: 12px; line-height: 1.4; }
.setup-section .option-btn:hover, .setup-section .option-btn.selected { border-color: #e94560; color: #e94560; }

/* Tabs */
.tab-bar { display: flex; gap: 4px; margin-bottom: 8px; }
.tab-bar button { border: none; border-bottom: 2px solid transparent; border-radius: 0; }
.tab-bar button.active { border-bottom-color: #e94560; color: #e94560; }

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #16213e; border: 1px solid #e94560; border-radius: 8px; padding: 20px; max-width: 550px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h2 { color: #e94560; margin-bottom: 12px; font-size: 16px; }
.modal h3 { font-size: 13px; color: #ccc; margin: 6px 0; }

/* Hiring */
.hire-option { display: flex; justify-content: space-between; align-items: center; padding: 8px; border: 1px solid #0f3460; border-radius: 4px; margin-bottom: 6px; }
.hire-option .info { font-size: 12px; }
.hire-option .cost { color: #e94560; font-size: 11px; margin-right: 6px; }

/* Active project detail */
.active-project { margin-bottom: 8px; }
.active-project .workers { font-size: 10px; color: #888; margin-top: 2px; }

/* Office view */
#office-view { text-align: center; }
#office-canvas-wrap { display: flex; justify-content: center; padding: 8px 0; background: #111828; border-radius: 4px; min-height: 100px; }
#office-canvas { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Ticker */
#ticker { background: #0f3460; padding: 4px 10px; font-size: 11px; color: #7ec8e3; border-radius: 4px; margin-bottom: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 22px; }

/* Speed control */
.speed-controls { display: flex; gap: 4px; align-items: center; }
.speed-controls button.active-speed { background: #e94560; color: #fff; }

/* Automation settings */
.auto-setting { padding: 8px; border: 1px solid #0f3460; border-radius: 4px; margin-bottom: 8px; font-size: 12px; }
.auto-setting label { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.auto-setting p { font-size: 10px; color: #888; margin: 4px 0 0 22px; }
.auto-setting input[type="checkbox"] { accent-color: #e94560; }
.auto-setting select { font-family: 'Courier New', monospace; }

/* Training */
.train-skill-option.selected { border-color: #e94560 !important; color: #e94560; background: #0f3460; }
.train-skill-option:hover { border-color: #e94560 !important; }

/* Game over */
#gameover-overlay .modal { border-color: #e94560; border-width: 2px; }
#gameover-overlay h2 { color: #e94560; letter-spacing: 4px; }
