body {
    margin: 0;
    background: linear-gradient(to bottom, #1a2a6c, #b21f1f, #fdbb2d);
    font-family: 'Arial', sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

.game-container {
    max-width: 400px;
    width: 100%;
    padding: 15px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.screen {
    transition: all 0.3s ease;
}

.hidden {
    display: none;
}

.game-intro {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

canvas {
    border: 3px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    touch-action: none;
    max-width: 100%;
    height: auto;
}

.btn {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 10px 5px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#leaderboardList {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.leaderboard-item:nth-child(1) {
    background-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-item:nth-child(2) {
    background-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-item:nth-child(3) {
    background-color: rgba(205, 127, 50, 0.3);
}

/* 本地記錄樣式 */
.local-note {
    margin-top: 15px;
    font-style: italic;
    color: #FFD700;
}

.leaderboard-item.local {
    border-left: 3px solid #FFD700;
    background-color: rgba(255, 215, 0, 0.1);
}

/* 同步警告樣式 */
.sync-warning {
    background-color: rgba(255, 0, 0, 0.2);
    color: #FFC0CB;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 3px solid #FF6347;
    font-size: 14px;
}

/* 排行榜標題樣式 */
.leaderboard-divider {
    margin: 20px 0 10px 0;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.leaderboard-divider h3 {
    margin: 0;
    color: #FFD700;
    font-size: 18px;
    text-align: center;
}

/* 全球排行榜標題 */
#leaderboardList h3 {
    color: #00BFFF;
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 18px;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

/* 本地記錄切換按鈕 */
.toggle-local {
    background: linear-gradient(to right, #FFD700, #FFA500) !important;
    font-size: 14px !important;
    padding: 8px 15px !important;
    margin: 15px auto !important;
    display: block !important;
}

/* 本地記錄容器 */
#localScores {
    margin-top: 15px;
    transition: all 0.3s ease;
}

#localScores.hidden {
    display: none;
}