body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    font-family: sans-serif;
    flex-direction: column; /* Stack game and messages */
}

#game-container {
    position: relative; /* Crucial for positioning hotspots */
    width: 600px; /* Adjust as needed */
    max-width: 90%;
    aspect-ratio: 3 / 4; /* Maintain image aspect ratio */
    border: 1px solid #ccc;
    overflow: hidden; /* Hide parts of hotspots outside container */
}

#scene-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits */
}

.hotspot {
    position: absolute;
    /* background-color: rgba(255, 0, 0, 0.3); /* Uncomment to see hotspots */
    /* border: 1px dashed red; /* Uncomment to see hotspots */
    cursor: pointer;
    z-index: 10; /* Make sure hotspots are above the image */
}

/* --- UI Bar --- */
#ui-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 600px; /* Match game container width */
    max-width: 90%;
    background-color: #555;
    padding: 10px 0;
    border-radius: 0 0 10px 10px;
    margin-top: 5px; /* Space between game and UI */
}

.ui-slot {
    width: 60px;
    height: 60px;
    background-color: #777;
    border: 2px solid #999;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    user-select: none; /* Prevent text selection */
    overflow: hidden; /* Hide overflowing item icons */
}

.ui-slot img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: none; /* Hidden by default */
}

.ui-slot.has-item img { /* Style for slots WITH items */
    display: block;
}
.ui-slot.has-item .placeholder-text { /* Hide placeholder text if needed */
    display: none;
}


.ui-slot.selected {
    border-color: #ffcc00;
    box-shadow: 0 0 10px #ffcc00;
}


/* --- Message Area --- */
#message-area {
    width: 600px; /* Match game container width */
    max-width: 90%;
    margin-top: 10px;
    padding: 10px;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    min-height: 40px; /* Ensure space for text */
}