body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    color: white;
    user-select: none;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #222;
    z-index: 1;
}

#gameUI {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    z-index: 10;
}

#gameOver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
}

.game-over-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 30, 0.95);
    padding: 40px;
    border-radius: 20px;
    min-width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.game-over-title {
    margin: 0 0 30px 0;
    font-size: 48px;
    font-weight: bold;
}

.restart-button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 24px;
    background-color: #4CAF50;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.restart-button:hover {
    background-color: #45a049;
}

.stats {
    font-size: 24px;
    margin: 20px 0;
}

.stats p {
    margin: 10px 0;
}

.expBar {
    width: 200px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin: 5px 0;
}

.expBarFill {
    height: 100%;
    width: 0%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.expText {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 20px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.healthContainer {
    margin: 10px 0;
}

.healthBarOuter {
    width: 200px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.healthBarInner {
    width: 100%;
    height: 100%;
    background-color: #2ecc71;
    transition: all 0.3s ease;
}

#pauseText {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 100;
    pointer-events: none;
}

.game-over.game-over-victory {
    background-color: rgba(0, 100, 0, 0.9);
}

.game-over.game-over-defeat {
    background-color: rgba(100, 0, 0, 0.9);
}

/* æµ®åŠ¨æ–‡æœ¬æ•ˆæžœ */
.floating-text {
    position: absolute;
    font-weight: bold;
    pointer-events: none;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    animation: floatUp 1s ease-out;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/* Bossè­¦å‘Š */
.boss-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(200, 0, 0, 0.8);
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px black;
    z-index: 1000;
    animation: bossWarning 3s ease-in-out;
}

@keyframes bossWarning {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    20% {
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* çˆ†ç‚¸ç‰¹æ•ˆ */
.explosion-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.8) 0%, rgba(255, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 5;
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* é—ªç”µé“¾ç‰¹æ•ˆ */
.lightning-effect {
    position: absolute;
    background: linear-gradient(90deg, #4ff 0%, #fff 50%, #4ff 100%);
    height: 3px;
    transform-origin: left center;
    opacity: 0.7;
    pointer-events: none;
    z-index: 4;
    animation: lightning 0.2s ease-out;
}

@keyframes lightning {
    0% {
        opacity: 0.9;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

/* Bossè¿›åº¦æ˜¾ç¤º */
.boss-progress {
    color: #ffd700;
    font-size: 14px;
    text-shadow: 0 0 3px #ff6b6b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}