body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

#game-container {
    width: 600px;
    min-height: 520px;
    max-width: 90%;
    background-color: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: multiply; 
    transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out; 
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }

h2, h3 { text-align: center; margin-top: 0; color: #ffd700; }
.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-weight: bold; }
input[type="text"], select {
    width: 100%; padding: 10px; background: #2a2a2a; border: 1px solid #555;
    color: #fff; border-radius: 4px; box-sizing: border-box; font-family: inherit;
}

#avatar-presets { display: flex; gap: 10px; margin-bottom: 10px; justify-content: center; }
.avatar-option {
    width: 60px; height: 60px; border: 2px solid #555; border-radius: 4px;
    cursor: pointer; object-fit: cover; transition: 0.2s;
}
.avatar-option.selected { border-color: #ffd700; transform: scale(1.05); box-shadow: 0 0 8px #ffd700; }
.upload-box { font-size: 13px; color: #aaa; }

#status-bar {
    display: flex; justify-content: space-between; align-items: center;
    background-color: rgba(30, 30, 30, 0.9); padding: 10px 15px;
    border-radius: 4px; margin-bottom: 10px; border: 1px solid #444;
}
.user-profile { display: flex; align-items: center; gap: 12px; }
#ui-avatar { width: 45px; height: 45px; border-radius: 4px; object-fit: cover; border: 1px solid #ffd700; }
#ui-name { font-weight: bold; color: #ffd700; }
.stats { display: flex; gap: 15px; font-size: 16px; }
#hp-value { color: #ff4d4d; }
#gold-value { color: #ffd700; }

/* Стиль инвентаря */
#inventory-bar {
    background: rgba(20, 20, 20, 0.85); padding: 6px 15px; border-radius: 4px;
    margin-bottom: 15px; border: 1px dashed #555; font-size: 13px; color: #ccc;
}
#inventory-list { color: #ffd700; font-weight: bold; }

/* Лог броска кубика */
#dice-log {
    background: #4a154b; color: #fff; text-align: center; padding: 10px;
    border-radius: 4px; margin-bottom: 15px; font-weight: bold; border: 1px solid #e01e5a;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { box-shadow: 0 0 5px #e01e5a; }
    to { box-shadow: 0 0 15px #e01e5a; }
}

#text-node {
    margin-bottom: auto; line-height: 1.6; font-size: 17px;
    background-color: rgba(30, 30, 30, 0.85); padding: 15px; border-radius: 4px; min-height: 100px;
}

.btn-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn {
    background-color: rgba(51, 51, 51, 0.9); color: #fff; border: 1px solid #555;
    padding: 12px; border-radius: 4px; cursor: pointer; text-align: left;
    font-size: 16px; font-family: inherit; transition: 0.2s;
}
.btn:hover { background-color: rgba(85, 85, 85, 0.9); }

#history-log { background: rgba(0,0,0,0.3); padding: 15px 15px 15px 35px; border-radius: 4px; max-height: 200px; overflow-y: auto; }
#history-log li { margin-bottom: 8px; line-height: 1.4; }
.log-victory { color: #66ff66; }
.log-defeat { color: #ff6666; }
