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

/* 移动端优化 */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 防止iOS Safari橡皮筋效果 */
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e40af 100%);
    min-height: 100vh;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 防止微信浏览器下拉刷新 */
    overscroll-behavior: none;
    /* 防止iOS Safari橡皮筋效果 */
    position: fixed;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 微信分享引导样式 */
.wechat-share-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.share-guide-content {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    max-width: 320px;
    text-align: center;
    position: relative;
    animation: slideInUp 0.3s ease;
}

.share-arrow {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2rem;
    animation: bounce 1s infinite;
}

.share-guide-content h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.share-guide-content p {
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.5;
}

.guide-close-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 网络状态提示 */
.network-status {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
    z-index: 9998;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.network-status.show {
    transform: translateY(0);
}

/* 微信环境提示 */
.wechat-notice {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 10px;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* 备用方案：使用绝对定位确保居中 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e40af 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    text-align: center;
    color: white;
    max-width: 300px;
    padding: 20px;
    /* 确保内容在容器中居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 防止任何可能的偏移 */
    margin: 0;
    transform: none;
    position: relative;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    flex-shrink: 0;
}

#loading-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    min-height: 1.5em;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.loading-progress {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 15px auto 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 添加加载完成的动画效果 */
.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    /* 防止水平滚动 */
    overflow-x: hidden;
    width: 100%;
}

/* 代币数据展示区域 */
.token-data-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: static;
    z-index: auto;
    /* 确保内容不会溢出 */
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.token-data-section h2 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    text-align: center;
}

/* 代币统计卡片网格 */
.token-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    /* 确保网格不会超出容器 */
    width: 100%;
    max-width: 100%;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* 防止内容溢出 */
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0; /* 允许flex项目收缩 */
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    font-weight: 700;
    color: #1e293b;
    /* 处理长数字的显示 */
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

/* K线图区域 */
.chart-section {
    margin: 25px 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    color: #1f2937;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chart-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.chart-btn.active,
.chart-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-1px);
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    /* 确保图表容器适应 */
    width: 100%;
    max-width: 100%;
}

.chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
    /* 确保canvas响应式 */
    width: 100% !important;
}

/* 持币大户分析区域 */
.holders-section {
    margin: 25px 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    /* 防止内容溢出 */
    overflow: hidden;
    width: 100%;
}

.holders-section h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    text-align: center;
}

.holders-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    /* 确保网格适应容器 */
    width: 100%;
}

.holder-stat {
    background: white;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* 防止内容溢出 */
    overflow: hidden;
    min-width: 0;
}

.holder-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    /* 防止标签文字过长 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.holder-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    /* 处理数值显示 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    min-width: 0;
}

.holder-value.high-risk {
    color: #ef4444;
}

.holder-value.medium-risk {
    color: #f59e0b;
}

.holder-value.low-risk {
    color: #10b981;
}

/* 持币大户列表 */
.top-holders-list {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* 确保列表不会溢出 */
    overflow: hidden;
    width: 100%;
}

.loading-holders {
    text-align: center;
    color: #64748b;
    padding: 20px;
    font-style: italic;
}

.holder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    /* 防止项目溢出 */
    overflow: hidden;
    min-width: 0;
}

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

.holder-rank {
    font-weight: 700;
    color: #3b82f6;
    min-width: 30px;
}

.holder-address {
    flex: 1;
    margin: 0 10px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    color: #64748b;
    /* 修复地址显示溢出 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 150px; /* 限制最大宽度 */
}

