/* ==========================================
   易经卜卦 - 全新视觉设计
   支持多主题、动态效果、视觉冲击力
   ========================================== */

/* ========== 主题变量 ========== */
:root {
    /* 通用变量 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --blur-amount: 20px;
    --card-radius: 24px;
    --btn-radius: 50px;
}

/* 紫金主题 - 默认 */
[data-theme="purple-gold"] {
    --primary: #b48eff;
    --primary-dark: #8b5cf6;
    --primary-light: #d4b8ff;
    --accent: #ffd700;
    --accent-light: #ffe566;
    --accent-glow: rgba(255, 215, 0, 0.6);
    --bg-start: #0d0221;
    --bg-mid: #1a0a3e;
    --bg-end: #0f0326;
    --surface: rgba(180, 142, 255, 0.08);
    --surface-hover: rgba(180, 142, 255, 0.15);
    --border: rgba(180, 142, 255, 0.25);
    --border-glow: rgba(180, 142, 255, 0.5);
    --text: #f5f0ff;
    --text-muted: #a89cc8;
    --gradient-primary: linear-gradient(135deg, #b48eff 0%, #8b5cf6 50%, #6d28d9 100%);
    --gradient-accent: linear-gradient(135deg, #ffd700 0%, #ffb700 50%, #ff9500 100%);
    --particle-color: rgba(180, 142, 255, 0.4);
    --ring-color: rgba(180, 142, 255, 0.1);
}

/* 青玄主题 */
[data-theme="cyan-dark"] {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --primary-light: #66e5ff;
    --accent: #00ff88;
    --accent-light: #66ffb3;
    --accent-glow: rgba(0, 255, 136, 0.6);
    --bg-start: #020a12;
    --bg-mid: #051525;
    --bg-end: #030d18;
    --surface: rgba(0, 212, 255, 0.08);
    --surface-hover: rgba(0, 212, 255, 0.15);
    --border: rgba(0, 212, 255, 0.25);
    --border-glow: rgba(0, 212, 255, 0.5);
    --text: #e0f7ff;
    --text-muted: #7eb8c9;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #006699 100%);
    --gradient-accent: linear-gradient(135deg, #00ff88 0%, #00cc6a 50%, #009950 100%);
    --particle-color: rgba(0, 212, 255, 0.4);
    --ring-color: rgba(0, 212, 255, 0.1);
}

/* 朱砂主题 */
[data-theme="vermillion"] {
    --primary: #ff4757;
    --primary-dark: #cc2936;
    --primary-light: #ff6b7a;
    --accent: #ffa502;
    --accent-light: #ffbe4d;
    --accent-glow: rgba(255, 165, 2, 0.6);
    --bg-start: #150508;
    --bg-mid: #2a0a10;
    --bg-end: #18060a;
    --surface: rgba(255, 71, 87, 0.08);
    --surface-hover: rgba(255, 71, 87, 0.15);
    --border: rgba(255, 71, 87, 0.25);
    --border-glow: rgba(255, 71, 87, 0.5);
    --text: #fff0f2;
    --text-muted: #c9a0a6;
    --gradient-primary: linear-gradient(135deg, #ff4757 0%, #cc2936 50%, #991f28 100%);
    --gradient-accent: linear-gradient(135deg, #ffa502 0%, #ff8c00 50%, #e67300 100%);
    --particle-color: rgba(255, 71, 87, 0.4);
    --ring-color: rgba(255, 71, 87, 0.1);
}

/* 墨翠主题 */
[data-theme="ink-green"] {
    --primary: #2ed573;
    --primary-dark: #26ab5e;
    --primary-light: #5ee094;
    --accent: #7bed9f;
    --accent-light: #a5f3bf;
    --accent-glow: rgba(123, 237, 159, 0.6);
    --bg-start: #020d06;
    --bg-mid: #051a0d;
    --bg-end: #030f07;
    --surface: rgba(46, 213, 115, 0.08);
    --surface-hover: rgba(46, 213, 115, 0.15);
    --border: rgba(46, 213, 115, 0.25);
    --border-glow: rgba(46, 213, 115, 0.5);
    --text: #e8fff0;
    --text-muted: #8fc9a3;
    --gradient-primary: linear-gradient(135deg, #2ed573 0%, #26ab5e 50%, #1d8047 100%);
    --gradient-accent: linear-gradient(135deg, #7bed9f 0%, #5ee094 50%, #40d380 100%);
    --particle-color: rgba(46, 213, 115, 0.4);
    --ring-color: rgba(46, 213, 115, 0.1);
}

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    background: var(--bg-start);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* ========== 动态背景 ========== */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, var(--bg-mid) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, var(--bg-mid) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, var(--bg-end) 0%, var(--bg-start) 100%);
    animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* 粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--particle-color);
    border-radius: 50%;
    animation: floatParticle 15s infinite linear;
    opacity: 0;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* 能量环 */
.energy-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ring {
    position: absolute;
    border: 1px solid var(--ring-color);
    border-radius: 50%;
    animation: expandRing 8s ease-out infinite;
}

.ring-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.ring-2 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    animation-delay: 2.5s;
}

.ring-3 {
    width: 600px;
    height: 600px;
    top: -300px;
    left: -300px;
    animation-delay: 5s;
}

@keyframes expandRing {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 浮动八卦符号 */
.floating-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-symbol {
    position: absolute;
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.08;
    animation: floatSymbol 25s ease-in-out infinite;
}

.s1 { top: 8%; left: 5%; animation-delay: 0s; }
.s2 { top: 18%; left: 85%; animation-delay: 3s; }
.s3 { top: 35%; left: 3%; animation-delay: 6s; }
.s4 { top: 55%; left: 92%; animation-delay: 9s; }
.s5 { top: 70%; left: 8%; animation-delay: 12s; }
.s6 { top: 82%; left: 88%; animation-delay: 15s; }
.s7 { top: 25%; left: 93%; animation-delay: 18s; }
.s8 { top: 45%; left: 2%; animation-delay: 21s; }

@keyframes floatSymbol {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.2;
    }
}

/* ========== 容器 ========== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* ========== 顶部导航栏 - 简洁版 ========== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 5px;
}

/* Logo */
.nav-logo {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.logo-symbol {
    font-size: 2.4rem;
    color: var(--accent);
    filter: drop-shadow(0 0 15px var(--accent-glow));
    animation: spinLogo 20s linear infinite;
}

@keyframes spinLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 导航操作区 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 主题切换包装器 */
.theme-wrapper {
    position: relative;
}

/* 图标按钮 - 统一样式 */
.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* 主题切换按钮指示器 */
.theme-toggle .theme-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* 主题面板 */
.theme-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    z-index: 100;
    display: flex;
    gap: 10px;
    animation: fadeSlide 0.25s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-dot:hover {
    transform: scale(1.15);
}

.theme-dot.active {
    border-color: #fff;
    box-shadow: 0 0 12px currentColor, 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.theme-dot.purple-gold {
    background: linear-gradient(135deg, #b48eff, #ffd700);
}

.theme-dot.cyan-dark {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
}

.theme-dot.vermillion {
    background: linear-gradient(135deg, #ff4757, #ffa502);
}

.theme-dot.ink-green {
    background: linear-gradient(135deg, #2ed573, #1a1a2e);
}

/* 用户区域 */
.user-area {
    position: relative;
    display: flex;
    align-items: center;
}

/* 用户信息简化 */
.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-info .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.user-info:hover .user-avatar,
.user-info .user-avatar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff4757;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePulse 2s ease-in-out infinite;
}

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


/* ========== 头部 ========== */
.header {
    text-align: center;
    padding: 10px 0 8px;
    margin-bottom: 8px;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 八卦动态效果 */
.bagua-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bagua-outer {
    position: relative;
    z-index: 2;
}

.bagua-symbol {
    font-size: 3rem;
    color: var(--accent);
    display: block;
    animation: baguaRotate 20s linear infinite;
    filter: drop-shadow(0 0 30px var(--accent-glow));
}

@keyframes baguaRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bagua-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: baguaPulse 3s ease-out infinite;
    opacity: 0;
}

.bagua-pulse.delay {
    animation-delay: 1.5s;
}

@keyframes baguaPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.title {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', cursive;
    font-size: 2rem;
    color: var(--accent);
    text-shadow: 
        0 0 20px var(--accent-glow),
        0 0 40px var(--accent-glow),
        0 0 60px rgba(255, 215, 0, 0.3);
    letter-spacing: 12px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 
            0 0 20px var(--accent-glow),
            0 0 40px var(--accent-glow);
    }
    to {
        text-shadow: 
            0 0 30px var(--accent-glow),
            0 0 60px var(--accent-glow),
            0 0 80px var(--accent-glow);
    }
}

.subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.subtitle-char {
    display: inline-block;
    animation: charFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.subtitle-char:nth-child(1) { --i: 1; }
.subtitle-char:nth-child(2) { --i: 2; }
.subtitle-char:nth-child(3) { --i: 3; }
.subtitle-char:nth-child(4) { --i: 4; }
.subtitle-char:nth-child(6) { --i: 6; }
.subtitle-char:nth-child(7) { --i: 7; }
.subtitle-char:nth-child(8) { --i: 8; }
.subtitle-char:nth-child(9) { --i: 9; }

.subtitle-dot {
    margin: 0 8px;
    color: var(--accent);
    animation: dotPulse 2s ease-in-out infinite;
}

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

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

/* ========== 卡片/区块 ========== */
.section {
    background: var(--surface);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: borderGlow 3s linear infinite;
}

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

/* ========== 起卦区域 ========== */
.divination-section {
    padding: 20px 20px;
}

.instruction {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px 20px 14px;
    background: linear-gradient(160deg, var(--surface) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 18px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.instruction::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
}
.instruction-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}
.instruction-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 6px rgba(200, 150, 255, 0.4));
}
.instruction h2 {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-shadow: 0 0 15px var(--accent-glow);
}
.instruction-divider {
    width: 50px;
    height: 1px;
    margin: 0 auto 18px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}
.instruction-main {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 4px;
    line-height: 2;
    margin-bottom: 6px;
}
.instruction-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    opacity: 0.6;
    line-height: 1.8;
}

/* ========== 铜钱效果 ========== */
.coins-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
    perspective: 1000px;
}

.coin {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transform-style: preserve-3d;
}

.coin-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

.coin:hover .coin-glow {
    opacity: 0.6;
    animation: coinGlowPulse 1.5s ease-in-out infinite;
}

@keyframes coinGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.coin-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.coin.flipping .coin-inner {
    animation: coinFlip3D 0.6s ease-in-out;
}

@keyframes coinFlip3D {
    0% { transform: rotateY(0deg) rotateX(0deg) scale(1); }
    25% { transform: rotateY(180deg) rotateX(180deg) scale(1.1); }
    50% { transform: rotateY(360deg) rotateX(360deg) scale(1); }
    75% { transform: rotateY(540deg) rotateX(180deg) scale(1.1); }
    100% { transform: rotateY(720deg) rotateX(0deg) scale(1); }
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

/* 正面 - 阳 - 亮金色 */
.coin-front {
    background: linear-gradient(145deg, #ffe14d 0%, #ffd000 30%, #f5b800 70%, #e6a800 100%);
    border: 4px solid #d4a000;
    box-shadow: 
        0 6px 25px rgba(255, 208, 0, 0.6),
        inset 0 4px 25px rgba(255, 255, 255, 0.6),
        inset 0 -4px 15px rgba(200, 150, 0, 0.3);
}

/* 反面 - 阴 - 深褐黑色 */
.coin-back {
    background: linear-gradient(145deg, #4a3525 0%, #352518 30%, #251a10 70%, #1a120a 100%);
    border: 4px solid #2a1c12;
    transform: rotateY(180deg);
    box-shadow: 
        0 6px 20px rgba(26, 18, 10, 0.7),
        inset 0 4px 15px rgba(74, 53, 37, 0.5),
        inset 0 -4px 15px rgba(0, 0, 0, 0.5);
}

/* 铜钱文字 */
.coin-text {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.coin-front .coin-text {
    color: #6B3A10;
}

.coin-back .coin-text {
    color: #c9b896;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* 摇卦结果样式 */
.coin.result-yang .coin-front {
    background: linear-gradient(145deg, #fff066 0%, #ffe033 40%, #ffd000 100%);
    box-shadow: 
        0 0 30px rgba(255, 220, 0, 0.8),
        inset 0 4px 25px rgba(255, 255, 255, 0.7);
}

.coin.result-yin .coin-back {
    background: linear-gradient(145deg, #3a2818 0%, #2a1c10 50%, #1a100a 100%);
    box-shadow: 
        0 0 15px rgba(26, 16, 10, 0.6),
        inset 0 4px 15px rgba(58, 40, 24, 0.4);
}

.coin.result-yang {
    animation: yangGlow 2s ease-in-out infinite;
}

.coin.result-yin {
    animation: yinGlow 2s ease-in-out infinite;
}

@keyframes yangGlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 220, 0, 0.7)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 220, 0, 1)); }
}

@keyframes yinGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(60, 40, 25, 0.5)); }
    50% { filter: drop-shadow(0 0 15px rgba(60, 40, 25, 0.7)); }
}

/* ========== 摇卦按钮 ========== */
.shake-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin: 16px auto;
    padding: 14px 36px;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--btn-radius);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.shake-btn:hover .btn-glow {
    left: 100%;
}

.shake-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 40px var(--accent-glow),
        0 0 60px var(--accent-glow);
}

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

.shake-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.btn-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a1a2e;
    font-family: inherit;
    letter-spacing: 3px;
}

.btn-icon {
    font-size: 1.4rem;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.2));
}

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

