body {
    font-family: sans-serif;
    margin: 16px;
    background-color: #f9f9f9;
}

h1 {
    text-align: center;
}

#gameScreen {
    display: flex;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

#mainArea {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#ingameScreen {
    position: relative;
    width: 640px;
    height: 480px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    overflow: hidden;
}

#backdropContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#backdropContainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#skeletonSprite,
#playerSprite {
    position: absolute;
    bottom: 20px;
    width: 200px;
    z-index: 2;
}

#skeletonSprite {
    left: 50px;
}

#playerSprite {
    right: 50px;
}

#messages {
    width: 640px;
    min-height: 120px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: 316px;
}
#messages.started {
    max-height: 120px;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.buttons button {
    display: inline-block;
    margin: 4px 2px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

#rightPanel {
    display: flex;
    flex-direction: column;
    width: 250px;
    border: 1px solid #aaa;
    padding: 10px;
    box-sizing: border-box;
}

#playerContainer,
#monstersContainer,
#shopContainer {
    margin-bottom: 20px;
}

#playerStatsArea {
    background: #eee;
    padding: 5px;
    margin-top: 5px;
    font-size: 0.8rem;
}

#monstersList div {
    margin-top: 5px;
    background: #eee;
    padding: 5px;
    font-size: 0.8rem;
}

#shopContainer {
    border: 1px dashed #666;
    background-color: #fafafa;
}

.hidden {
    display: none !important;
}
