/* 赛博木鱼：功德无量Pro - 主样式 */

/* ==================== 基础重置与变量 ==================== */
:root {
    --bg-primary: #0a0a1e;
    --bg-secondary: #111133;
    --bg-card: #1a1a3e;
    --text-primary: #e0e0ff;
    --text-secondary: rgba(224, 224, 255, 0.6);
    --cyan: #00ffff;
    --magenta: #ff00ff;
    --gold: #ffcc00;
    --danger: #ff4444;
    --success: #44ff44;
    --border-color: rgba(0, 255, 255, 0.2);
    --font-main: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --font-mono: 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==================== 背景效果 ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,255,255,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255,0,255,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(255,204,0,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 数字雨背景 */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,255,255,0.015) 2px,
        rgba(0,255,255,0.015) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* ==================== 布局 ==================== */
#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ==================== 顶部资源栏 ==================== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(10, 10, 30, 0.9);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.resources {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.resource-item.merit { color: var(--cyan); }
.resource-item.karma { color: #ff9900; }
.resource-item.insight { color: var(--gold); }

.resource-value {
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 14px;
}

.top-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.icon-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--cyan); background: rgba(0,255,255,0.1); }

.badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 功德进度条 */
.merit-bar-container {
    height: 3px;
    background: rgba(0,255,255,0.1);
    margin: 0 16px;
}

.merit-bar-fill {
    height: 100%;
    background: var(--cyan);
    transition: width 0.3s;
}

/* 日期栏 */
.date-bar {
    text-align: center;
    padding: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    background: rgba(10,10,30,0.5);
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.game-page {
    display: none;
    padding: 16px;
    min-height: 100%;
}
.game-page.active { display: block; animation: fadeIn 0.2s ease; }

/* ==================== 主页 ==================== */
#page-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 20px;
}

.muyu-container {
    position: relative;
    margin: 20px 0;
}

#muyu {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0,255,255,0.3), 0 0 40px rgba(0,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s, box-shadow 0.3s;
    position: relative;
    z-index: 2;
}

#muyu:hover {
    box-shadow: 0 0 30px rgba(0,255,255,0.5), 0 0 60px rgba(0,255,255,0.2);
}

#muyu.muyu-clicked { transform: scale(0.92); }
#muyu.auto-pulse {
    animation: autoPulse 0.2s ease;
}
@keyframes autoPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(0,255,255,0.3); }
    50% { transform: scale(1.03); box-shadow: 0 0 35px rgba(68,136,255,0.5); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(0,255,255,0.3); }
}
#muyu.shape-square { border-radius: 12px; }

/* 连击条 */
.combo-container {
    width: 200px;
    text-align: center;
    margin-top: 10px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.combo-bar-bg {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

#combo-bar {
    height: 100%;
    width: 0%;
    background: var(--cyan);
    border-radius: 3px;
    transition: width 0.15s, background-color 0.3s;
}

.combo-info {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 12px;
}

#combo-number { font-family: var(--font-mono); font-weight: bold; color: var(--cyan); }
#combo-title { color: var(--text-secondary); }
#combo-multiplier { color: var(--gold); font-family: var(--font-mono); font-size: 11px; }

/* 自动修行信息 */
.auto-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

/* 飘字容器 */
#floating-texts {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 100;
}

.floating-text {
    position: absolute;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 18px;
    animation: floatUp 1.5s ease-out forwards;
    pointer-events: none;
    text-shadow: 0 0 10px currentColor;
}
.float-merit { color: var(--cyan); }
.float-crit { color: var(--magenta); font-size: 24px; }
.float-event { color: var(--gold); }
.float-auto { color: #4488ff; font-size: 14px; }
.float-warning { color: var(--danger); font-size: 14px; }

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-80px); }
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
    display: flex;
    background: rgba(10,10,30,0.95);
    border-top: 1px solid var(--border-color);
    padding: 6px 8px;
    flex-shrink: 0;
}

.nav-btn {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.nav-btn:hover { color: var(--cyan); background: rgba(0,255,255,0.05); }
.nav-btn.active { color: var(--cyan); background: rgba(0,255,255,0.1); }
.nav-btn .nav-icon { font-size: 20px; }

/* ==================== 页面通用样式 ==================== */
.page-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0,255,255,0.3);
}

