body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
}

.game-container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

h1 {
    color: #FF6B6B;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 2rem;
}

.game-stats {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    min-width: 80px;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 500;
    color: #FF6B6B;
}

#gameCanvas {
    width: 80%;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
    background-color: rgba(248, 249, 250, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.12),         /* 外阴影 */
        0 0 20px rgba(255, 255, 255, 0.9),       /* 外发光 */
        0 0 0 1px rgba(255, 255, 255, 0.5);      /* 边缘光晕 */
    backdrop-filter: blur(8px);
    position: relative;
}

/* 修改边缘发光效果 */
#gameCanvas::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.7),                /* 增强顶部边亮度 */
        rgba(255, 255, 255, 0.3)                 /* 底部边缘稍微暗一些 */
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.instructions {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    .game-container {
        width: 100%;
        padding: 1rem;
        border-radius: 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .control-panel {
        padding: 1rem;
        gap: 2rem;
    }
    
    .panel-left {
        padding-left: 1rem;
    }
    
    .panel-right {
        margin-right: 1rem;
    }
    
    .dir-btn, #pauseBtn {
        width: 55px;
        height: 55px;
    }
} 

.game-content {
    flex: 1;
} 

/* 微调上下键的位置 */
.key-row:first-child,
.key-row:last-child {
    position: relative;
    top: 2px;
} 

.game-layout {
    position: relative;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-left: 1rem;
}

.control-panel {
    margin-top: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 0 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.panel-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
    padding-left: 2rem;
}

.stats-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.panel-right {
    padding: 0.5rem;
    margin-right: 2rem;
    margin-left: 0;
}

.direction-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    height: 100%;
    justify-content: space-between;
}

.middle-row {
    display: flex;
    gap: 1rem;
}

#startBtn {
    cursor: pointer;
    transition: all 0.2s;
    color: #FF6B6B;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    outline: none;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.15);
}

#startBtn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.2);
}

#startBtn:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 0 4px rgba(0, 0, 0, 0.04);
}

#startBtn:focus {
    outline: none;
}

#pauseBtn {
    cursor: pointer;
    transition: all 0.2s;
    color: #4ECDC4;
    font-size: 1.5rem;
    font-weight: 600;
    border: none;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 10px;
    width: 65px;
    height: 65px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.15);
}

#pauseBtn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.2);
}

#pauseBtn:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 0 4px rgba(0, 0, 0, 0.04);
}

#pauseBtn:focus {
    outline: none;
}

.dir-btn {
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.15);
}

.dir-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 5px rgba(0, 0, 0, 0.05),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.2);
}

.dir-btn:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 0 4px rgba(0, 0, 0, 0.04);
}

/* 暂停键特殊样式 */
#pauseBtn {
    color: #4ECDC4;
    background: rgba(78, 205, 196, 0.1);
    font-weight: 600;
}

.encourage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FF6B6B;
    font-size: 2.5rem;
    font-weight: 800;
    white-space: nowrap;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.15),
        0 0 15px rgba(255, 107, 107, 0.5);
    animation: encourageAnim 1.5s ease-out forwards;
    z-index: 100;
    pointer-events: none;
}

@keyframes encourageAnim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.game-over-face {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease-out forwards;
    z-index: 1000;
    width: auto;
    padding: 0;
    background: none;
    box-shadow: none;
}

.face {
    width: 100px;
    height: 100px;
    background: #FFD93D;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.eyes {
    position: absolute;
    top: 25%;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.eye {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.eye::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: eyeMove 2s infinite;
}

.mouth {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    border: none;
    border-radius: 0 0 60px 60px;
    background: #333;
    overflow: hidden;
}

.mouth::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: #FF6B6B;
    border-radius: 50%;
}

.game-over-text {
    color: #FF6B6B;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    margin: 0.3rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.final-score {
    color: #4ECDC4;
    font-size: 1.3rem;
    margin-top: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0% { transform: scale(0.3); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes blink {
    0% { transform: scaleY(1); }
    10% { transform: scaleY(0.1); }
    20% { transform: scaleY(1); }
}

@keyframes eyeMove {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-30%, -50%); }
    75% { transform: translate(-70%, -50%); }
}

.welcome-face {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.welcome-face .eye::after {
    animation: lookAround 3s infinite;  /* 更慢的眼睛转动 */
}

.welcome-text {
    color: #FF6B6B;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes lookAround {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-70%, -70%); }  /* 左上 */
    50% { transform: translate(0%, 0%); }      /* 右下 */
    75% { transform: translate(-30%, 30%); }   /* 左下 */
}
</```
rewritten_file>