body {
    margin: 0;
    overflow: hidden;
    background-color: #111;
    color: white;
    font-family: Arial, sans-serif;
}

#gameCanvas {
    display: block;
    position: fixed;
    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: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 20;
}

.expBar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #5ff;
    border-radius: 10px;
    margin: 5px 0;
    position: relative;
    overflow: hidden;
}

.expBarFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #5ff, #2af);
    transition: width 0.3s ease;
}

.expText {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    font-size: 12px;
}

button {
    padding: 10px 20px;
    background-color: #4a1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #5b2;
}

#upgradeMenu button {
    background: rgba(95, 255, 255, 0.2);
    border: 2px solid #5ff;
    padding: 15px;
    width: 200px;
    margin: 5px;
    display: block;
}

#upgradeMenu button:hover {
    background: rgba(95, 255, 255, 0.3);
}

#upgradeMenu h3 {
    margin: 0 0 5px 0;
    color: #5ff;
}

#upgradeMenu p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.healthContainer {
    margin: 10px 0;
}

.healthBarOuter {
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #000;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
}

.healthBarInner {
    width: 100%;
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease-out, background-color 0.3s ease-out;
}

/* 爆炸效果 */
@keyframes explosion {
    0% {
        transform: scale(0);
        opacity: 0.8;
        background: radial-gradient(circle, #ff6b6b, #ffd93d);
    }
    50% {
        opacity: 0.6;
        background: radial-gradient(circle, #ffd93d, #ff9f43);
    }
    100% {
        transform: scale(1);
        opacity: 0;
        background: radial-gradient(circle, #ff9f43, transparent);
    }
}

.explosion-effect {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: explosion 0.5s ease-out forwards;
    mix-blend-mode: screen;
}

/* 闪电效果 */
@keyframes lightning {
    0%, 100% {
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.8;
    }
}

.lightning-effect {
    position: absolute;
    pointer-events: none;
    background: linear-gradient(to right, #00d2ff, #3a7bd5);
    z-index: 4;
    animation: lightning 0.2s ease-out;
    mix-blend-mode: screen;
}
