/* 全局样式 */
body {
    background-color: #333;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: "Courier New", Courier, monospace; /* 使用等宽字体，更有复古感 */
}

/* 游戏容器，模拟游戏机屏幕 */
#game-container {
    background-color: #888888;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
}

/* 游戏主画面 */
#game-screen {
    width: 320px;  /* 10个格子 * 32px */
    height: 640px; /* 20个格子 * 32px */
    background-color: #9bbc0f; /* Gameboy 经典绿色背景 */
    position: relative;
    overflow: hidden;
}

/* 网格单元、墙壁、书架、跑步机等 */
.grid-cell {
    position: absolute;
    width: 32px;
    height: 32px;
}

.wall {
    background-color: #000000; /* 黑色墙壁 */
}

.floor {
    background-color: #ffffff; /* 白色地板 */
}

.bookshelf {
    background-image: url('bookshelf_highly_compressed.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.treadmill {
    background-image: url('treadmill_highly_compressed.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.door {
    background-color: #888888; /* 灰色门，可通过 */
}

.bed {
    background-image: url('bed.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.flower {
    background-image: url('flower1.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.ship {
    background-image: url('ship.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.watermelon {
    background-image: url('watermelon.png');
    background-size: cover;
    background-repeat: no-repeat;
}

/* 篝火左上角 */
.campfire-tl {
    background-image: url('campfire_processed.png');
    background-size: 200% 200%;
    background-position: 0% 0%;
    background-repeat: no-repeat;
}

/* 篝火右上角 */
.campfire-tr {
    background-image: url('campfire_processed.png');
    background-size: 200% 200%;
    background-position: 100% 0%;
    background-repeat: no-repeat;
}

/* 篝火左下角 */
.campfire-bl {
    background-image: url('campfire_processed.png');
    background-size: 200% 200%;
    background-position: 0% 100%;
    background-repeat: no-repeat;
}

/* 篝火右下角 */
.campfire-br {
    background-image: url('campfire_processed.png');
    background-size: 200% 200%;
    background-position: 100% 100%;
    background-repeat: no-repeat;
}

/* 玩家角色 */
#player {
    position: absolute;
    width: 32px;
    height: 32px;
    background-size: cover;
    background-repeat: no-repeat;
    transition: left 0.2s linear, top 0.2s linear; /* 平滑移动效果 */
    z-index: 10;
}

/* 玩家角色 - 默认状态 */
#player.player-normal {
    background-image: url('snorlax.png');
}

/* 玩家角色 - 可交互状态 */
#player.player-interactive {
    background-image: url('snorlax_shock.png');
}

/* 信息框 - 只覆盖游戏房间区域 */
#message-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 320px; /* 只覆盖房间区域，不包括下面的花朵 */
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px;
    box-sizing: border-box;
    z-index: 20;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#message-text {
    white-space: pre-line;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    max-width: 90%;
    margin-bottom: 15px;
}

#message-box.hidden {
    display: none;
}

#message-box .prompt {
    font-size: 11px;
    color: #777;
    text-align: center;
    margin-top: 10px;
}
