/* ========================================
   赛博木鱼：功德无量Pro - 终极赛博朋克美学
   ======================================== */

/* 引入本地字体文件 */
@import url('fonts/font-face.css');

/* CSS 变量 - 赛博朋克配色方案 */
:root {
    /* 霓虹色彩 */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-yellow: #ffff00;
    --neon-green: #00ff00;
    --neon-blue: #0080ff;
    --neon-purple: #8000ff;

    /* 背景色 */
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --bg-card: rgba(10, 10, 30, 0.7);
    --bg-glass: rgba(20, 20, 40, 0.5);

    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #b0b0d0;
    --text-muted: #606080;

    /* 发光效果 */
    --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5);
    --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.5);
    --glow-yellow: 0 0 20px rgba(255, 255, 0, 0.5);
    --glow-intense: 0 0 40px rgba(0, 255, 255, 0.8);

    /* 玻璃态效果 */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(0, 255, 255, 0.2);

    /* 动画速度 */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 隐藏body滚动条 */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 主体样式 */
body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;

    /* 更丰富的背景渐变 */
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 128, 255, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #050510 0%, #0a0a2e 50%, #0a1a2e 100%);
}

/* ========================================
   背景特效系统
   ======================================== */

#background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 数字雨效果 - 升级版 */
.digital-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 100px,
            rgba(255, 0, 255, 0.01) 100px,
            rgba(255, 0, 255, 0.01) 101px
        );
    animation: digitalScroll 30s linear infinite;
    opacity: 0.6;
}

@keyframes digitalScroll {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(100px) translateX(10px); }
}

/* 粒子容器 */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 粒子效果 - 升级版 */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    animation: particleFloat 12s ease-in-out infinite;
}

.particle:nth-child(odd) {
    background: var(--neon-magenta);
    box-shadow:
        0 0 10px var(--neon-magenta),
        0 0 20px var(--neon-magenta),
        0 0 30px var(--neon-magenta);
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(100vh) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    50% { opacity: 0.8; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* ========================================
   主容器
   ======================================== */

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   顶部栏 - 玻璃态设计
   ======================================== */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--bg-glass);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.1),
        transparent
    );
    animation: topBarShine 8s linear infinite;
}

@keyframes topBarShine {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* 功德计数器 */
.merit-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    text-shadow: var(--glow-cyan);
    position: relative;
    z-index: 1;
}

.merit-label {
    color: var(--neon-cyan);
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.merit-value {
    color: var(--neon-magenta);
    font-family: 'Orbitron', monospace;
    min-width: 250px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1px;
    transition: all var(--transition-fast) ease;
    text-shadow: var(--glow-magenta);
}

.merit-value.updated {
    animation: meritUpdate 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes meritUpdate {
    0% {
        transform: scale(1) rotate(0deg);
        color: var(--neon-magenta);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
        color: var(--neon-yellow);
        text-shadow: 0 0 30px var(--neon-yellow);
    }
    100% {
        transform: scale(1) rotate(0deg);
        color: var(--neon-magenta);
    }
}

/* 顶部按钮组 */
.top-buttons {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 1;
}

/* 图标按钮 - 霓虹风格 */
.icon-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--neon-cyan);
    background: var(--bg-glass);
    color: var(--neon-cyan);
    font-size: 24px;
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
}

.icon-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all var(--transition-normal) ease;
}

.icon-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow:
        var(--glow-cyan),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
}

.icon-btn:hover::before {
    width: 200%;
    height: 200%;
}

.icon-btn:active {
    transform: translateY(0) scale(0.95);
}

/* ========================================
   主页面
   ======================================== */

.main-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden; /* 防止产生滚动条 */
}

/* ========================================
   木鱼容器 - 核心设计
   ======================================== */

.muyu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
}

/* 木鱼主体 */
.muyu {
    width: 280px;
    height: 280px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.muyu:hover {
    transform: scale(1.08);
}

.muyu:active {
    transform: scale(0.95);
}

.muyu-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 木鱼身体 - 玻璃态设计 */
.muyu-body {
    width: 240px;
    height: 240px;
    background: linear-gradient(135deg,
        rgba(20, 20, 50, 0.8) 0%,
        rgba(40, 40, 80, 0.6) 100%
    );
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    position: relative;
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 80px rgba(0, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    color: var(--neon-cyan);
    transition: all var(--transition-normal) ease;
    backdrop-filter: var(--glass-blur);
}

/* 木鱼光晕效果 */
.muyu-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 255, 255, 0.3) 0%,
        rgba(0, 255, 255, 0.1) 40%,
        transparent 70%
    );
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
    filter: blur(10px);
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 木鱼点击效果 */
.muyu.clicked .muyu-body {
    animation: muyuClick 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow:
        0 0 60px rgba(0, 255, 255, 0.8),
        0 0 100px rgba(0, 255, 255, 0.5),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
}

