.key {
    display: inline-block;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    color: #e64398;
    font-weight: bold;
    margin-right: 6px;
}

/* 贪吃蛇游戏区域 - 视觉优化 */
.snake-game {
    background: linear-gradient(135deg, #f0f8fb 0%, #e8f4f8 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
}
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.score {
    font-size: 20px;
    font-weight: bold;
    color: #2d3748;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.game-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}
.game-btn:hover {
    background: linear-gradient(135deg, #337ecc 0%, #265e99 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
}
#gameCanvas {
    border: 3px solid #dee2e6;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fafafa 100%);
    display: block;
    margin: 0 auto;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
}
.game-tip {
    margin-top: 16px;
    font-size: 14px;
    color: #718096;
}

/* 精美结算弹窗样式 */
.game-over-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    border-radius: 16px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.modal-content {
    background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    min-width: 280px;
}
.modal-title {
    font-size: 22px;
    color: #e64398;
    margin: 0 0 10px;
    font-weight: bold;
}
.modal-score {
    font-size: 18px;
    color: #333;
    margin: 15px 0 25px;
}
.modal-score span {
    color: #409eff;
    font-weight: bold;
    font-size: 24px;
}
.modal-restart {
    padding: 10px 20px;
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}
.modal-restart:hover {
    background: linear-gradient(135deg, #337ecc 0%, #265e99 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
}