/* ============================================
   AI大数据科技风格 - 全局样式
   ============================================ */

/* 导入科技感字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS变量 - 科技配色 */
:root {
    --tech-primary: #00d4ff;
    --tech-secondary: #7c3aed;
    --tech-accent: #10b981;
    --tech-warning: #f59e0b;
    --tech-danger: #ef4444;
    --tech-dark: #0f172a;
    --tech-darker: #020617;
    --tech-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --tech-glow-strong: 0 0 40px rgba(0, 212, 255, 0.5);
}

/* 全局背景 - 科技网格 */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-attachment: fixed;
    position: relative;
}

/* 背景网格装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* 科技感数字字体 */
.tech-number {
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.tech-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* 玻璃拟态卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 科技感渐变边框 */
.tech-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.tech-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary), var(--tech-primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 发光效果 */
.glow-primary {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(0, 212, 255, 0.1);
}

.glow-secondary {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), 0 0 40px rgba(124, 58, 237, 0.1);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), 0 0 40px rgba(16, 185, 129, 0.1);
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-success {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 数据流动画 */
@keyframes dataFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.data-flow-bg {
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #00d4ff);
    background-size: 200% 200%;
    animation: dataFlow 3s ease infinite;
}

/* 脉冲动画 */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.6); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 扫描线动画 */
@keyframes scanLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tech-primary), transparent);
    animation: scanLine 3s linear infinite;
    pointer-events: none;
}

/* 数字滚动动画 */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 0.5s ease-out;
}

/* 悬浮上升效果 */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* AI分析加载动画 */
@keyframes aiThinking {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.ai-thinking span {
    animation: aiThinking 1.4s ease-in-out infinite;
}

.ai-thinking span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking span:nth-child(3) { animation-delay: 0.4s; }

/* 进度条动画 */
@keyframes progressFill {
    from { width: 0; }
}

.progress-animate {
    animation: progressFill 1.5s ease-out;
}

/* 科技感按钮 */
.tech-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

/* 数据标签 */
.data-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.data-tag-primary {
    background: rgba(0, 212, 255, 0.1);
    color: #0891b2;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.data-tag-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.data-tag-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.data-tag-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff, #7c3aed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0891b2, #6d28d9);
}

/* 选中文字颜色 */
::selection {
    background: rgba(0, 212, 255, 0.2);
    color: #0f172a;
}

/* 导航栏科技感 */
.nav-tech {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* AI徽章 */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: white;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

/* 胜率环形进度 */
.win-ring {
    transform: rotate(-90deg);
}

.win-ring circle {
    transition: stroke-dashoffset 1s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tech-number {
        font-size: 0.9em;
    }
}