@keyframes muyuClick {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(0.85) rotate(-5deg); }
    50% { transform: scale(0.9) rotate(5deg); }
    75% { transform: scale(0.95) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 点击光环 - 升级版 */
.click-ring {
    position: absolute;
    width: 280px;
    height: 280px;
    border: 3px solid var(--neon-cyan);
    border-radius: 50%;
    animation: ringExpand 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    box-shadow:
        0 0 20px var(--neon-cyan),
        inset 0 0 20px var(--neon-cyan);
}

@keyframes ringExpand {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* 木鱼等级和上限显示 */
.muyu-level {
    font-size: 24px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.merit-limit {
    font-size: 16px;
    color: var(--neon-magenta);
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* ========================================
   木鱼等级样式 - 进阶版
   ======================================== */

/* LV2: 霓虹木鱼 */
.muyu.lv2 .muyu-body {
    background: linear-gradient(135deg,
        rgba(60, 20, 100, 0.8) 0%,
        rgba(100, 40, 140, 0.6) 100%
    );
    border-color: var(--neon-magenta);
    box-shadow:
        0 0 40px rgba(255, 0, 255, 0.5),
        0 0 80px rgba(255, 0, 255, 0.3),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* LV3: 数据流木鱼 */
.muyu.lv3 .muyu-body {
    background: linear-gradient(135deg,
        rgba(20, 60, 100, 0.8) 0%,
        rgba(40, 100, 140, 0.6) 100%
    );
    border-color: var(--neon-cyan);
    animation: dataFlow 3s linear infinite;
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.6),
        0 0 80px rgba(0, 255, 255, 0.4),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
}

@keyframes dataFlow {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.2); }
    100% { filter: hue-rotate(360deg) brightness(1); }
}

/* LV4: 量子木鱼 */
.muyu.lv4 .muyu-body {
    background: linear-gradient(135deg,
        rgba(100, 20, 100, 0.8) 0%,
        rgba(140, 40, 140, 0.6) 100%
    );
    border-color: var(--neon-yellow);
    animation: quantumShift 2s ease-in-out infinite;
    box-shadow:
        0 0 50px rgba(255, 255, 0, 0.6),
        0 0 100px rgba(255, 255, 0, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

@keyframes quantumShift {
    0%, 100% {
        transform: rotate(0deg) scale(1) translateY(0);
    }
    25% {
        transform: rotate(90deg) scale(0.9) translateY(-10px);
    }
    50% {
        transform: rotate(180deg) scale(1) translateY(0);
    }
    75% {
        transform: rotate(270deg) scale(0.9) translateY(-10px);
    }
}

/* LV5: 奇点木鱼 */
.muyu.lv5 .muyu-body {
    background: radial-gradient(circle,
        rgba(10, 10, 20, 0.9) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    border-color: var(--neon-magenta);
    box-shadow:
        0 0 60px rgba(255, 0, 255, 0.7),
        0 0 120px rgba(255, 0, 255, 0.5),
        inset 0 0 80px rgba(0, 0, 0, 1),
        inset 0 0 120px rgba(255, 0, 255, 0.3);
    animation: singularity 4s ease-in-out infinite;
}

@keyframes singularity {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(0.95);
        filter: brightness(1.5);
    }
}

/* LV6: 功德无量Pro */
.muyu.lv6 .muyu-body {
    background: conic-gradient(
        from 0deg,
        rgba(60, 20, 100, 0.8),
        rgba(100, 40, 140, 0.8),
        rgba(60, 100, 140, 0.8),
        rgba(140, 100, 60, 0.8),
        rgba(60, 20, 100, 0.8)
    );
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 80px rgba(0, 255, 255, 0.8),
        0 0 160px rgba(255, 0, 255, 0.6),
        0 0 240px rgba(255, 255, 0, 0.4),
        inset 0 0 80px rgba(255, 255, 255, 0.2);
    animation: mobiusLoop 6s linear infinite, infiniteGlow 2s ease-in-out infinite;
}

@keyframes mobiusLoop {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

@keyframes infiniteGlow {
    0%, 100% {
        filter: brightness(1) hue-rotate(0deg);
    }
    50% {
        filter: brightness(1.3) hue-rotate(30deg);
    }
}

/* ========================================
   底部按钮 - 霓虹风格
   ======================================== */

.bottom-buttons {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 主按钮 - 高级玻璃态 */
.main-btn {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    border: 2px solid var(--neon-cyan);
    background: var(--bg-glass);
    color: var(--neon-cyan);
    cursor: pointer;
    border-radius: 15px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 10px var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.main-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.6),
        0 0 60px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    transform: translateY(-5px) scale(1.05);
    text-shadow: 0 0 20px var(--neon-cyan);
}

.main-btn:hover::before {
    left: 100%;
}

.main-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ========================================
   页面容器 - 模态框样式
   ======================================== */

.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow: hidden; /* 防止双滚动条 */
}

.page.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* 页面内容容器 - 可滚动 */
.page-content {
    background: var(--bg-glass);
    border: 2px solid var(--neon-cyan);
    border-radius: 25px;
    padding: 40px;
    max-width: 1200px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: var(--glass-blur);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 页面内容容器的滚动条样式 */
.page-content::-webkit-scrollbar {
    width: 10px;
}

.page-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.page-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.page-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 页面标题 */
.page-title {
    font-size: 36px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: var(--glow-intense);
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    box-shadow: var(--glow-cyan);
}

/* ========================================
   升级卡片系统 - 高级玻璃态
   ======================================== */

.muyu-upgrades,
.shop-items,
.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    margin-bottom: 40px;
}

/* 卡片基础样式 */
.upgrade-card,
.shop-card,
.achievement-card {
    background: var(--bg-glass);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    padding: 25px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
}

/* 卡片光效 */
.upgrade-card::before,
.shop-card::before,
.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
}

/* 卡片悬浮效果 */
.upgrade-card:hover,
.shop-card:hover,
.achievement-card:hover {
    border-color: var(--neon-cyan);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-8px) scale(1.02);
}

.upgrade-card:hover::before,
.shop-card:hover::before,
.achievement-card:hover::before {
    left: 100%;
}

/* 卡片状态 */
.upgrade-card.locked {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.5);
}

.upgrade-card.active {
    border-color: var(--neon-magenta);
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.4),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.shop-card.purchased {
    border-color: var(--neon-green);
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.4),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.achievement-card.locked {
    opacity: 0.5;
    border-color: rgba(100, 100, 100, 0.3);
}

.achievement-card.unlocked {
    border-color: var(--neon-green);
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    animation: achievementGlow 2s ease-in-out infinite;
}

@keyframes achievementGlow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(0, 255, 0, 0.5),
            inset 0 0 20px rgba(0, 255, 0, 0.1);
    }
    50% {
        box-shadow:
            0 0 50px rgba(0, 255, 0, 0.8),
            inset 0 0 30px rgba(0, 255, 0, 0.2);
    }
}

