* {
    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;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

#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: 2vh;
    text-align: center;
    font-size: 3.8vmin;
    color: #A36442;
    margin-left: -10%;
    font-weight: bold;
    padding-top: 0.5vh;
}

.hidden {
    display: none !important;
}

.title-image {
    max-width: 80%;
    margin-bottom: 3vh;
}

.bee-image {
    width: 16vmin;
    height: auto;
    margin: 3vh 0;
    animation: float 1.5s infinite alternate ease-in-out;
}

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

.instructions {
    font-size: 2.5vmin;
    margin-bottom: 4vh;
    color: #333;
}

button {
    background-color: #ffcc00;
    color: #333;
    border: none;
    padding: 2vh 4vw;
    font-size: 2.3vmin;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    margin-top: 3vh;
}

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: 90%;
    min-height: 30vh;
    padding: 4% 3%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11;
    margin: 3% 0;
    box-sizing: border-box;
}

.score-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-around;
    align-items: center;
    width: 90%;
    margin: 0 auto;
    padding: 2%;
    font-size: 2.8vmin;
    font-weight: bold;
    color: #333;
    position: relative;
    z-index: 11;
    background-color: transparent;
}

.score-container span {
    font-size: 4vmin;
    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: 2vmin;
    width: 14vmin;
    margin-right: 36%;
    margin-top: 10%;
}

.achievement-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1.5;
    position: relative;
}

.achievement-item img {
    max-width: 85%;
    max-height: 85%;
    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: 2%;
    left: 5%;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1.5% 3%;
    border-radius: 20px;
    font-size: 3.5vmin;
    font-weight: bold;
    color: #333;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-achievement {
    width: 4vmin;
    height: 4vmin;
    object-fit: contain;
    animation: none;
    display: block;
    margin-right: 8px;
}

@keyframes achievementUnlocked {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式设计 */
/* 响应式设计 - 适配不同分辨率的iPhone屏幕 */
@media (max-width: 768px) {
    #game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .title-image {
        max-width: 70%;
    }
    
    .instructions {
        font-size: calc(16px + 1vw);
    }
    
    button {
        font-size: calc(16px + 0.5vw);
        padding: 12px 24px;
    }
    
    .achievements {
        width: 16vmin;
        gap: 1.5vmin;
    }
    
    .achievement-item {
        aspect-ratio: 1/1.4;
    }
    
    .achievement-item img {
        max-width: 80%;
        max-height: 80%;
    }
}

/* iPhone 1倍屏 */
@media (-webkit-min-device-pixel-ratio: 1) {
    .score-info {
        font-size: 2.8vmin;
    }
    
    .score-container span {
        font-size: 3.8vmin;
    }
}

/* iPhone 2倍屏 */
@media (-webkit-min-device-pixel-ratio: 2) {
    .score-info {
        font-size: 3vmin;
    }
    
    .score-container span {
        font-size: 4vmin;
    }
}

/* iPhone 3倍屏 */
@media (-webkit-min-device-pixel-ratio: 3) {
    .score-info {
        font-size: 3.2vmin;
    }
    
    .score-container span {
        font-size: 4.2vmin;
    }
}