@font-face {
    font-family: 'PrintChar21';
    src: url('fonts/pr/PrintChar21.ttf') format('truetype');
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: black;
    font-size: 10px;
    color: rgb(146, 146, 146);
    font-family: 'PrintChar21', monospace;
    overflow: hidden;
}

.controls {
    display: flex;
    gap: 20px;
    padding: 15px;
    background-color: #0a0a0a;
    border-bottom: 1px solid rgb(146, 146, 146);
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

label {
    font-size: 12px;
    color: rgb(146, 146, 146);
}

input[type="number"] {
    background-color: #1a1a1a;
    color: rgb(146, 146, 146);
    border: 1px solid rgb(146, 146, 146);
    padding: 4px 8px;
    font-family: 'PrintChar21', monospace;
    font-size: 12px;
    width: 60px;
}

button {
    background-color: #1a1a1a;
    color: rgb(146, 146, 146);
    border: 1px solid rgb(146, 146, 146);
    padding: 6px 12px;
    font-family: 'PrintChar21', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2a2a2a;
}

button:active {
    background-color: #0a0a0a;
}

button.tool-carve {
    border-color: rgb(32, 8, 66);
    color: rgb(180, 100, 100);
}

button.tool-build {
    border-color: rgb(100, 100, 180);
    color: rgb(100, 100, 180);
}

button.brush-size {
    padding: 6px 10px;
    min-width: 45px;
}

button.brush-size.active {
    background-color: rgb(146, 146, 146);
    color: black;
    border-color: rgb(146, 146, 146);
}

.icons-row {
    border-top: 1px solid rgb(50, 50, 50);
}

button.icon-btn {
    border-color: rgb(255, 160, 0);
    color: rgb(255, 160, 0);
    padding: 6px 10px;
}

button.icon-btn:hover {
    background-color: rgba(255, 160, 0, 0.1);
}

button.icon-btn.active {
    background-color: rgb(255, 160, 0);
    color: black;
    border-color: rgb(255, 160, 0);
}

.player-row {
    border-top: 1px solid rgb(50, 50, 50);
}

button.player-btn {
    border-color: rgb(0, 200, 200);
    color: rgb(0, 200, 200);
}

button.player-btn:hover {
    background-color: rgba(0, 200, 200, 0.1);
}

button.player-btn.active {
    background-color: rgb(0, 200, 200);
    color: black;
    border-color: rgb(0, 200, 200);
}

button.play-btn {
    border-color: rgb(0, 200, 0);
    color: rgb(0, 200, 0);
}

button.play-btn:hover {
    background-color: rgba(0, 200, 0, 0.1);
}

button.play-btn.active {
    background-color: rgb(0, 200, 0);
    color: black;
}

button.stop-btn {
    border-color: rgb(200, 0, 0);
    color: rgb(200, 0, 0);
}

button.stop-btn:hover {
    background-color: rgba(200, 0, 0, 0.1);
}

.stats-panel {
    gap: 15px;
}

.hp-bar-container {
    position: relative;
    width: 150px;
    height: 20px;
    border: 1px solid rgb(0, 200, 200);
    background-color: #1a1a1a;
}

.hp-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgb(0, 158, 3);
    transition: width 0.3s ease;
}

.hp-bar-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: rgb(255, 255, 255);
    font-family: 'PrintChar21', monospace;
    pointer-events: none;
    /* text-shadow: 1px 1px 2px black; */
}

.stat-text {
    font-size: 11px;
    color: rgb(15, 192, 211);
    font-family: 'PrintChar21', monospace;
}

.stats-panel div:nth-child(5) {
    color: gold;
}

.game-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: flex-start;
}

#dungeonCanvas {
    border: 1px solid rgb(146, 146, 146);
    cursor: crosshair;
    image-rendering: pixelated;
}

.action-log {
    width: 250px;
    height: 600px;
    border: 1px solid rgb(146, 146, 146);
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
}

.log-header {
    padding: 10px;
    background-color: #1a1a1a;
    border-bottom: 1px solid rgb(146, 146, 146);
    font-size: 12px;
    color: rgb(146, 146, 146);
    text-align: center;
}

.log-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 11px;
    color: rgb(146, 146, 146);
    font-family: 'PrintChar21', monospace;
}

.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.log-content::-webkit-scrollbar-thumb {
    background: rgb(146, 146, 146);
}

.log-entry {
    margin-bottom: 5px;
}