.holder-balance {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    /* 防止余额数字溢出 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    max-width: 100px;
}

.holder-percentage {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 8px;
}

/* 移动端优化 */
@media (max-width: 767px) {
    .container {
        padding: 10px;
        /* 移动端更小的内边距 */
        margin: 0;
        width: 100%;
        max-width: 100vw;
    }
    
    .token-data-section {
        padding: 15px;
        margin: 10px 0;
        border-radius: 15px;
    }
    
    .token-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        /* 移动端使用2列布局 */
    }
    
    .stat-card {
        padding: 10px;
        min-height: 80px;
    }
    
    .stat-label {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }
    
    .stat-value {
        font-size: clamp(0.8rem, 3vw, 1rem);
        line-height: 1.1;
    }
    
    .holders-stats {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .holder-stat {
        padding: 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .holder-label {
        font-size: 0.75rem;
    }
    
    .holder-value {
        font-size: 0.8rem;
        align-self: flex-end;
    }
    
    .holder-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 8px 0;
    }
    
    .holder-address {
        margin: 0;
        word-break: break-all;
        white-space: normal;
        max-width: 100%;
        font-size: 0.7rem;
    }
    
    .holder-balance {
        align-self: flex-end;
        max-width: 100%;
        font-size: 0.8rem;
    }
    
    .chart-container {
        padding: 10px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .chart-controls {
        justify-content: center;
        gap: 5px;
    }
    
    .chart-btn {
        flex: 1;
        min-width: 50px;
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    /* 五行分析移动端优化 */
    .wuxing-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .wuxing-bars {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wuxing-bar {
        padding: 15px;
    }
    
    .element-name {
        font-size: 1rem;
    }
    
    .wuxing-progress {
        height: 10px;
    }
    
    .wuxing-score {
        font-size: 1.1rem;
    }
    
    .dominant-element {
        padding: 15px;
        margin-top: 20px;
    }
    
    /* 运势预测移动端优化 */
    .fortune-section {
        padding: 25px 20px;
        margin: 20px 0;
    }
    
    .fortune-desc {
        padding: 20px;
        font-size: 1rem;
    }
    
    .advice-box {
        padding: 25px 20px;
    }
    
    .advice-box strong {
        font-size: 1.1rem;
    }
    
    .advice-box p {
        font-size: 0.95rem;
        padding: 12px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .token-stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .stat-card {
        padding: 8px;
        min-height: 60px;
    }
    
    .holder-address {
        font-size: 0.65rem;
    }
    
    .holders-section {
        padding: 15px;
    }
    
    /* 运势预测超小屏幕优化 */
    .fortune-section {
        padding: 20px 15px;
        border-radius: 20px;
    }
    
    .fortune-section h4 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .fortune-desc {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .advice-box {
        padding: 20px 15px;
        margin: 20px 0;
    }
}

/* 平板优化 */
@media (min-width: 768px) and (max-width: 1023px) {
    .token-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .holders-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .holder-address {
        max-width: 200px;
    }
    
    .chart-container {
        padding: 20px;
    }
    
    /* 五行分析平板优化 */
    .wuxing-bars {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* 桌面端优化 */
@media (min-width: 1024px) {
    .token-data-section {
        padding: 30px;
    }
    
    .token-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .holders-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .holder-address {
        max-width: 250px;
        font-size: 0.8rem;
    }
    
    .holder-balance {
        max-width: 120px;
    }
    
    .chart-container {
        padding: 25px;
    }
    
    .holders-section {
        padding: 25px;
    }
    
    /* 五行分析桌面端优化 */
    .wuxing-bars {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
    
    .wuxing-bar {
        min-height: 180px;
    }
}

/* ... existing code ... */

/* 通用样式 */
section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 确保所有分析部分都有正确的间距和布局 */
.wuxing-section,
.bazzi-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    /* 确保每个部分都有足够的清除浮动 */
    clear: both;
}

/* 运势预测部分 - 重新设计，与整体主题协调 */
.fortune-section {
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.95) 0%, 
        rgba(245, 158, 11, 0.95) 50%, 
        rgba(217, 119, 6, 0.95) 100%);
    border-radius: 25px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.3);
    position: relative;
    overflow: hidden;
    color: #1a202c;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.fortune-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
    z-index: 0;
}

.fortune-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.fortune-section > * {
    position: relative;
    z-index: 1;
}

.fortune-section h4 {
    text-align: center;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 800;
    margin-bottom: 25px;
    color: #92400e;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fortune-section h4::before {
    content: '🔮';
    font-size: 1.2em;
    animation: float 3s ease-in-out infinite;
}

/* 运势描述卡片 - 重新设计 */
.fortune-desc {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 20px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    line-height: 1.7;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.fortune-desc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
    border-radius: 18px 18px 0 0;
}

.fortune-desc:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

/* 投资建议框 - 重新设计，更加和谐 */
.advice-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
    color: #1a202c;
}

.advice-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.advice-box::after {
    content: '💎';
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    opacity: 0.2;
    animation: float 4s ease-in-out infinite;
}

.advice-box strong {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
    font-weight: 800;
    margin-bottom: 15px;
    color: #92400e;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.advice-box strong::before {
    content: '🎯';
    font-size: 1.3em;
    animation: pulse 2s infinite;
}

.advice-box p {
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    line-height: 1.7;
    color: #374151;
    font-weight: 500;
    margin: 0;
    padding: 18px;
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.1) 0%, 
        rgba(245, 158, 11, 0.1) 100%);
    border-radius: 15px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: inset 0 2px 4px rgba(251, 191, 36, 0.1);
}

/* 运势等级样式 - 与主题协调 */
.fortune-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: levelGlow 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fortune-level.极佳 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.fortune-level.良好 {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.fortune-level.一般 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.fortune-level.较差,
.fortune-level.极差 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* 运势分数显示 - 与主题协调 */
.fortune-score {
    display: inline-block;
    font-size: clamp(2rem, 6vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, #92400e 0%, #a16207 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: scoreShine 3s ease-in-out infinite;
    margin-right: 15px;
    filter: drop-shadow(2px 2px 4px rgba(146, 64, 14, 0.3));
}

/* 和谐的动画效果 */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes scoreShine {
    0%, 100% { filter: drop-shadow(2px 2px 4px rgba(146, 64, 14, 0.3)) brightness(1); }
    50% { filter: drop-shadow(2px 2px 8px rgba(146, 64, 14, 0.5)) brightness(1.1); }
}

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

/* 响应式优化 - 保持和谐 */
@media (max-width: 768px) {
    .fortune-section {
        padding: 25px 20px;
        margin: 20px 0;
        border-radius: 20px;
    }
    
    .fortune-desc {
        padding: 20px;
        font-size: 1rem;
    }
    
    .advice-box {
        padding: 20px;
    }
    
    .advice-box strong {
        font-size: 1.1rem;
    }
    
    .advice-box p {
        font-size: 0.95rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .fortune-section {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .fortune-section h4 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .fortune-desc {
        padding: 18px;
        margin-bottom: 18px;
    }
    
    .advice-box {
        padding: 18px 15px;
        margin: 18px 0;
    }
    
    .advice-box::after {
        font-size: 1.2rem;
        top: 15px;
        right: 20px;
    }
}

/* 深色模式适配 - 保持主题一致性 */
@media (prefers-color-scheme: dark) {
    .fortune-section {
        background: linear-gradient(135deg, 
            rgba(146, 64, 14, 0.9) 0%, 
            rgba(161, 98, 7, 0.9) 50%, 
            rgba(180, 83, 9, 0.9) 100%);
        border-color: rgba(251, 191, 36, 0.3);
    }
    
    .fortune-desc {
        background: rgba(30, 41, 59, 0.9);
        color: #e2e8f0;
        border-color: rgba(251, 191, 36, 0.3);
    }
    
    .advice-box {
        background: rgba(30, 41, 59, 0.9);
        color: #e2e8f0;
        border-color: rgba(251, 191, 36, 0.4);
    }
    
    .advice-box p {
        background: rgba(251, 191, 36, 0.1);
        color: #cbd5e1;
    }
}

/* AI置信度显示 */
.ai-confidence {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.ai-confidence h4 {
    color: #0c4a6e;
    margin-bottom: 15px;
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.confidence-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.confidence-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.confidence-item span:first-child {
    min-width: 80px;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    overflow: hidden;
    min-width: 120px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}

.confidence-item span:last-child {
    min-width: 50px;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
    font-size: 0.9rem;
}

/* 通用部分样式 */
h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    text-align: center;
}

.ai-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    line-height: 1.5;
}

/* AI状态指示器 */
.ai-status-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-bottom: 25px;
}

.ai-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 5px;
}

.status-indicator {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

#status-text {
    font-weight: 600;
    color: #065f46;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
}

/* 输入区域 */
.input-section {
    margin-bottom: 25px;
}

.token-input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    background: white;
    transition: all 0.3s ease;
    /* 防止iOS缩放 */
    font-size: 16px;
    /* 防止用户选择 */
    -webkit-user-select: text;
    user-select: text;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.clear-input-btn {
    position: absolute;
    right: 10px;
    background: #6b7280;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.form-group small {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 5px;
    line-height: 1.4;
}

/* 按钮样式 */
.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 15px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    /* 确保足够的触摸目标大小 */
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.analyze-btn .btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.analyze-btn .btn-main {
    display: flex;
    align-items: center;
}

.analyze-btn .btn-tip {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
    line-height: 1;
    margin-top: 2px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.analyze-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果显示区域 */
.result-section {
    margin: 25px 0;
}

.result-display {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    min-height: 100px;
    /* 改为block布局而不是flex，避免子元素重叠 */
    display: block;
    position: relative;
}

.result-display p {
    color: #64748b;
    text-align: center;
    font-style: italic;
    line-height: 1.6;
}

.result-display .analysis-content {
    text-align: left;
}

/* 分析结果样式 */
.analysis-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 15px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.token-name {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
}

.analysis-time {
    color: #a16207;
    font-size: 0.9rem;
}

/* 运势总结 */
.fortune-summary {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
}

.fortune-summary.excellent {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.fortune-summary.good {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.fortune-summary.average {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.fortune-summary.poor {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.fortune-summary h4 {
    margin-bottom: 10px;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.fortune-summary.excellent h4 { color: #065f46; }
.fortune-summary.good h4 { color: #1e40af; }
.fortune-summary.average h4 { color: #92400e; }
.fortune-summary.poor h4 { color: #991b1b; }

/* 五行分析区域 - 全新设计 */
.wuxing-section {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 50%, #fde68a 100%);
    border-radius: 25px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.2);
    border: 2px solid rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
}

.wuxing-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.wuxing-section > * {
    position: relative;
    z-index: 1;
}

.wuxing-section h4 {
    text-align: center;
    color: #92400e;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(146, 64, 14, 0.1);
}

/* 五行元素卡片网格 */
.wuxing-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.wuxing-bar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wuxing-bar:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.wuxing-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--element-color);
    border-radius: 20px 20px 0 0;
}

/* 五行元素标签 */
.element-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.element-name::before {
    content: var(--element-icon);
    font-size: 1.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

/* 五行进度条容器 */
.wuxing-progress {
    position: relative;
    height: 12px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.wuxing-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    animation: shimmer 2s infinite;
}

/* 五行进度条填充 */
.wuxing-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--element-gradient);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.wuxing-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    animation: slideShine 3s infinite;
}

/* 五行数值显示 */
.wuxing-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.wuxing-score {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--element-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.wuxing-percentage {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

/* 主导五行显示 */
.dominant-element {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
}

.dominant-element strong {
    color: #92400e;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(146, 64, 14, 0.1);
}

/* 五行元素特定样式 */
.wuxing-bar[data-element="wood"] {
    --element-color: #10b981;
    --element-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --element-icon: '🌳';
}

.wuxing-bar[data-element="fire"] {
    --element-color: #ef4444;
    --element-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --element-icon: '🔥';
}

.wuxing-bar[data-element="earth"] {
    --element-color: #f59e0b;
    --element-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --element-icon: '🏔️';
}

.wuxing-bar[data-element="metal"] {
    --element-color: #6b7280;
    --element-gradient: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    --element-icon: '⚡';
}

.wuxing-bar[data-element="water"] {
    --element-color: #3b82f6;
    --element-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --element-icon: '🌊';
}

/* 动画效果 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes borderGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

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

@keyframes scoreGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

@keyframes slideShine {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

/* 五行能量等级指示器 */
.energy-level {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.energy-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--element-color);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.energy-dot.active {
    opacity: 1;
    box-shadow: 0 0 8px var(--element-color);
    animation: pulse 2s infinite;
}

/* 特殊效果：五行相生相克指示 */
.wuxing-section.harmony {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.2);
}

.wuxing-section.conflict {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 50%, #fca5a5 100%);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.2);
}

/* 五行图表增强 */
#wuxing-chart {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid rgba(148, 163, 184, 0.2);
    margin-top: 30px;
}

#wuxing-chart h3 {
    color: #1e293b;
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
}

#wuxingCanvas {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

#wuxingCanvas:hover {
    transform: scale(1.02);
}

/* 五行颜色 */
.wood { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.fire { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.earth { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.metal { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); }
.water { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

/* 八字显示 */
.bazzi-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
}

.bazzi-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    /* 防止内容溢出 */
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0;
}

.bazzi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bazzi-item.wood { border-color: #10b981; }
.bazzi-item.fire { border-color: #ef4444; }
.bazzi-item.earth { border-color: #f59e0b; }
.bazzi-item.metal { border-color: #6b7280; }
.bazzi-item.water { border-color: #3b82f6; }

.bazzi-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 5px;
    font-weight: 500;
}

.bazzi-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.bazzi-item.wood .bazzi-value { color: #10b981; }
.bazzi-item.fire .bazzi-value { color: #ef4444; }
.bazzi-item.earth .bazzi-value { color: #f59e0b; }
.bazzi-item.metal .bazzi-value { color: #6b7280; }
.bazzi-item.water .bazzi-value { color: #3b82f6; }

.bazzi-element {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

/* 运势详情 */
.fortune-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
    width: 100%;
}

.fortune-detail {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 4px solid;
    /* 防止内容溢出 */
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0;
}

.fortune-detail.positive { border-top-color: #10b981; }
.fortune-detail.negative { border-top-color: #ef4444; }
.fortune-detail.neutral { border-top-color: #6b7280; }

.fortune-detail h5 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.fortune-detail.positive h5 { color: #065f46; }
.fortune-detail.negative h5 { color: #991b1b; }
.fortune-detail.neutral h5 { color: #374151; }

.fortune-detail p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* 投资建议框 - 重新设计 */
.advice-box {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.4);
    position: relative;
    overflow: hidden;
    color: #1a202c;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.advice-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

.advice-box::after {
    content: '💎';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.advice-box h4 {
    color: #92400e;
    margin-bottom: 15px;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.advice-box strong {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 800;
    margin-bottom: 15px;
    color: #92400e;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.advice-box strong::before {
    content: '🎯';
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.advice-box p {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.7;
    color: #1a202c;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
    margin: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.advice-box ul {
    list-style: none;
    padding: 0;
}

.advice-box li {
    color: #a16207;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.advice-box li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 0;
}

/* 图表容器 */
.chart-container {
    text-align: center;
    margin: 25px 0;
}

.chart-container h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 导出控制 */
.export-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 25px 0;
}

.export-btn,
.share-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.export-btn:hover,
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.share-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.share-btn:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* 操作按钮 */
.action-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

/* 历史控制 */
.history-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 历史列表 */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.history-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-token {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
}

.history-time {
    color: #6b7280;
    font-size: 0.8rem;
}

.history-summary {
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* 知识库网格 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.knowledge-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid;
}

.knowledge-card:nth-child(1) { border-top-color: #10b981; }
.knowledge-card:nth-child(2) { border-top-color: #ef4444; }
.knowledge-card:nth-child(3) { border-top-color: #f59e0b; }
.knowledge-card:nth-child(4) { border-top-color: #6b7280; }
.knowledge-card:nth-child(5) { border-top-color: #3b82f6; }

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

.knowledge-card h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.knowledge-card:nth-child(1) h4 { color: #065f46; }
.knowledge-card:nth-child(2) h4 { color: #991b1b; }
.knowledge-card:nth-child(3) h4 { color: #92400e; }
.knowledge-card:nth-child(4) h4 { color: #374151; }
.knowledge-card:nth-child(5) h4 { color: #1e40af; }

.knowledge-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* 错误消息 */
.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

/* 平板优化 */
@media (min-width: 768px) {
    .container {
        padding: 30px;
    }
    
    .token-input-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .form-group.full-width {
        grid-column: 1 / -1;
    }
    
    .confidence-item {
        flex-wrap: nowrap;
    }
    
    .bazzi-display {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .export-controls {
        gap: 20px;
    }
    
    .history-controls {
        gap: 20px;
    }
}
    
    .history-controls {
        gap: 20px;
    }

/* 大屏幕优化 */
@media (min-width: 1024px) {
    .container {
        padding: 40px;
    }
    
    section {
        padding: 30px;
    }
    
    .token-input-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .confidence-bars {
        flex-direction: row;
        gap: 30px;
    }
    
    .confidence-item {
        flex: 1;
    }
    
    .bazzi-display {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .knowledge-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 50px;
    }
    
    .fortune-details {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 微信浏览器特殊优化 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select {
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 40px;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .fortune-section {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }
    
    .advice-box {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        color: #f3f4f6;
    }
    
    .advice-box p {
        color: #e5e7eb;
        background: rgba(0, 0, 0, 0.2);
    }
}

/* 老黄历风格样式 */
.huangli-style {
    background: linear-gradient(135deg, #fef7cd 0%, #fef3c7 100%);
    border: 2px solid #d97706;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.huangli-header {
    background: #92400e;
    color: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.huangli-date {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.date-label {
    margin-right: 4px;
}

.date-desc {
    margin: 0 4px;
}

.tiangang, .dizhi {
    display: inline-block;
    background: #fbbf24;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 2px;
    font-weight: bold;
}

.jieqi {
    background: #059669;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.xingxiu-info {
    font-size: 0.95rem;
}

.xingxiu-name, .shensha-name {
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 4px;
}

.bazzi-display.traditional {
    background: #fffbeb;
    border: 1px solid #d97706;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.bazzi-pillars {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.pillar-group {
    text-align: center;
    flex: 1;
}

.pillar-header {
    font-size: 0.9rem;
    color: #92400e;
    font-weight: bold;
    margin-bottom: 8px;
}

.pillar-content {
    border: 2px solid #d97706;
    border-radius: 8px;
    padding: 10px;
    background: white;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tiangan {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 4px;
}

.dizhi {
    font-size: 1.2rem;
    font-weight: bold;
    color: #059669;
}

.yiji-section {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.yi-section, .ji-section {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.yi-label {
    background: #059669;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.ji-label {
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.yi-items, .ji-items {
    color: #374151;
    font-weight: 500;
}

.shensha-section {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.shensha-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.shensha-label {
    color: #92400e;
    font-weight: bold;
}

.shensha-value {
    color: #dc2626;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .bazzi-pillars {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pillar-group {
        flex: 0 0 45%;
        margin-bottom: 10px;
    }
    
    .huangli-date {
        font-size: 0.95rem;
        gap: 2px;
    }
    
    .jieqi {
        font-size: 0.8rem;
        padding: 1px 4px;
    }
    
    .tiangang, .dizhi {
        padding: 2px 6px;
        font-size: 0.9rem;
    }
    
    .yi-section, .ji-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .yi-label, .ji-label {
        margin-bottom: 5px;
    }
}

/* 代币数据部分样式 */
.token-data {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.token-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

/* 移动端代币数据优化 */
@media (max-width: 767px) {
    .token-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
}

/* 确保所有文本都能正确换行 */
.result-display,
.analysis-content,
.fortune-summary,
.advice-box {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 网络状态指示器样式 */
.network-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.network-indicator.loading {
    background: rgba(59, 130, 246, 0.9);
}

.network-indicator.error {
    background: rgba(239, 68, 68, 0.9);
}

.network-indicator.success {
    background: rgba(34, 197, 94, 0.9);
}

/* 消息提示样式 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.error {
    border-left: 4px solid #ef4444;
}

.message-toast.success {
    border-left: 4px solid #22c55e;
}

.message-toast.warning {
    border-left: 4px solid #f59e0b;
}

.message-toast.info {
    border-left: 4px solid #3b82f6;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.message-text {
    font-size: 0.9rem;
    color: #374151;
}

/* 微信环境特殊优化 */
.wechat-env .network-indicator {
    top: 60px; /* 避免与微信顶部栏重叠 */
}

.wechat-env .message-toast {
    top: 60px; /* 避免与微信顶部栏重叠 */
}

/* 移动端优化 */
@media (max-width: 768px) {
    .message-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .message-toast.show {
        transform: translateY(0);
    }
    
    .network-indicator {
        left: 10px;
        right: 10px;
        transform: none;
        text-align: center;
    }
}

/* 底部安全区域 */
.safe-area-bottom {
    height: env(safe-area-inset-bottom);
    background: transparent;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}