/* 卡片内容样式 */
.upgrade-name,
.shop-name {
    font-size: 24px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.upgrade-info,
.shop-bonus {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
    font-weight: 500;
}

.upgrade-cost,
.shop-cost {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-magenta);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.shop-slot {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* 成就卡片特殊样式 */
.achievement-icon {
    font-size: 50px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.achievement-name {
    font-size: 22px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.6);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.achievement-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   按钮系统 - 高级霓虹效果
   ======================================== */

/* 升级按钮 */
.upgrade-btn,
.shop-btn,
.back-btn,
.data-btn,
.close-btn,
.confirm-btn,
.cancel-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    border: 2px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.upgrade-btn:hover:not(:disabled),
.shop-btn:hover:not(:disabled),
.back-btn:hover,
.data-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 25px rgba(0, 255, 255, 0.5),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.upgrade-btn:disabled,
.shop-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.shop-btn.purchased {
    background: rgba(0, 255, 0, 0.15);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

/* 返回按钮 - 居中显示 */
.back-btn {
    min-width: 280px;
    padding: 16px 50px;
    margin-top: 30px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    border: 2px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center; /* 确保文字居中 */
    text-align: center;
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.back-btn:hover::before {
    left: 100%;
}

/* 危险按钮 */
.data-btn.danger {
    border-color: rgba(255, 50, 50, 0.5);
    color: #ff3232;
    background: rgba(255, 50, 50, 0.1);
}

.data-btn.danger:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: #ff3232;
    box-shadow: 0 0 25px rgba(255, 50, 50, 0.5);
}

/* 飞升按钮 - 特殊设计 */
.ascension-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    border: 2px solid var(--neon-magenta);
    background: rgba(255, 0, 255, 0.15);
    color: var(--neon-magenta);
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.ascension-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.ascension-btn:hover {
    background: rgba(255, 0, 255, 0.25);
    border-color: var(--neon-magenta);
    box-shadow:
        0 0 40px rgba(255, 0, 255, 0.6),
        inset 0 0 30px rgba(255, 0, 255, 0.2);
    transform: translateY(-3px);
}

.ascension-btn:hover::before {
    width: 300%;
    height: 300%;
}

/* 确认/取消按钮 */
.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.confirm-btn {
    border-color: var(--neon-green);
    background: rgba(0, 255, 0, 0.15);
    color: var(--neon-green);
}

.confirm-btn:hover {
    background: rgba(0, 255, 0, 0.25);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.cancel-btn {
    border-color: #ff3232;
    background: rgba(255, 50, 50, 0.15);
    color: #ff3232;
}

.cancel-btn:hover {
    background: rgba(255, 50, 50, 0.25);
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.5);
}

/* ========================================
   模态框 - 高级玻璃态
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all var(--transition-normal) ease;
    backdrop-filter: blur(10px);
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-glass);
    border: 2px solid var(--neon-cyan);
    border-radius: 25px;
    padding: 40px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: var(--glass-blur);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.modal-content h3 {
    font-size: 32px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
}

/* 设置选项 */
.settings-options {
    margin-bottom: 35px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
}

.setting-item:hover {
    transform: translateX(5px);
}

.setting-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--neon-cyan);
}

.setting-item span {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 数据管理 */
.data-management {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.data-management h4 {
    font-size: 22px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* 飞升区域 */
.ascension-section {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(255, 0, 255, 0.08);
    border: 2px solid rgba(255, 0, 255, 0.3);
    border-radius: 15px;
}

.ascension-section h4 {
    font-size: 22px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-magenta);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.ascension-info,
.ascension-bonus {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.ascension-info span,
.ascension-bonus span {
    color: var(--neon-cyan);
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

/* 导入文本框 */
#import-data {
    width: 100%;
    height: 180px;
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: all var(--transition-fast) ease;
}

#import-data:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ========================================
   特效系统
   ======================================== */

/* 赛博锦鲤 - 升级版 */
.koi-fish {
    position: fixed;
    font-size: 70px;
    cursor: pointer;
    z-index: 150;
    animation: koiSwim 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 255, 0, 1))
            drop-shadow(0 0 60px rgba(255, 255, 0, 0.8));
    transition: transform 0.3s ease;
}

.koi-fish.hidden {
    display: none;
}

.koi-fish:hover {
    transform: scale(1.3) rotate(10deg);
}

@keyframes koiSwim {
    0%, 100% {
        transform: translateY(0) rotate(-5deg) scale(1);
    }
    25% {
        transform: translateY(-30px) rotate(5deg) scale(1.1);
    }
    50% {
        transform: translateY(-20px) rotate(-3deg) scale(1.05);
    }
    75% {
        transform: translateY(-25px) rotate(3deg) scale(1.08);
    }
}

/* 飘字效果 - 升级版 */
.floating-text-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.floating-text {
    position: absolute;
    font-size: 24px;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    animation: floatUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    letter-spacing: 1px;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-60px) scale(1.3) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(1.5) rotate(-5deg);
    }
}

/* ========================================
   装备视觉效果 - 升级版
   ======================================== */

.equipment-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* 数据流袈裟 */
.robe-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(0, 255, 255, 0.03) 60px,
            rgba(0, 255, 255, 0.03) 61px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(255, 0, 255, 0.02) 60px,
            rgba(255, 0, 255, 0.02) 61px
        );
    animation: robeFlow 15s linear infinite;
    opacity: 0.6;
}