.shake-btn.shaking {
    animation: shakeBtn 0.5s ease-in-out;
}

@keyframes shakeBtn {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px) rotate(-3deg); }
    40% { transform: translateX(8px) rotate(3deg); }
    60% { transform: translateX(-8px) rotate(-3deg); }
    80% { transform: translateX(8px) rotate(3deg); }
}

/* ========== 进度显示 ========== */
.progress-display {
    text-align: center;
    margin: 25px 0;
}

.yao-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.yao-progress .label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.yao-dots {
    display: flex;
    gap: 10px;
}

.yao-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    transition: all var(--transition-normal);
}

.yao-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    animation: dotActive 1s ease-in-out infinite;
}

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

.yao-dot.yang {
    background: var(--accent);
    border-color: var(--accent);
}

.yao-dot.yin {
    background: var(--primary);
    border-color: var(--primary);
}

.yao-progress .count {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
}

/* ========== 卦象构建 ========== */
.gua-building {
    margin: 30px 0;
    min-height: 160px;
}

.gua-lines {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
}

.yao-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: lineAppear 0.5s ease;
}

@keyframes lineAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.yao-segment {
    height: 14px;
    background: var(--gradient-accent);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.yao-line.yang .yao-segment {
    width: 110px;
}

.yao-line.yin .yao-segment {
    width: 45px;
}

.yao-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    width: 55px;
    text-align: right;
}

