* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #1a1a1a;
    touch-action: none; /* 防止手机端下拉刷新 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* 响应式布局 */
@media (max-width: 768px) {
    #ui-layer {
        padding: 0.5rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .text-xl {
        font-size: 1rem !important;
    }
    
    .text-lg {
        font-size: 0.875rem !important;
    }
    
    #boss-hud {
        width: 90% !important;
        top: 40px !important;
    }
}

@media (max-width: 480px) {
    #ui-layer {
        padding: 0.25rem !important;
    }
    
    .text-sm {
        font-size: 0.75rem !important;
    }
    
    .text-xs {
        font-size: 0.625rem !important;
    }
}
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.pointer-events-auto {
    pointer-events: auto;
}
#weaponLevelDisplay {
    display: inline-block;
    max-width: 160px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.1;
}
.menu-banner {
    position: relative;
    display: inline-flex;
    justify-content: center;
    width: 100%;
    perspective: 800px;
}
.menu-banner img {
    width: clamp(320px, 70vw, 720px);
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.65));
    animation: banner-float 6s ease-in-out infinite;
}
.menu-banner-glow {
    position: absolute;
    inset: 15% 10%;
    background: radial-gradient(circle, rgba(59,130,246,0.35), transparent 60%);
    filter: blur(40px);
    z-index: -1;
    animation: banner-glow 8s ease-in-out infinite alternate;
}
@keyframes banner-float {
    0% { transform: translateY(0px) rotateX(0deg); }
    50% { transform: translateY(-6px) rotateX(1deg); }
    100% { transform: translateY(0px) rotateX(0deg); }
}
@keyframes banner-glow {
    from { opacity: 0.4; transform: scale(0.95); }
    to { opacity: 0.9; transform: scale(1.05); }
}
/* 霓虹发光效果 */
.neon-text {
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
}
.neon-danger {
    text-shadow: 0 0 5px #f00, 0 0 10px #f00;
}
.neon-gold {
    text-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700;
    color: #ffd700;
}
.neon-blue {
    text-shadow: 0 0 5px #3b82f6, 0 0 10px #3b82f6;
    color: #60a5fa;
}
.neon-green {
    text-shadow: 0 0 5px #4ade80, 0 0 10px #4ade80;
    color: #4ade80;
}
.neon-purple {
    text-shadow: 0 0 5px #d946ef, 0 0 10px #d946ef;
}
.neon-pink {
    text-shadow: 0 0 5px #ec4899, 0 0 10px #ec4899;
    color: #ec4899;
}

/* Boss 血条样式 */
#boss-hud {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    opacity: 0;
    transition: opacity 0.5s;
}

/* 必杀技按钮动画 */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.super-ready {
    animation: pulse-red 1.5s infinite;
    background: linear-gradient(45deg, #ef4444, #f87171);
    border-color: #fca5a5;
    cursor: pointer;
}
.super-charging {
    background: #374151;
    border-color: #4b5563;
    cursor: not-allowed;
    opacity: 0.7;
}
/* 无尽模式下必杀技禁用样式 */
.super-disabled {
    background: #1f2937;
    border-color: #374151;
    color: #4b5563;
    cursor: not-allowed;
    box-shadow: none;
}

/* 难度选择按钮选中态 */
.difficulty-btn.selected {
    transform: scale(1.05);
    box-shadow: 0 0 15px currentColor;
    border-color: #fff;
}

/* 地狱模式特殊样式 */
.hell-mode-bg {
    animation: bg-pulse-red 2s infinite alternate;
}
@keyframes bg-pulse-red {
    from { background-color: rgba(50, 0, 0, 0.8); }
    to { background-color: rgba(80, 0, 0, 0.9); }
}
/* 无尽模式背景 */
.endless-mode-bg {
    background-color: #0f0f1a; /* 深紫色调 */
}
/* 伙伴模式背景 */
.partner-mode-bg {
    background: linear-gradient(to bottom, #0c1a2b, #1a1a1a); /* 深蓝渐变 */
}

/* 胜利界面闪光 */
.victory-text {
    animation: victory-glow 2s infinite alternate;
}
@keyframes victory-glow {
    from { text-shadow: 0 0 10px #ffd700, 0 0 20px #fbbf24; }
    to { text-shadow: 0 0 20px #ffd700, 0 0 40px #fbbf24, 0 0 60px #fff; }
}

/* 伙伴模式选择弹窗 */
#partnerModal {
    background-color: rgba(12, 20, 35, 0.95);
    backdrop-filter: blur(10px);
}