@keyframes robeFlow {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(61px) translateY(61px); }
}

/* 能量佛珠 */
.beads-effect {
    position: absolute;
    width: 350px;
    height: 350px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bead {
    position: absolute;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle,
        var(--neon-magenta) 0%,
        rgba(255, 0, 255, 0.3) 70%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow:
        0 0 15px var(--neon-magenta),
        0 0 30px var(--neon-magenta);
    animation: beadRotate 12s linear infinite;
}

@keyframes beadRotate {
    0% { transform: rotate(0deg) translateX(175px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(175px) rotate(-360deg); }
}

/* 悬浮磁力蒲团 */
.platform-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: platformFloat 4s ease-in-out infinite;
}

@keyframes platformFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 离子熏香 */
.incense-effect {
    position: absolute;
    width: 100%;
    height: 100%;
}

.incense-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle,
        var(--neon-magenta) 0%,
        transparent 70%
    );
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-magenta);
    animation: incenseRise 6s ease-out infinite;
}

@keyframes incenseRise {
    0% {
        transform: translateY(100vh) scale(1) rotate(0deg);
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* 业力符文 */
.rune-effect {
    position: absolute;
    font-size: 50px;
    color: rgba(255, 255, 0, 0.4);
    text-shadow:
        0 0 20px var(--neon-yellow),
        0 0 40px var(--neon-yellow);
    animation: runeGlow 4s ease-in-out infinite;
    filter: blur(1px);
}

@keyframes runeGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
    }
}