/* ========== 结果区域 ========== */
.result-section {
    animation: resultFadeIn 0.8s ease;
}

@keyframes resultFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

.result-card {
    text-align: center;
}

/* 卦象显示 */
.gua-display {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.gua-symbol {
    font-size: 7rem;
    color: var(--accent);
    text-shadow: 
        0 0 30px var(--accent-glow),
        0 0 60px var(--accent-glow);
    line-height: 1;
    margin-bottom: 20px;
    animation: symbolPulse 3s ease-in-out infinite;
}

@keyframes symbolPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 30px var(--accent-glow));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px var(--accent-glow));
    }
}

.gua-name-container {
    margin-bottom: 15px;
}

.gua-name {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: 8px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.gua-fullname {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.fortune-badge {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 12px;
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0%, 100% { box-shadow: 0 0 20px currentColor; }
    50% { box-shadow: 0 0 40px currentColor; }
}

.fortune-badge.fortune-大吉 {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    color: white;
}

.fortune-badge.fortune-吉 {
    background: linear-gradient(145deg, #4ade80, #22c55e);
    color: white;
}

.fortune-badge.fortune-中吉,
.fortune-badge.fortune-小吉 {
    background: linear-gradient(145deg, #84cc16, #65a30d);
    color: white;
}

.fortune-badge.fortune-中平,
.fortune-badge.fortune-平 {
    background: linear-gradient(145deg, #eab308, #ca8a04);
    color: #1a1a2e;
}

.fortune-badge.fortune-凶,
.fortune-badge.fortune-小凶转吉 {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
}

.fortune-badge.fortune-先凶后吉,
.fortune-badge.fortune-先吉后凶,
.fortune-badge.fortune-凶转吉 {
    background: linear-gradient(145deg, #f97316, #ea580c);
    color: white;
}

/* 结果块 */
.result-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    text-align: left;
    transition: all var(--transition-normal);
}

.result-block:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.result-block h3 {
    color: var(--primary-light);
    font-size: 1.15rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-block h3 .icon {
    font-size: 1.3rem;
}

.result-block p {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.9;
}

.judgment {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem !important;
    color: var(--accent) !important;
    text-align: center;
}

/* 分项解读 */
.detailed-readings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.reading-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    transition: all var(--transition-normal);
}

.reading-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.reading-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.reading-label {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.reading-text {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* 卦象图解 */
.gua-diagram {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
}

.gua-diagram h3 {
    color: var(--primary-light);
    font-size: 1.15rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.diagram-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
}

.trigram {
    text-align: center;
}

.trigram-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.trigram-name {
    display: block;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.2rem;
    color: var(--accent);
}

.trigram-nature {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.gua-visual {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.visual-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.visual-segment {
    height: 10px;
    background: var(--accent);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.visual-line.yang .visual-segment {
    width: 70px;
}

.visual-line.yin .visual-segment {
    width: 28px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 1rem;
    font-family: inherit;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.action-btn:hover {
    background: var(--primary);
    color: var(--bg-start);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--border-glow);
}

.ai-chat-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
}

.ai-chat-btn:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5) !important;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 35px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer .disclaimer {
    font-size: 0.85rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* ========== 响应式设计 ========== */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .bagua-container {
        width: 100px;
        height: 100px;
    }
    
    .bagua-symbol {
        font-size: 4rem;
    }
    
    .title {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }
    
    .section {
        padding: 22px;
        border-radius: 20px;
    }
    
    .coins-display {
        gap: 18px;
    }
    
    .coin {
        width: 65px;
        height: 65px;
    }
    
    .coin-text {
        font-size: 1.5rem;
    }
    
    .gua-symbol {
        font-size: 5rem;
    }
    
    .gua-name {
        font-size: 2.2rem;
    }
    
    .detailed-readings {
        grid-template-columns: 1fr;
    }
    
    .reading-item {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 5px 15px;
        text-align: left;
        padding: 15px;
    }
    
    .reading-icon {
        grid-row: span 2;
        font-size: 2.5rem;
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }
    
    .reading-label {
        margin-bottom: 0;
    }
    
    .diagram-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .yao-line.yang .yao-segment {
        width: 80px;
    }
    
    .yao-line.yin .yao-segment {
        width: 32px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    justify-content: center;
}
}

/* ========== 弹窗通用样式 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, var(--bg-mid), var(--bg-start));
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 30px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--text);
    transform: rotate(90deg);
}

/* ========== 登录/注册弹窗 ========== */
.auth-modal {
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.auth-tab.active {
    background: var(--gradient-accent);
    border-color: var(--accent);
    color: #1a1a2e;
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-group input {
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--border-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.form-error {
    padding: 12px 15px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 0.9rem;
}

.auth-submit-btn {
    padding: 16px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ========== 钱包登录（登录弹窗内） ========== */
.wallet-login-section { margin-top: 18px; }
.divider-text {
    text-align: center;
    position: relative;
    margin-bottom: 14px;
}
.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}
.divider-text span {
    position: relative;
    background: var(--bg-mid, #1a1a2e);
    padding: 0 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.wallet-btns {
    display: flex;
    gap: 10px;
}
.wallet-login-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.wallet-login-btn:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}
.wl-icon { font-size: 1.2rem; }

/* 钱包连接指示器 */
.wallet-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 8px;
    color: #22c55e;
    text-shadow: 0 0 6px #22c55e;
}
.wallet-dot.hidden { display: none; }

/* 用户菜单里的钱包状态条 */
.wallet-status-bar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
}
.wallet-status-bar.hidden { display: none; }
.ws-connected {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.ws-dot {
    color: #22c55e;
    font-size: 10px;
    text-shadow: 0 0 6px #22c55e;
}
.ws-addr {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ws-disconnect {
    padding: 4px 10px;
    font-size: 0.72rem;
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}
.ws-disconnect:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========== 旧钱包登录样式（保留） ========== */
.wallet-login-intro {
    text-align: center;
    padding: 20px 0;
}

.wallet-icon-big {
    font-size: 4rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.wallet-login-intro h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 8px;
}

.wallet-login-intro p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
}

.wallet-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
}

.wallet-option-btn:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateX(5px);
}

.wallet-option-icon {
    font-size: 2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 12px;
}

.wallet-option-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.wallet-option-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.wallet-status {
    padding: 20px;
    text-align: center;
}

.wallet-connecting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary);
}

.wallet-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.wallet-tips {
    padding: 15px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 12px;
    margin-top: 20px;
}

.wallet-tips p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 5px 0;
}

/* 用户菜单钱包地址显示 */
.profile-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-wallet-icon {
    color: var(--primary);
}

.profile-wallet-address {
    font-family: 'Courier New', monospace;
    color: var(--text);
}

/* ========== 用户菜单弹窗 ========== */
.user-menu-content {
    max-width: 400px;
    padding: 24px 20px;
}

/* 用户头像+信息区 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 0;
}

.profile-avatar {
    width: 58px;
    height: 58px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.profile-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-info h3:hover { color: var(--primary); }

.edit-icon {
    font-size: 0.7rem;
    margin-left: 4px;
    opacity: 0.5;
}

.profile-level {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,215,0,0.5);
    border-radius: 10px;
    color: var(--accent) !important;
    font-weight: 700;
}

/* 三格统计条 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-item.highlight {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 215, 0, 0.08) 100%);
    border-color: var(--accent);
}

.stat-item.highlight .stat-value { color: var(--accent); }

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* 资产概览条 */
.um-assets {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 8px;
    margin-bottom: 16px;
}

.um-asset-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.um-asset-item:hover { opacity: 0.75; }

.um-asset-val {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.um-asset-lbl {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.um-asset-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
}

/* 功能分区 */
.um-section {
    margin-bottom: 14px;
}

.um-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 2px;
    letter-spacing: 0.5px;
}

/* 4列网格 */
.um-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.um-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    font-family: inherit;
}

.um-grid-item:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.um-grid-item:active {
    transform: translateY(0);
}

.um-grid-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.um-grid-text {
    font-size: 0.75rem;
    color: var(--text);
    white-space: nowrap;
    font-weight: 500;
}

.um-grid-item:hover .um-grid-text {
    color: var(--text);
}

.um-grid-item.um-logout {
    border-color: rgba(239, 68, 68, 0.15);
}

.um-grid-item.um-logout .um-grid-text {
    color: #ef4444;
}

.um-grid-item.um-logout:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* 每日语录（底部小型） */
.daily-quote {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    margin-top: 4px;
}

.quote-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 4px;
}

.quote-source {
    color: var(--text-muted);
    font-size: 0.68rem;
    opacity: 0.6;
}

/* ========== 提示消息 ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(34, 197, 94, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    color: white;
    font-size: 0.95rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: toastSlideUp 0.4s ease;
    z-index: 2000;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
}

.toast.warning {
    background: rgba(234, 179, 8, 0.95);
    color: #1a1a2e;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== VIP会员弹窗 ========== */
.vip-modal-content {
    max-width: 400px;
    padding: 24px 20px 16px;
}

/* 产品卡片 */
.vip-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255,215,0,0.12) 0%, rgba(255,215,0,0.04) 100%);
    border: 1.5px solid rgba(255,215,0,0.3);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.vip-product-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.vip-product-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.vip-product-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,215,0,0.15);
    border-radius: 12px;
}
.vip-product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}
.vip-product-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.vip-product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
}

