* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px;
}

#game-container {
    position: relative;
    width: 750px;
    height: 1624px;
    margin: 0 auto;
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 20px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.7);
}

#game-over-screen {
    position: relative;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    z-index: 100;
    gap: 30px;
}

.score-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    font-size: 28px;
    color: #A36442;
    margin-left: 30px;
    font-weight: bold;
    padding-top: 10px;
}

.hidden {
    display: none !important;
}

.title-image {
    max-width: 80%;
    margin-bottom: 20px;
}

.bee-image {
    width: 120px;
    height: auto;
    margin: 20px 0;
    animation: float 1.5s infinite alternate ease-in-out;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.instructions {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

button {
    background-color: #ffcc00;
    color: #333;
    border: none;
    padding: 15px 30px;
    font-size: 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    margin-top: 20px;
}

button:hover {
    background-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scoreboard-container {
    background: url('assets/Scoreboard.png') no-repeat center center;
    background-size: contain;
    position: relative;
    width: 80%;
    min-height: 300px;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11;
    margin: 20px 0;
    box-sizing: border-box;
}

.score-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: 0 auto;
    padding: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    position: relative;
    z-index: 11;
    background-color: transparent;
}

.score-container span {
    font-size: 48px;
    color: #FE813E;
    display: block;
    text-align: center;
    margin-top: 5px;
}

/* 爱心消失动画 */
@keyframes heartDisappear {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 啤酒成就系统 */
.achievements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 150px; /* 进一步增加宽度以适应图片 */
    margin-right: 40px;
    margin-top: 30px;
}

.achievement-item {
    display: flex;
    align-items: center;
    justify-content: center; /* 居中显示 */
    width: 110px;
    height: 180px; /* 增加高度，保持瓶子的长宽比 */
    position: relative; /* 添加相对定位 */
}

.achievement-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* 自动调整宽度 */
    height: auto; /* 自动调整高度 */
    object-fit: contain; /* 保持图片原始比例 */
    transition: transform 0.3s ease;
    margin: 0; /* 移除上边距 */
}

.achievement-item.locked img {
    opacity: 0.5;
}

.achievement-name {
    display: none;
}

#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    z-index: 5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 750 / 1624;
        max-width: 750px;
    }
}

@media (max-height: 900px) {
    #game-container {
        height: 90vh;
        width: auto;
        aspect-ratio: 750 / 1624;
    }
}