/* 全局樣式設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #1a1a24;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 遊戲主容器 */
.game-container {
    background-color: #242432;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    letter-spacing: 2px;
}

/* 資訊面板樣式 */
.info-panel {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: #1e1e2a;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #33334d;
}

.score-box {
    font-size: 15px;
    line-height: 1.6;
}

.score-box span {
    font-weight: bold;
    color: #ff007f;
}

.difficulty-box label {
    font-size: 14px;
    color: #a0a0c0;
}

#difficulty-select {
    background-color: #2c2c3e;
    color: #ffffff;
    border: 1px solid #444466;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    font-size: 14px;
}

/* 畫布包裝容器，方便疊加覆蓋層 */
.canvas-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #3c3c56;
}

/* 遊戲畫布 */
#game-canvas {
    background-color: #0f0f16;
    display: block;
}

/* 覆蓋層（開始與遊戲結束畫面） */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 22, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 0.3s ease;
}

#overlay-text {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 0 20px;
    line-height: 1.5;
}

#start-btn {
    background: linear-gradient(135deg, #00ffcc 0%, #00b894 100%);
    color: #101018;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.4);
    transition: transform 0.1s, box-shadow 0.2s;
}

#start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 255, 204, 0.6);
}

#start-btn:active {
    transform: translateY(0);
}

/* 遊戲操作說明面板 */
.instruction-panel {
    margin-top: 20px;
    width: 100%;
    font-size: 13px;
    color: #a0a0c0;
    line-height: 1.6;
    background-color: #1e1e2a;
    padding: 12px 15px;
    border-radius: 10px;
    border-left: 4px solid #00ffcc;
}

.instruction-panel p {
    margin-bottom: 4px;
}

.instruction-panel p:last-child {
    margin-bottom: 0;
}
