/* 全局風格設定 */
body {
    background-color: #0a0a20; /* 極深藍/黑背景 */
    color: #b3e0ff; /* 淺藍色文字 */
    font-family: 'Consolas', monospace; /* 模擬終端機字體 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    user-select: none;
}

.game-container {
    text-align: center;
    border: 2px solid #00ffff; /* 畫框霓虹邊框 */
    box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff inset; /* 增加光暈效果 */
    padding: 20px;
    border-radius: 10px;
    max-width: 650px;
    width: 100%;
}

h1 {
    color: #ff00ff; /* 遊戲標題使用洋紅霓虹 */
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 10px;
}

/* 遊戲得分板的設計 */
.scoreboard-panel {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #00ffff44;
    display: flex;
    justify-content: space-around;
}

/* Canvas 元素本身，確保它在畫面上佔據主要空間 */
#gameCanvas {
    background-color: #050510; /* 內場景深色 */
    border: 2px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5); /* 模擬藍色能量場光暈 */
}

/* 排行榜容器樣式 */
.leaderboard-panel {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff00ff44;
    border-radius: 8px;
}

.leaderboard-panel h2 {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    margin-top: 0;
    border-bottom: 1px dashed #00ff0033;
    padding-bottom: 5px;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
}

#leaderboard-list li:last-child {
    border-bottom: none;
}

/* 遊戲結束或開始訊息的特殊樣式 (保持不變) */
.game-over-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px;
    background-color: rgba(20, 0, 30, 0.9);
    border: 3px solid #ff00ff;
    box-shadow: 0 0 30px #ff00ff;
    text-align: center;
    cursor: pointer;
    animation: blinker 1.5s linear infinite; /* 閃爍動畫 */
}

/* 名字輸入區域樣式 */
#name-input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100; /* 確保在Canvas之上 */
    flex-direction: column;
}

#name-input-overlay input[type="text"] {
    padding: 15px;
    font-size: 1.2em;
    margin-bottom: 20px;
    width: 250px;
    text-align: center;
    background-color: rgba(50, 0, 50, 0.7);
    border: 2px solid #ff00ff;
    color: #ffffff;
}