/* 卡片 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.card:hover { border-color: rgba(0,255,255,0.4); }

/* 按钮 */
.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(0,255,255,0.1));
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-primary:hover { background: rgba(0,255,255,0.3); }
.btn-primary.disabled { opacity: 0.4; cursor: not-allowed; }

.btn-sm {
    padding: 5px 12px;
    background: rgba(0,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--cyan);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.btn-sm:hover { background: rgba(0,255,255,0.2); }
.btn-sm.danger { border-color: var(--danger); color: var(--danger); }
.btn-sm.danger:hover { background: rgba(255,68,68,0.2); }

.btn-setting {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}
.btn-setting:hover { border-color: var(--cyan); background: rgba(0,255,255,0.05); }
.btn-setting.danger { border-color: var(--danger); }
.btn-setting.danger:hover { background: rgba(255,68,68,0.1); }

/* ==================== 木鱼工坊 ==================== */
.muyu-level-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.muyu-level-card.current { border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,255,255,0.2); }
.muyu-level-card.past { opacity: 0.6; }
.muyu-level-card.locked { opacity: 0.3; }

.muyu-level-icon { font-size: 36px; }
.muyu-level-info { flex: 1; }
.muyu-level-name { font-weight: bold; font-size: 15px; }
.muyu-level-limit { font-size: 12px; color: var(--text-secondary); }
.muyu-level-feature { font-size: 11px; color: var(--gold); }
.muyu-level-cost { font-size: 12px; color: var(--text-secondary); margin: 4px 0; }
.muyu-level-status { font-size: 12px; }

.btn-upgrade {
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(0,255,255,0.1));
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.btn-upgrade:hover { background: rgba(0,255,255,0.3); }
.btn-upgrade.disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== 技能树 ==================== */
.skill-paths {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-path {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
}

.path-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--path-color, var(--cyan));
}

.path-nodes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.skill-node {
    padding: 8px 6px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
    font-size: 10px;
}
.node-locked { background: rgba(50,50,80,0.5); border: 1px dashed rgba(100,100,150,0.3); opacity: 0.5; }
.node-available { background: var(--bg-card); border: 1px solid var(--cyan); animation: nodePulse 2s infinite; }
.node-unlocked { background: rgba(0,255,255,0.15); border: 1px solid var(--cyan); box-shadow: 0 0 8px rgba(0,255,255,0.3); }

.node-id { font-weight: bold; font-size: 13px; }
.node-name { font-size: 11px; margin-top: 2px; }
.node-desc { font-size: 9px; color: var(--text-secondary); margin-top: 2px; }
.node-cost { font-size: 9px; color: var(--gold); margin-top: 2px; }

.node-connector {
    width: 20px;
    height: 2px;
    background: rgba(100,100,150,0.3);
    transition: background 0.3s;
}
.node-connector.active { background: var(--cyan); }

@keyframes nodePulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0,255,255,0.2); }
    50% { box-shadow: 0 0 15px rgba(0,255,255,0.5); }
}