/* 权益标签 */
.vip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.vip-tag {
    padding: 4px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 支付方式标题 */
.vip-pay-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

/* 支付按钮并排 */
.vip-pay-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.vip-pay-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 6px;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.vip-pay-btn input { display: none; }
.vip-pay-btn:hover { background: var(--surface-hover); }
.vip-pay-btn.active {
    border-color: var(--accent);
    background: rgba(255,215,0,0.08);
}
.vip-pay-icon { font-size: 1.3rem; }
.vip-pay-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.vip-pay-sub {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

/* 立即开通按钮 */
.vip-buy-btn {
    width: 100%;
    padding: 14px;
    margin-top: 14px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.vip-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.35);
}
.vip-buy-btn:active {
    transform: translateY(0);
}

/* 我的订单入口 */
.my-orders-link {
    text-align: center;
    padding: 12px;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}
.my-orders-link:hover {
    color: var(--primary-light);
}

/* ========== 其他弹窗样式 ========== */
/* 限制弹窗 */
.limit-modal-content {
    max-width: 360px;
    text-align: center;
}

.limit-icon {
    font-size: 4.5rem;
    margin-bottom: 18px;
}

.limit-modal-content h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 12px;
}

.limit-modal-content p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.limit-actions {
    display: flex;
    gap: 14px;
}