/* 莲花步履 */
.lotus-effect {
    position: absolute;
    font-size: 35px;
    animation: lotusFade 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    filter: drop-shadow(0 0 15px var(--neon-cyan));
}

@keyframes lotusFade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.3) rotate(15deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.8) rotate(-10deg);
    }
}

/* 禅定引擎 */
.engine-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 2px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.8);
}

.engine-bar {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--neon-cyan) 0%,
        var(--neon-magenta) 50%,
        var(--neon-yellow) 100%
    );
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 0 20px var(--neon-cyan),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.engine-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: engineShine 2s linear infinite;
}

@keyframes engineShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.engine-burst {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle,
        rgba(0, 255, 255, 0.9) 0%,
        rgba(255, 0, 255, 0.6) 30%,
        transparent 70%
    );
    animation: engineBurst 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    filter: blur(10px);
}

@keyframes engineBurst {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(4);
        opacity: 0;
    }
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
    .top-bar {
        padding: 15px 25px;
    }

    .merit-counter {
        font-size: 22px;
    }

    .merit-value {
        font-size: 26px;
        min-width: 200px;
    }

    .muyu {
        width: 240px;
        height: 240px;
    }

    .muyu-body {
        width: 200px;
        height: 200px;
        font-size: 80px;
    }

    .muyu-glow {
        width: 240px;
        height: 240px;
    }

    .page {
        padding: 15px;
    }

    .page-content {
        padding: 30px;
        max-height: 90vh;
    }

    .page-title {
        font-size: 32px;
        margin-bottom: 25px;
    }

    .muyu-upgrades,
    .shop-items,
    .achievements-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 12px 20px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .merit-counter {
        font-size: 18px;
        width: 100%;
        justify-content: center;
    }

    .merit-value {
        font-size: 22px;
        min-width: 180px;
    }

    .top-buttons {
        width: 100%;
        justify-content: center;
    }

    .icon-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .muyu {
        width: 200px;
        height: 200px;
    }

    .muyu-body {
        width: 170px;
        height: 170px;
        font-size: 65px;
    }

    .muyu-glow {
        width: 200px;
        height: 200px;
    }

    .muyu-level {
        font-size: 20px;
    }

    .merit-limit {
        font-size: 14px;
    }

    .main-btn {
        padding: 14px 35px;
        font-size: 18px;
    }

    .page-content {
        padding: 25px;
        max-height: 90vh;
    }

    .page-title{
        font-size: 28px;
        margin-bottom: 20px;
    }

    .muyu-upgrades,
    .shop-items,
    .achievements-list {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .upgrade-card,
    .shop-card,
    .achievement-card {
        padding: 20px;
    }

    .upgrade-name,
    .shop-name {
        font-size: 20px;
    }

    .back-btn {
        min-width: 240px;
        padding: 14px 40px;
        font-size: 16px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h3 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .merit-value {
        font-size: 18px;
        min-width: 150px;
    }

    .bottom-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .main-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ========================================
   性能优化
   ======================================== */

/* 减少重绘和回流 */
.upgrade-card,
.shop-card,
.achievement-card,
.icon-btn,
.main-btn {
    will-change: transform, box-shadow;
}

/* 硬件加速 */
.muyu-body,
.muyu-glow,
.particle,
.koi-fish {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 打印优化 */
@media print {
    #background-effects,
    .equipment-effects,
    .floating-text-container {
        display: none;
    }
}
