/* ========================================
   FMO 西南集群 - 基础样式
   包含：CSS变量、重置、基础样式、动画
   ======================================== */

/* === CSS 变量 === */
:root {
    /* 主色调 */
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --accent-cyan: #22d3ee;
    --accent-purple: #8b5cf6;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --accent-red: #ef4444;
    --accent-orange: #f97316;

    /* 深色主题 */
    --bg-primary: #0a1628;
    --bg-secondary: #0f1e38;
    --bg-card: rgba(15, 30, 56, 0.7);
    --bg-card-hover: rgba(30, 58, 95, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(59, 130, 246, 0.2);
    --border-glow: rgba(34, 211, 238, 0.4);

    /* 玻璃拟态 */
    --glass-bg: rgba(15, 30, 56, 0.6);
    --glass-border: rgba(59, 130, 246, 0.15);
    --glass-blur: 16px;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.3);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 浅色主题 */
.light-mode {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(241, 245, 249, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(59, 130, 246, 0.2);
    --border-glow: rgba(59, 130, 246, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(59, 130, 246, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* 紫色主题（深色） */
.purple-mode {
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --accent-cyan: #c084fc;
    --accent-purple: #a855f7;
    --bg-primary: #1a1025;
    --bg-secondary: #241535;
    --bg-card: rgba(36, 21, 53, 0.7);
    --bg-card-hover: rgba(56, 30, 80, 0.8);
    --border-color: rgba(139, 92, 246, 0.25);
    --border-glow: rgba(192, 132, 252, 0.4);
    --glass-bg: rgba(36, 21, 53, 0.6);
    --glass-border: rgba(139, 92, 246, 0.15);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* 绿色主题（深色） */
.green-mode {
    --primary: #22c55e;
    --primary-light: #4ade80;
    --primary-dark: #16a34a;
    --accent-cyan: #34d399;
    --accent-green: #10b981;
    --bg-primary: #0a1a14;
    --bg-secondary: #0f2419;
    --bg-card: rgba(15, 36, 25, 0.7);
    --bg-card-hover: rgba(20, 50, 35, 0.8);
    --border-color: rgba(34, 197, 94, 0.25);
    --border-glow: rgba(52, 211, 153, 0.4);
    --glass-bg: rgba(15, 36, 25, 0.6);
    --glass-border: rgba(34, 197, 94, 0.15);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* 橙色主题（深色） */
.orange-mode {
    --primary: #f97316;
    --primary-light: #fb923c;
    --primary-dark: #ea580c;
    --accent-cyan: #fbbf24;
    --accent-orange: #f59e0b;
    --bg-primary: #1a1208;
    --bg-secondary: #251a0c;
    --bg-card: rgba(37, 26, 12, 0.7);
    --bg-card-hover: rgba(50, 35, 15, 0.8);
    --border-color: rgba(249, 115, 22, 0.25);
    --border-glow: rgba(251, 191, 36, 0.4);
    --glass-bg: rgba(37, 26, 12, 0.6);
    --glass-border: rgba(249, 115, 22, 0.15);
    --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* === 全局重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    position: relative;
    background: var(--bg-primary);
    transition: background var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* === 滚动条美化 === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* === 背景光晕装饰 === */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: floatGlow 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 30%;
    right: -80px;
    animation-delay: -7s;
}

.bg-glow-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.35;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
        opacity: 0.3;
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
        opacity: 0.28;
    }
}

.light-mode .bg-glow {
    opacity: 0.15;
}

/* === 玻璃拟态卡片 === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    margin-bottom: 20px;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
    opacity: 0.6;
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

/* === 渐变文字 === */
.title-glow {
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    text-shadow: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === 呼吸动画 === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes blinkGreen {
    0%, 100% {
        background: #22c55e;
        box-shadow: 0 0 6px #22c55e, 0 0 12px rgba(34, 197, 94, 0.5);
    }
    50% {
        background: #16a34a;
        box-shadow: 0 0 3px #22c55e, 0 0 6px rgba(34, 197, 94, 0.3);
    }
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

/* === 工具类 === */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

