/* static/style.css */
:root {
    /* 核心色板 - 现代紫蓝渐变体系 */
    --primary-hue: 250;
    --primary: hsl(var(--primary-hue), 70%, 60%);
    --primary-dark: hsl(var(--primary-hue), 70%, 50%);
    --secondary: #00f2fe;
    --accent: #ff0080;
    
    /* 玻璃拟态背景色 */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* 文本颜色 */
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    /* 功能色 */
    --success: #48bb78;
    --error: #f56565;
    --warning: #ed8936;
    
    /* 布局变量 */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --header-height: 70px;
}

* { box-sizing: border-box; outline: none; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- 动态背景动画 --- */
.bg-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}
.orb-1 { width: 400px; height: 400px; background: #7f00ff; top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: #00d2ff; bottom: -50px; right: -50px; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: #ff0080; top: 40%; left: 40%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* --- 布局容器 --- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px;
}

/* --- 玻璃拟态卡片 (通用组件) --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* --- 导航栏 --- */
.nav-container {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.nav-item {
    text-decoration: none;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-item:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}
.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* --- 标题与文本 --- */
h1, h2, h3 { margin-top: 0; color: var(--text-main); }
header { text-align: center; margin-bottom: 40px; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
header h1 { font-size: 2.5rem; margin-bottom: 10px; color: white; }
header p { opacity: 0.9; font-size: 1.1rem; }

/* --- 表单元素 --- */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: #f0f4f8;
    font-size: 1rem;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 1rem;
    gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-secondary { background: #e2e8f0; color: var(--text-main); }
.btn-secondary:hover { background: #cbd5e0; }
.btn-danger { background: var(--error); color: white; }
.btn-block { width: 100%; }

/* --- 首页工具网格 --- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.tool-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}
.tool-card:hover::before { opacity: 1; }
.tool-icon { font-size: 2rem; margin-bottom: 15px; }
.tool-tags { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* --- 进度条 --- */
.progress-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin: 15px 0;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

/* --- 表格 --- */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.05); }
th { font-weight: 600; color: var(--text-muted); background: rgba(0,0,0,0.02); }
tr:hover td { background: rgba(255,255,255,0.5); }

/* --- 状态提示框 (Toast) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 15px; }
    .nav-links { justify-content: center; width: 100%; }
    .nav-item { padding: 6px 10px; font-size: 0.8rem; }
    .form-row { flex-direction: column; gap: 0; }
    header h1 { font-size: 1.8rem; }
}

/* --- 特定页面样式 --- */
/* 日志区域 */
.log-box {
    background: #1a1a2e;
    color: #48bb78;
    font-family: 'Consolas', monospace;
    padding: 15px;
    border-radius: var(--radius-sm);
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.9rem;
}
.log-error { color: #f56565; }
.log-info { color: #63b3ed; }

/* 统计卡片网格 */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-box {
    background: white;
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }