#ui {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.ui-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    min-width: 200px;
}

button {
    padding: 10px 20px;
    background: #444;
    color: white;
    border: 1px solid #666;
    cursor: pointer;
    font-family: monospace;
    font-size: 14px;
    transition: background 0.2s;
}

button:hover {
    background: #666;
}

.btn-small {
    font-size: 12px;
    padding: 5px;
}

.btn-micro {
    flex: 1;
    padding: 5px;
    font-size: 10px;
}

.button-group {
    display: flex;
    gap: 5px;
}

.info-section {
    display: none;
    color: #ccc;
    font-size: 11px;
    margin-top: 5px;
    border-top: 1px solid #444;
    padding-top: 5px;
}

.separator {
    width: 100%;
    border: 0;
    border-top: 1px solid #444;
    margin: 5px 0;
}

.label-small {
    color: white;
    font-size: 12px;
}

.control-label {
    color: white;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.input-number {
    width: 100%;
    background: #444;
    color: white;
    border: 1px solid #666;
    padding: 5px;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.input-range {
    width: 100%;
    cursor: pointer;
}

.stats-section {
    color: white;
    font-size: 11px;
    margin-top: 10px;
    border-top: 1px solid #444;
    padding-top: 5px;
}

#keyInventory {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column-reverse;
    /* Stack upwards */
    gap: 5px;
    pointer-events: none;
    /* Let clicks pass through */
}

.key-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #FFA500;
    color: #FFA500;
    font-family: monospace;
    font-weight: bold;
    box-shadow: 0 0 5px #FFA500;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #ccc;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* Player HUDStyles moved to hud.css */