body {
    margin: 0;
    overflow: hidden;
    user-select: none;
    font-family: Arial, sans-serif;
}

#gameUI {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 100;
}

.screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
}

.block {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dynamic {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-100px); }
}

.hidden { display: none; }

.score-popup {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 4px black;
    animation: popup 1s forwards;
    pointer-events: none;
    z-index: 50;
}

@keyframes popup {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* 修改后的彩带效果样式 */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0.8;
    animation: confetti-throw 3s ease-out forwards;
    z-index: 99;
}

@keyframes confetti-throw {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--horizontal-move), -100vh) rotate(360deg);
        opacity: 0;
    }
}

.restart-btn {
    margin-top: 20px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.restart-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

/* 底部信息样式 */
.footer-info {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #999;
    text-align: center;
    z-index: 100;
}

.footer-info a {
    color: #999;
    text-decoration: none;
    margin: 0 5px;
}

.footer-info a:hover {
    color: #666;
}