/* DARK & GRITTY THEME */
body {
    background-color: #050505;
    color: #eee;
    font-family: 'Courier New', monospace;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* LOGIN */
#login-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #111;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    text-align: center;
    border: 2px solid #444;
    padding: 20px;
    background: #000;
}
input {
    display: block;
    margin: 10px auto;
    padding: 10px;
    background: #222;
    border: 1px solid #555;
    color: #0f0;
    font-family: inherit;
}
button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}
button:hover { background: #555; }

/* GAME UI */
#game-ui {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

#stage {
    flex: 4; /* Takes top 40% */
    background: #1a1a1a;
    position: relative;
    border-bottom: 2px solid #444;
}
canvas {
    display: block;
    width: 100%;
    height: 100%;
}
#location-tag {
    position: absolute;
    top: 10px; left: 10px;
    background: #000;
    color: #fff;
    padding: 5px;
    border: 1px solid #fff;
    font-size: 12px;
}

#stats-bar {
    height: 40px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-bottom: 1px solid #333;
    font-size: 14px;
    font-weight: bold;
}

#deck {
    flex: 6; /* Takes bottom 60% */
    display: flex;
    flex-direction: column;
    background: #000;
}

#tabs {
    display: flex;
    background: #111;
}
.tab {
    flex: 1;
    border: none;
    background: #111;
    color: #777;
    border-bottom: 2px solid #111;
}
.tab.active {
    color: #fff;
    border-bottom: 2px solid #0f0;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow: hidden;
}

/* CHAT */
#chat-log {
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
    margin-bottom: 10px;
}
.msg { margin-bottom: 4px; }
.input-area { display: flex; }
#chat-input { flex: 1; margin: 0; }

/* ACTIONS */
.action-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.act-btn {
    flex: 1;
    padding: 15px;
    text-align: left;
}
.work { border-color: cyan; color: cyan; }
.crime { border-color: red; color: red; }

#game-log {
    flex: 1;
    overflow-y: auto;
    font-size: 12px;
    color: #aaa;
    border-top: 1px dashed #333;
    padding-top: 5px;
}