body {
    margin: 0;
    padding: 0;
    background-color: #050510;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Space Mono', 'Noto Sans TC', monospace;
    color: white;
    user-select: none;
    overflow: hidden;
}

#game-wrapper {
    position: relative;
    width: 900px;
    height: 400px;
    background: #0b0b1a;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.15);
}

.glow-border {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid #0ff; border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0,255,255,0.3);
    pointer-events: none; z-index: 5;
}

#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between;
    padding: 20px 30px; box-sizing: border-box;
    font-size: 16px; font-weight: bold; letter-spacing: 2px;
    pointer-events: none;
    z-index: 10;
}
.score-box span { font-size: 28px; font-weight: 700; text-shadow: 0 0 15px currentColor; }

canvas { display: block; filter: contrast(1.2); }

.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(5,5,15,0.85); backdrop-filter: blur(8px);
    z-index: 20; color: #fff; text-align: center;
}

h1 { font-family: 'Noto Sans TC'; font-size: 54px; margin: 0 0 15px; text-shadow: 0 0 25px #0ff; letter-spacing: 4px; }
h1.over { font-family: 'Space Mono'; text-shadow: 0 0 30px #f00; color: #ff3333; letter-spacing: 6px; }
p { font-size: 16px; color: #88c; margin-bottom: 40px; line-height: 1.6; }

.btn {
    padding: 15px 40px; font-size: 22px; font-family: 'Noto Sans TC'; font-weight: 900;
    color: #050510; background: #0ff; border: none; border-radius: 4px; cursor: pointer;
    box-shadow: 0 0 20px rgba(0,255,255,0.6); transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    letter-spacing: 2px;
}
.btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0,255,255,0.8); background: #fff; }
.btn:active { transform: scale(0.95); }

#gameOverOverlay .btn { background: #f0f; color: #111; box-shadow: 0 0 20px rgba(255,0,255,0.6); }
#gameOverOverlay .btn:hover { background: #ffaaaa; box-shadow: 0 0 30px rgba(255,0,255,0.8); }

.back-btn {
    position: absolute; bottom: 25px; font-size: 14px;
    color: #668; text-decoration: none; border-bottom: 1px solid #668;
    transition: color 0.2s, border-color 0.2s; letter-spacing: 1px;
}
.back-btn:hover { color: #fff; border-color: #fff; }
