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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

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

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.screen button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.screen button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.screen button:active {
    transform: translateY(0);
}

.score-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

@media (max-width: 480px) {
    .screen h1 {
        font-size: 1.8rem;
    }

    .screen p {
        font-size: 1rem;
    }

    .screen button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* 蛋糕计数器样式 */
.cake-display {
    position: absolute;
    top: 70px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    background: rgba(255, 182, 193, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.cake-icon {
    font-size: 1.5rem;
    animation: float 2s ease-in-out infinite;
}

.cake-target {
    opacity: 0.7;
    font-size: 1rem;
}

/* 保护罩显示样式 */
.shield-display {
    position: absolute;
    top: 70px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(100, 149, 237, 0.4);
    border-radius: 50%;
    z-index: 10;
    backdrop-filter: blur(5px);
    animation: shieldPulse 1.5s ease-in-out infinite;
}

.shield-display.hidden {
    display: none;
}

.shield-icon {
    font-size: 2rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(100, 149, 237, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(100, 149, 237, 0.8);
    }
}