.synergy-section {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.synergy-item {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.synergy-item.active { color: var(--gold); }
.syn-requires { font-size: 11px; color: var(--text-secondary); }

/* ==================== 成就页面 ==================== */
.achievements-header {
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.achievement-filter, .skin-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-btn {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 14px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--cyan); }
.filter-btn.active { background: rgba(0,255,255,0.1); border-color: var(--cyan); color: var(--cyan); }

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ach-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
}
.ach-card.unlocked { border-color: rgba(0,255,255,0.4); background: rgba(0,255,255,0.05); }

.ach-icon { font-size: 28px; margin-bottom: 4px; }
.ach-name { font-size: 12px; font-weight: bold; }
.ach-desc { font-size: 10px; color: #8899aa; margin: 2px 0; line-height: 1.3; }
.ach-reward { font-size: 10px; color: #ff9900; }
.ach-status { font-size: 10px; color: var(--text-secondary); }
.ach-cond { font-size: 10px; color: var(--text-secondary); }

/* ==================== 皮肤 ==================== */
.skins-header {
    text-align: center;
    margin-bottom: 12px;
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.skin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: all 0.2s;
}
.skin-card.owned { border-color: rgba(0,255,255,0.4); }
.skin-card.rarity-common { border-color: #888; }
.skin-card.rarity-rare { border-color: #4488ff; }
.skin-card.rarity-epic { border-color: #aa44ff; }
.skin-card.rarity-mythic { border-color: #ffaa00; box-shadow: 0 0 10px rgba(255,170,0,0.2); }

.skin-preview {
    width: 50px; height: 50px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.skin-name { font-size: 11px; font-weight: bold; }
.skin-rarity { font-size: 10px; }
.skin-status { font-size: 10px; color: var(--text-secondary); }
.skin-cost { font-size: 10px; color: #ff9900; }

.skin-btn {
    padding: 3px 10px;
    background: rgba(0,255,255,0.1);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-top: 4px;
}
.skin-btn.buy { border-color: #ff9900; color: #ff9900; background: rgba(255,153,0,0.1); }
.skin-btn.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ==================== 研究实验室 ==================== */
.research-header {
    text-align: center;
    margin-bottom: 12px;
}

.research-section {
    margin-bottom: 16px;
}

.research-active {
    background: var(--bg-card);
    border: 1px solid var(--cyan);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}

.research-bar {
    height: 8px;
    background: rgba(0,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 6px 0;
}
.research-bar-fill { height: 100%; background: var(--cyan); transition: width 0.5s; }

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 6px;
}
.research-card.completed { opacity: 0.5; border-color: var(--success); }

.research-name { font-weight: bold; font-size: 14px; }
.research-desc { font-size: 12px; color: var(--text-secondary); }
.research-cost { font-size: 11px; color: var(--gold); margin: 4px 0; }
.research-info { font-size: 11px; color: var(--text-secondary); }
.research-actions { display: flex; gap: 6px; margin-top: 6px; }
.research-filter { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }

.locked-notice {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* ==================== 统计面板 ==================== */
.stats-game-info {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,255,255,0.15);
}
.stats-game-name {
    font-size: 22px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 4px;
}
.stats-game-version {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}
.stats-game-dev {
    font-size: 13px;
    color: #aaa;
}
.stats-game-dev a {
    color: #4488ff;
    text-decoration: none;
}
.stats-game-dev a:hover {
    color: #00ffff;
    text-decoration: underline;
}

.stats-header {
    text-align: center;
    margin-bottom: 12px;
}

.efficiency-grade {
    font-size: 20px;
    margin-bottom: 8px;
}
.grade-Sp, .grade-S { color: var(--gold); }
.grade-A { color: var(--cyan); }
.grade-B { color: var(--success); }
.grade-C { color: var(--text-secondary); }
.grade-D { color: var(--danger); }

.stats-section {
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}
.stats-section h3 { font-size: 14px; color: var(--cyan); margin-bottom: 8px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 16px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
}
.stat-label { color: var(--text-secondary); }
.stat-value { font-family: var(--font-mono); color: var(--text-primary); }

.source-chart { display: flex; flex-direction: column; gap: 4px; }
.source-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.source-color { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.source-name { width: 30px; }
.source-bar-bg { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; }
.source-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.source-pct { width: 40px; text-align: right; color: var(--text-secondary); font-family: var(--font-mono); }

canvas { max-width: 100%; border-radius: 8px; }

/* ==================== 飞升 ==================== */
.ascension-info {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: 10px;
}

.next-ascension {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    margin-bottom: 12px;
}

.btn-ascension {
    padding: 10px 32px;
    background: linear-gradient(135deg, rgba(255,204,0,0.3), rgba(255,170,0,0.1));
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.2s;
}
.btn-ascension:hover { background: rgba(255,204,0,0.3); }
.btn-ascension.disabled { opacity: 0.4; cursor: not-allowed; }

.asc-history { margin-top: 12px; }
.asc-record {
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
}

.asc-condition { font-size: 13px; color: var(--text-secondary); margin: 6px 0; }
.asc-reward { font-size: 14px; color: var(--gold); }
.asc-unlock { font-size: 13px; color: var(--cyan); margin: 4px 0; }

/* ==================== 每日任务面板 ==================== */
.daily-panel {
    position: fixed;
    top: 0; right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 50;
    transition: right 0.3s;
    padding: 16px;
    overflow-y: auto;
}
.daily-panel.show { right: 0; }

.daily-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.daily-streak { font-size: 16px; font-weight: bold; }
.daily-streak-multi { font-size: 12px; color: var(--gold); }

.quest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.quest-card.completed { border-color: var(--success); background: rgba(68,255,68,0.05); }

.quest-status { font-size: 20px; flex-shrink: 0; }
.quest-info { flex: 1; }
.quest-title { font-size: 13px; font-weight: bold; }
.quest-progress { font-size: 11px; color: var(--text-secondary); }

.quest-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin: 4px 0;
    overflow: hidden;
}
.quest-bar-fill { height: 100%; background: var(--cyan); transition: width 0.3s; }

.quest-reward { font-size: 10px; color: var(--gold); }
.quest-claim-btn {
    padding: 6px 12px;
    background: rgba(0,255,255,0.2);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    animation: nodePulse 2s infinite;
}

.daily-bonus {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}
.daily-bonus.completed { color: var(--success); }

/* ==================== 设置页面 ==================== */
.settings-section {
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}
.settings-section h3 { font-size: 14px; color: var(--cyan); margin-bottom: 10px; }

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.setting-info {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 0;
}

/* Toggle开关 */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 2px; bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--cyan); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 签语 */
.fortune-date { font-size: 14px; color: var(--gold); margin-bottom: 12px; }
.fortune-text { font-size: 18px; line-height: 1.6; margin-bottom: 12px; }
.fortune-luck { font-size: 24px; color: var(--gold); margin: 12px 0; text-shadow: 0 0 10px rgba(255,204,0,0.5); }
.fortune-interp { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.fortune-detail { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.fortune-color { font-size: 12px; margin-bottom: 12px; }

.btn-modal {
    padding: 10px 32px;
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(0,255,255,0.1));
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}
.btn-modal:hover { background: rgba(0,255,255,0.3); }

/* 欢迎 */
.modal-welcome h3 { font-size: 20px; color: var(--cyan); margin-bottom: 10px; }
.welcome-merit { font-size: 24px; color: var(--cyan); margin: 12px 0; font-family: var(--font-mono); }
.welcome-efficiency { font-size: 13px; color: var(--text-secondary); }

.modal-summary div { font-size: 13px; padding: 3px 0; }
.summary-ok { color: var(--success); margin-top: 8px; }

/* ==================== 事件系统 ==================== */
.event-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    text-align: center;
    display: none;
    font-size: 13px;
    animation: slideDown 0.3s ease;
}
.event-banner.show { display: flex; justify-content: center; gap: 12px; align-items: center; }
.event-banner.rarity-传说 { border-color: var(--gold); background: rgba(255,204,0,0.1); }
.event-banner.rarity-史诗 { border-color: #aa44ff; background: rgba(170,68,255,0.1); }
.event-banner.rarity-稀有 { border-color: #4488ff; background: rgba(68,136,255,0.1); }
.event-name { font-weight: bold; }
.event-timer { color: var(--text-secondary); }

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

#event-layer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 90;
}
#event-layer > * { pointer-events: auto; }

/* 锦鲤 */
.koi-fish {
    position: absolute;
    font-size: 80px;
    cursor: pointer;
    animation: koiFloat 1s ease-in-out infinite alternate;
    z-index: 91;
    filter: drop-shadow(0 0 20px rgba(255,200,0,0.6));
    transition: transform 0.15s;
    padding: 10px;
}
.koi-fish:hover { transform: scale(1.1); }
.koi-fish:active { transform: scale(0.9); }
@keyframes koiFloat {
    from { transform: translateY(-5px); }
    to { transform: translateY(5px); }
}

/* 怪物球 */
.mob-orb {
    position: absolute;
    font-size: 55px;
    cursor: pointer;
    transition: left 5s linear, top 5s linear;
    z-index: 91;
    filter: drop-shadow(0 0 12px rgba(255,0,0,0.5));
    padding: 5px;
}
.mob-orb:hover { filter: drop-shadow(0 0 20px rgba(255,0,0,0.8)); }
.mob-death { animation: mobDie 0.3s ease forwards; }
@keyframes mobDie {
    to { transform: scale(0); opacity: 0; }
}

/* 功德球 */
.merit-orb {
    position: absolute;
    font-size: 60px;
    color: var(--cyan);
    cursor: pointer;
    animation: meritFall linear forwards;
    text-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0,255,255,0.3);
    top: -70px;
    padding: 15px;
    min-width: 90px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: transform 0.1s;
}
.merit-orb:hover { transform: scale(1.3); text-shadow: 0 0 25px var(--cyan); }
@keyframes meritFall {
    to { top: 110vh; }
}

/* 顿悟 */
.enlightenment-flash {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: white;
    z-index: 300;
    animation: flashOut 0.5s ease forwards;
}
@keyframes flashOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.enlightenment-symbol {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: bold;
    color: var(--gold);
    cursor: pointer;
    z-index: 91;
    text-shadow: 0 0 30px rgba(255,204,0,0.8);
    animation: symbolPulse 1s ease-in-out infinite;
}
@keyframes symbolPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}
.enlightenment-symbol.collected { animation: symbolCollect 0.3s ease forwards; }
@keyframes symbolCollect {
    to { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* 宝箱 */
.treasure-chest-wrapper {
    position: absolute;
    left: 50%; top: 35%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 91;
}
.chest-info {
    margin-bottom: 12px;
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
}
.chest-clicks { font-size: 20px; font-weight: bold; color: #00ffff; }
.chest-tier { font-size: 12px; color: #888; }
.chest-timer { font-size: 16px; color: #ffcc00; font-family: var(--font-mono); }
.treasure-chest {
    font-size: 90px;
    cursor: pointer;
    filter: drop-shadow(0 0 25px rgba(255,200,0,0.6));
    padding: 10px;
    user-select: none;
    display: inline-block;
}
.treasure-chest.shake { animation: chestShake 0.1s ease; }
@keyframes chestShake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* ==================== 赛博菩萨模式 ==================== */
body.bodhisattva-mode::before {
    background: radial-gradient(ellipse at 50% 30%, rgba(255,204,0,0.15) 0%, transparent 60%) !important;
}

/* ==================== 像素模式 ==================== */
body.pixel-mode {
    image-rendering: pixelated;
    background: #0a0a0a !important;
}
body.pixel-mode #app {
    max-width: 100%;
}
body.pixel-mode .top-bar {
    background: #111 !important;
    border-bottom: 3px solid #00ff00 !important;
}
body.pixel-mode .resource-value {
    color: #00ff00 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode .bottom-nav {
    background: #111 !important;
    border-top: 3px solid #00ff00 !important;
}
body.pixel-mode .nav-btn {
    color: #00ff00 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode .nav-btn.active {
    background: rgba(0,255,0,0.15) !important;
}
body.pixel-mode #muyu {
    border-radius: 0 !important;
    border: 4px solid #00ff00 !important;
    box-shadow: none !important;
    background: #000 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode .page-title {
    color: #00ff00 !important;
    font-family: var(--font-mono) !important;
    text-shadow: none !important;
}
body.pixel-mode .date-bar {
    color: #00ff00 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode .combo-info,
body.pixel-mode .auto-info {
    color: #00ff00 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode .merit-bar-fill {
    background: #00ff00 !important;
}
body.pixel-mode .event-banner {
    border: 2px solid #00ff00 !important;
    background: #111 !important;
    font-family: var(--font-mono) !important;
}
body.pixel-mode::before {
    background: none !important;
}
body.pixel-mode::after {
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,255,0,0.03) 2px,
        rgba(0,255,0,0.03) 4px
    ) !important;
}

/* ==================== 飞升动画 ==================== */
.ascension-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: white;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ascensionFade 7s ease forwards;
}
@keyframes ascensionFade {
    0% { background: rgba(255,255,255,0); }
    30% { background: rgba(255,255,255,1); }
    70% { background: rgba(255,255,255,1); }
    100% { background: rgba(255,255,255,0); }
}

.ascension-content {
    text-align: center;
    color: #000;
    font-size: 20px;
}
.ascension-phase {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
    animation: ascTextIn 1s ease;
}
@keyframes ascTextIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==================== Toast通知 ==================== */
#toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.toast {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-color: var(--success); color: var(--success); }
.toast-warning { border-color: var(--danger); color: var(--danger); }
.toast-achievement { border-color: var(--gold); color: var(--gold); }
.toast-milestone { border-color: var(--magenta); color: var(--magenta); }
.toast-error { border-color: var(--danger); color: var(--danger); }
.toast-info { border-color: var(--cyan); color: var(--cyan); }

/* ==================== 新手引导 ==================== */
.tutorial-highlight {
    position: relative;
    z-index: 250;
    box-shadow: 0 0 0 4px rgba(0,255,255,0.5), 0 0 30px rgba(0,255,255,0.3);
    border-radius: 10px;
}

.tutorial-tip {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--cyan);
    border-radius: 12px;
    padding: 16px 24px;
    z-index: 251;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.tutorial-text { font-size: 14px; margin-bottom: 10px; line-height: 1.5; }

.tutorial-next {
    padding: 6px 20px;
    background: rgba(0,255,255,0.2);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

/* ==================== 签语历史 ==================== */
.fortune-history {
    margin-top: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}
.fortune-history h3 { font-size: 14px; color: var(--cyan); margin-bottom: 8px; }
.fortune-record {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fortune-record .fortune-date { color: var(--text-secondary); min-width: 80px; }
.fortune-record .fortune-luck { color: var(--gold); min-width: 30px; }

.empty-text { color: var(--text-secondary); font-size: 12px; text-align: center; padding: 10px; }

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.anim-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.anim-spin { animation: spin 4s linear infinite; }
@keyframes spin {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

.anim-float { animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.anim-shake { animation: shake 0.5s ease-in-out infinite; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.anim-breath { animation: breath 2s ease-in-out infinite; }
@keyframes breath {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.anim-hue { animation: hueShift 3s linear infinite; }
@keyframes hueShift {
    from { filter: hue-rotate(0); }
    to { filter: hue-rotate(360deg); }
}

.anim-flip { animation: flipAnim 3s ease-in-out infinite; }
@keyframes flipAnim {
    0%, 100% { transform: rotateY(0); }
    50% { transform: rotateY(180deg); }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 2px; }

/* ==================== 事件通知弹窗 ==================== */
.event-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 95;
    display: none;
    align-items: center;
    justify-content: center;
}
.event-popup-overlay.show { display: flex; }

.event-popup-box {
    width: 85%;
    max-width: 340px;
    background: var(--bg-secondary);
    border: 2px solid var(--cyan);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    animation: modalIn 0.3s ease;
    box-shadow: 0 0 30px rgba(0,255,255,0.3);
}
.event-popup-overlay.rarity-传说 .event-popup-box { border-color: var(--gold); box-shadow: 0 0 40px rgba(255,204,0,0.5); }
.event-popup-overlay.rarity-史诗 .event-popup-box { border-color: #aa44ff; box-shadow: 0 0 40px rgba(170,68,255,0.5); }
.event-popup-overlay.rarity-稀有 .event-popup-box { border-color: #4488ff; box-shadow: 0 0 40px rgba(68,136,255,0.5); }

.event-popup-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(255,204,0,0.4);
}

.event-popup-rarity {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.event-popup-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.event-popup-countdown {
    font-size: 28px;
    font-weight: bold;
    color: var(--cyan);
    font-family: var(--font-mono);
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
    animation: countPulse 1s ease-in-out infinite;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.event-start-btn {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
}

/* C5 因果操控跳过按钮 */
.event-skip-btn {
    margin-top: 8px;
    padding: 6px 24px;
    background: rgba(255,80,80,0.2);
    border: 1px solid rgba(255,80,80,0.5);
    color: #ff6666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.event-skip-btn:hover {
    background: rgba(255,80,80,0.4);
}

/* C1/C3 事件信息样式 */
.event-cooldown {
    color: #888;
    font-size: 11px;
}
.event-preview {
    color: var(--gold, #ffcc00);
    font-size: 11px;
}

/* ==================== 设置面板 ==================== */
.settings-panel {
    position: fixed;
    top: 0; right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 50;
    transition: right 0.3s;
    padding: 16px;
    overflow-y: auto;
}
.settings-panel.show { right: 0; }

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    #app { max-width: 100%; }
    .achievements-grid { grid-template-columns: repeat(2, 1fr); }
    .skins-grid { grid-template-columns: repeat(2, 1fr); }
}
