body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

#game-container {
    width: 600px;
    height: 400px;
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
    background-color: #8fbc8f;
}

.scene {
    width: 100%;
    height: 100%;
    position: absolute;
    display: none;
}

.scene.active {
    display: block;
}

#player {
    width: 20px;
    height: 20px;
    background-color: #4169e1;
    position: absolute;
    border-radius: 50%;
    z-index: 10;
}

.npc {
    width: 20px;
    height: 20px;
    background-color: #ff6347;
    position: absolute;
    border-radius: 50%;
}

.house {
    width: 50px;
    height: 50px;
    background-color: #8b4513;
    position: absolute;
    border: 2px solid #2f4f4f;
}

.exit {
    width: 30px;
    height: 50px;
    background-color: #32cd32;
    position: absolute;
    right: 0;
    top: 175px;
}

#message-box {
    width: 600px;
    height: 80px;
    border: 2px solid #333;
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    overflow-y: auto;
    font-size: 14px;
}

#interaction-prompt {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 5px;
    display: none;
    font-size: 14px;
    z-index: 20;
}

#inventory {
    width: 600px;
    height: 30px;
    border: 2px solid #333;
    margin-top: 10px;
    padding: 5px;
    background-color: #dcdcdc;
    font-size: 14px;
}

h2 {
    color: #ffffff;
    text-shadow: 2px 2px 4px #000000;
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
    z-index: 5;
}

/* Specific building styles */
#town .house[data-house="1"] { top: 50px; left: 50px; background-color: #8b4513; }  /* Library */
#town .house[data-house="2"] { top: 50px; left: 150px; background-color: #daa520; } /* Town Hall */
#town .house[data-house="3"] { top: 50px; left: 250px; background-color: #9932cc; } /* Mystic Shop */
#town .house[data-house="4"] { top: 50px; left: 350px; background-color: #4b0082; } /* Ancient Tower */
#town .house[data-house="5"] { top: 200px; left: 100px; background-color: #cd853f; } /* Cafe */
#town .house[data-house="6"] { top: 200px; left: 300px; background-color: #228b22; } /* Park */

.house::after {
    content: attr(data-name);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    color: #333;
}

/* Scene-specific backgrounds */
#house1 { background-color: #e6d5b8; } /* Library interior */
#house2 { background-color: #d3d3d3; } /* Town Hall interior */
#house3 { background-color: #e6e6fa; } /* Mystic Shop interior */
#house4 { background-color: #2f4f4f; } /* Ancient Tower interior */
#house5 { background-color: #fff5e6; } /* Cafe interior */
#house6 { background-color: #90ee90; } /* Park scene */
