:root {
    --bg-color: #1a0510;
    /* Dark purple/black */
    --accent-gold: #c5a059;
    --accent-red: #8a1c1c;
    --text-color: #f0e6d2;
    --ui-bg: rgba(26, 5, 16, 0.9);
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: var(--text-color);
    font-family: 'Times New Roman', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
    border: 2px solid var(--accent-gold);
}

canvas {
    background-color: var(--bg-color);
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#ui-overlay>* {
    pointer-events: auto;
}

#status-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.character-status {
    width: 200px;
}

.name {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.health-bar {
    width: 100%;
    height: 10px;
    background: #333;
    border: 1px solid var(--accent-gold);
}

.health-fill {
    height: 100%;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

#dialogue-box {
    background: var(--ui-bg);
    border-top: 2px solid var(--accent-gold);
    padding: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.2em;
    font-style: italic;
    margin-top: auto;
    /* Push to bottom if no action menu */
}

#dialogue-next {
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 5px 15px;
    cursor: pointer;
    font-family: inherit;
}

#dialogue-next:hover {
    background: var(--accent-gold);
    color: var(--bg-color);
}

#action-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    background: var(--ui-bg);
    border-top: 1px solid var(--accent-gold);
}

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

.action-btn:hover:not(:disabled) {
    background: var(--accent-gold);
    color: var(--bg-color);
}

.action-btn:disabled {
    border-color: #555;
    color: #555;
    cursor: not-allowed;
    position: relative;
}



#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

h1 {
    font-size: 3em;
    color: var(--accent-gold);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 var(--accent-red);
}

#start-btn {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 1.5em;
    background: var(--accent-red);
    color: var(--text-color);
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    font-family: inherit;
}

.hidden {
    display: none !important;
}