.limit-btn {
    flex: 1;
    padding: 14px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.limit-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.limit-btn.secondary:hover {
    border-color: var(--text);
    color: var(--text);
}

.limit-btn.primary {
    background: var(--gradient-accent);
    border: none;
    color: #1a1a2e;
}

.limit-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* 小弹窗 */
.small-modal {
    max-width: 380px;
}

.small-modal h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 22px;
    font-size: 1.3rem;
}

.small-modal .form-group {
    margin-bottom: 16px;
}

.small-modal .form-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.small-modal .form-group input,
.small-modal .form-group select {
    width: 100%;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
}

.small-modal .form-group input:focus,
.small-modal .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.small-modal .form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.small-modal .submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all var(--transition-normal);
}

.small-modal .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* ========== AI解卦咨询 ========== */
.ai-chat-content {
    max-width: 480px;
    height: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.ai-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.ai-info {
    flex: 1;
}

.ai-info h3 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 3px;
}

.ai-status {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.ai-chat-header .modal-close {
    position: static;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.ai-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: var(--bg-start);
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.ai-message .message-content {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 6px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

/* 加载动画 */
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 6px 0;
}

.typing-dots span {
    width: 9px;
    height: 9px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 快捷问题 */
.ai-quick-questions {
    padding: 12px 18px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.ai-quick-questions p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-btn {
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 18px;
    color: #667eea;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.quick-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
}

/* 输入区域 */
.ai-chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.ai-chat-input input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-start);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text);
    font-size: 0.95rem;
}

.ai-chat-input input:focus {
    outline: none;
    border-color: #667eea;
}

.ai-send-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ========== 其他弹窗保持原样式 ========== */
/* 分享弹窗、钱包弹窗、公告弹窗等保持原有结构 */

.share-modal-content,
.my-referrals-content,
.wallet-modal-content,
.income-source-content,
.history-modal-content,
.report-modal-content,
.settings-modal-content,
.notice-panel,
.notice-detail,
.payment-modal-content,
.order-detail-content,
.my-orders-content,
.avatar-modal-content,
.nickname-modal-content {
    max-width: 450px;
}

/* 通用表单按钮 */
.btn-primary {
    padding: 14px 28px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    padding: 14px 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    border-color: var(--text);
    color: var(--text);
}

/* 响应式AI聊天 */
@media (max-width: 500px) {
    .ai-chat-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .ai-chat-header {
        border-radius: 0;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .vip-pay-methods {
        gap: 6px;
    }
}

/* 今日剩余次数条 */
.remain-count-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    margin-bottom: 18px;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.remain-icon {
    font-size: 1.1rem;
}

.remain-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.remain-text strong {
    color: var(--accent);
    font-size: 1.15rem;
    margin: 0 3px;
}

/* 保留旧样式兼容性 */
.member-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    margin-bottom: 18px;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-icon {
    font-size: 1.4rem;
}

.status-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.status-text strong {
    color: var(--accent);
    font-size: 1.15rem;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 22px;
    color: #1a1a2e;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* ========== 公告面板 ========== */
.notice-panel {
    max-width: 500px;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}

.notice-header h2 {
    flex: 1;
    font-size: 1.3rem;
    color: var(--accent);
}

.mark-all-read {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mark-all-read:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.notice-list {
    max-height: 400px;
    overflow-y: auto;
}

/* 公告列表项 */
.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.notice-item:hover {
    background: var(--surface-hover);
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item.unread {
    background: var(--surface);
}

.notice-item.important {
    border-left: 3px solid var(--accent);
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.notice-type {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.notice-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notice-title {
    font-size: 0.95rem;
    color: var(--text);
    margin: 0 0 4px 0;
    font-weight: 500;
}

.notice-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 6px var(--accent-glow);
}

.empty-notice {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 通知脉冲动画 */
.pulse {
    animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 公告详情 */
.notice-detail {
    max-width: 480px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-type {
    font-size: 0.85rem;
    padding: 4px 12px;
    background: var(--surface);
    border-radius: 15px;
    color: var(--text-muted);
}

.detail-title {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 8px;
}

.detail-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.detail-content {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
}

/* 分享弹窗样式 */
.share-modal-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 18px;
}

.share-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.share-cards {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 0;
    margin-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.share-card {
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.share-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.share-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.share-card canvas {
    display: block;
    width: 180px;
    height: 270px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.share-link-box {
    margin-bottom: 18px;
}

.share-link-box label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.link-input-group {
    display: flex;
    gap: 10px;
}

.link-input-group input {
    flex: 1;
    padding: 12px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
}

.link-input-group button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.link-input-group button:hover {
    background: var(--primary-light);
}

.share-actions {
    display: flex;
    gap: 12px;
}

.share-action-btn {
    flex: 1;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-action-btn:hover {
    border-color: var(--primary);
}

.share-action-btn.primary {
    background: var(--gradient-accent);
    border: none;
    color: #1a1a2e;
    font-weight: 600;
}

/* 钱包弹窗 */
.wallet-modal-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 22px;
}

.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 22px;
}

.balance-main {
    text-align: center;
    margin-bottom: 18px;
}

.balance-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.balance-extra {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-item {
    text-align: center;
}

.balance-item span:first-child {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.balance-item span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.wallet-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.wallet-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.wallet-action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.action-icon {
    font-size: 1.5rem;
}

.wallet-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wallet-transactions {
    max-height: 250px;
    overflow-y: auto;
}

/* 推荐统计 */
.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    text-align: center;
    padding: 18px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* 等级卡片 */
.my-level-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 1px solid var(--accent);
    border-radius: 14px;
    margin-bottom: 18px;
}

.level-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.level-icon {
    font-size: 2rem;
}

.level-name {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.level-progress {
    flex: 1;
}

.referral-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.referral-list {
    max-height: 300px;
    overflow-y: auto;
}

/* 收入规则 */
.income-rules {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.income-rules h4 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.rule-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-icon {
    font-size: 1.5rem;
}

.rule-content strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

.rule-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 历史记录 */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* 设置 */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.settings-item:hover {
    border-color: var(--primary);
}

.settings-icon {
    font-size: 1.3rem;
}

.settings-text {
    flex: 1;
    color: var(--text);
}

.settings-value {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* 支付弹窗 */
.payment-modal-content {
    max-width: 420px;
}

.payment-header {
    text-align: center;
    margin-bottom: 22px;
}

.payment-header h2 {
    color: var(--accent);
    margin-bottom: 6px;
}

.payment-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
}

.payment-product {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.payment-amount .label {
    color: var(--text-muted);
}

.payment-amount .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.payment-rate {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.payment-qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-loading {
    color: #666;
}

.payment-address {
    margin-bottom: 18px;
}

.payment-address label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.address-box {
    display: flex;
    gap: 10px;
}

.address-box code {
    flex: 1;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.8rem;
    word-break: break-all;
}

.copy-btn {
    padding: 12px 18px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.copy-btn:hover {
    background: var(--primary-light);
}

.payment-status-box {
    text-align: center;
    padding: 12px;
    background: var(--surface);
    border-radius: 10px;
    margin-bottom: 12px;
}

.payment-timer {
    text-align: center;
    padding: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timer-icon {
    margin-right: 5px;
}

.payment-notice {
    background: var(--surface);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 18px;
}

.payment-notice p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.payment-notice p:last-child {
    margin-bottom: 0;
}

.payment-actions {
    display: flex;
    gap: 12px;
}

/* 订单详情 */
.order-detail-content h2,
.my-orders-content h2 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 22px;
}

.order-detail-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.orders-list {
    max-height: 400px;
    overflow-y: auto;
}

/* 头像选择 */
.avatar-modal-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 10px;
}

.avatar-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* 昵称修改 */
.nickname-modal-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 22px;
}

/* 报告弹窗 */
.report-modal-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 18px;
}

.report-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    max-height: 350px;
    overflow-y: auto;
}

.report-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 收益明细 */
.income-source-content h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 18px;
}

.income-source-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 18px;
}

/* ========== Fate币样式 ========== */

/* 个人中心Fate币卡片 */
.fatecoin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 14px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fatecoin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}

.fatecoin-icon {
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

.fatecoin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fatecoin-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fatecoin-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.fatecoin-claim-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border: none;
    border-radius: 20px;
    color: #1a1a2e;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fatecoin-claim-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.4);
}

.fatecoin-claim-btn:disabled,
.fatecoin-claim-btn.claimed {
    background: linear-gradient(135deg, #666, #444);
    color: #999;
    cursor: not-allowed;
}

/* Fate币弹窗 */
.fatecoin-modal-content {
    max-width: 400px;
}

.fatecoin-modal-content h3 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 20px;
}

.fatecoin-balance-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.fatecoin-balance-card .balance-main {
    margin-bottom: 15px;
}

.fatecoin-balance-card .balance-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.fatecoin-balance-card .balance-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.fatecoin-balance-card .balance-extra {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fatecoin-balance-card .balance-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.fatecoin-balance-card .balance-item span:first-child {
    color: var(--text-muted);
}

.fatecoin-balance-card .balance-item span:last-child {
    color: var(--text);
    font-weight: 600;
}

/* Fate币操作按钮 */
.fatecoin-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.fc-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.fc-action-btn:hover:not(.disabled) {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.fc-action-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fc-action-icon {
    font-size: 1.5rem;
}

.fc-coming-soon {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 2px 8px;
    background: #ff6b6b;
    border-radius: 10px;
    font-size: 0.7rem;
    color: white;
}

/* 折叠区块 */
.fc-collapse-section {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.fc-collapse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.fc-collapse-header:hover {
    background: var(--surface-hover);
}

.fc-collapse-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.fc-collapse-arrow.expanded {
    transform: rotate(0deg);
}

.fc-collapse-content {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
}

/* 获取规则 */
.rule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 10px;
    font-size: 0.85rem;
}

.rule-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

.rule-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rule-name {
    font-weight: 600;
    color: var(--text);
}

.rule-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rule-amount {
    font-size: 0.95rem;
    font-weight: bold;
    color: #2ed573;
}

/* 待开放提示 */
.coming-soon-notice {
    text-align: center;
    padding: 40px 20px;
}

.coming-soon-notice .notice-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.coming-soon-notice p {
    font-size: 1.1rem;
    color: var(--text);
    margin: 0;
}

.coming-soon-notice .notice-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 历史记录 */
.fatecoin-history h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
}

.fatecoin-history .history-list {
    max-height: 200px;
    overflow-y: auto;
}

.fatecoin-history .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--surface);
    border-radius: 10px;
    margin-bottom: 8px;
}

.fatecoin-history .history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fatecoin-history .history-reason {
    font-size: 0.9rem;
    color: var(--text);
}

.fatecoin-history .history-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fatecoin-history .history-amount {
    font-size: 1.1rem;
    font-weight: bold;
}

.fatecoin-history .history-amount.in {
    color: #2ed573;
}

.fatecoin-history .history-amount.out {
    color: #ff4757;
}
