.auth-panel {
    margin: 15px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.auth-panel button {
    margin: 0 5px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 70%;
    max-width: 300px;
    position: relative;
}

.modal-content .setting-item {
    margin-bottom: 15px;
    padding: 5px 0;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content button {
    width: 100%;
    margin-top: 10px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.modal input {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    box-sizing: border-box;
}

#score-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#score-history th, #score-history td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .game-container {
        max-width: 100%;
        padding: 10px;
    }

    
}

/* 虚拟方向键样式 */
.mobile-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    margin-top: 15px;
    width: 100%;
    max-width: 300px;
}

.control-row {
    display: flex;
}

.control-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin: 3px;
    border-radius: 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

.control-btn:active {
    background-color: #45a049;
}

/* 桌面端隐藏虚拟按键 */
@media (min-width: 769px) {
    .mobile-controls {
        display: none;
    }
}

.score-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 18px;
    gap: 10px;
}

#home-btn {
    background-color: #2196F3;
}

#home-btn:hover {
    background-color: #0b7dda;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: #f0f0f0;
}

.game-over {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

button {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
}

button:hover {
    background-color: #45a049;
}