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

body {
    background-color: #000;
    font-family: 'Courier New', monospace;
    color: #fff;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 20px auto;
    border: 4px solid #333;
    background: #000;
}

canvas {
    display: block;
}

:root {
    --dark-blue: #0000AA;
    --blue: #5555FF;
    --red: #FF5555;
    --green: #55FF55;
    --yellow: #FFFF55;
    --purple: #AA00AA;
    --orange: #FFAA00;
    --white: #FFFFFF;
    --black: #000000;
    --gray: #AAAAAA;
    --brown: #AA5500;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.status-bar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border: 2px solid #555;
    pointer-events: auto;
}

.health-bar, .energy-bar {
    width: 200px;
    height: 15px;
    background: #300;
    border: 1px solid #500;
    margin: 5px 0;
}

.energy-bar {
    background: #003;
    border-color: #005;
}

.health-fill {
    height: 100%;
    background: #F00;
    transition: width 0.3s;
}

.energy-fill {
    height: 100%;
    background: var(--blue);
    transition: width 0.3s;
}

#combat-menu, #nav-menu, #mission-board, #inventory-menu, #dialogue-box {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border: 2px solid var(--green);
    display: none;
    pointer-events: auto;
}

#dialogue-box {
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    border-color: var(--white);
    z-index: 100;
}

#nav-menu {
    border-color: var(--blue);
}

#inventory-menu {
    border-color: var(--orange);
    bottom: 150px;
    width: 250px;
}

#mission-board {
    border-color: var(--yellow);
    top: 100px;
    right: 50%;
    transform: translateX(50%);
    width: 400px;
    height: auto;
    max-height: 400px;
}

.menu-option {
    display: block;
    padding: 5px 10px;
    cursor: pointer;
    color: var(--white);
    text-decoration: none;
}

.menu-option:hover {
    background: var(--green);
    color: var(--black);
}

#btn-special {
    color: var(--yellow);
    border: 1px solid var(--yellow);
    margin-top: 5px;
    display: none;
}

#btn-special:hover {
    background: var(--yellow);
    color: var(--black);
}

#nav-menu .menu-option:hover {
    background: var(--blue);
}

#inventory-menu .menu-option:hover {
    background: var(--orange);
}

#combat-log {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 300px;
    height: 150px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--gray);
    padding: 10px;
    font-size: 12px;
    overflow-y: auto;
    display: none;
}

#location-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    pointer-events: none;
}

.location-name {
    font-size: 24px;
    color: var(--yellow);
    margin-bottom: 5px;
}

.location-desc {
    font-size: 14px;
    color: var(--gray);
}

.mission-item {
    border-bottom: 1px solid #333;
    padding: 10px 0;
}

.mission-title {
    color: var(--yellow);
    font-weight: bold;
}

.mission-desc {
    font-size: 12px;
    margin: 5px 0;
}