body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #E8E8E8; /* 调整为更接近参考的浅灰色 */
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    max-width: 614px; /* 模拟手机屏幕宽度 */
    max-height: 896px; /* 模拟手机屏幕高度 */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #E8E8E8; /* 调整为更接近参考的浅灰色 */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 15px 20px;
    box-sizing: border-box;
    z-index: 10;
}

.header h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.score-container {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 56px;
    color: rgba(0, 0, 0, 0.2); /* 调整为深色透明，以适应浅色背景 */
    z-index: 10;
    pointer-events: none; /* 穿透点击事件 */
}

.back-button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #0056b3;
}

.home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.controls-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(0,0,0,0.4);
    font-size: 14px;
    pointer-events: none;
}

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#restart-button {
    background-color: #007aff;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#restart-button:hover {
    background-color: #0056b3;
} 