/* 
 * 核心样式文件 - 包含CSS变量和基础样式
 * 整合了原来分散在多个文件中的变量定义
 */

/* CSS变量定义 */
:root {
  /* 主题色彩变量 */
  --deep-space-1: #0a0a0a;
  --deep-space-2: #1a1a2e;
  --deep-space-3: #16213e;
  --deep-space-4: #0f3460;
  
  --neon-blue: #00d4ff;
  --neon-purple: #9d4edd;
  --neon-pink: #ff006e;
  --neon-cyan: #00ff88;
  
  /* 文字颜色 */
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #6c757d;
  
  /* 功能色 */
  --success-color: #22c55e;
  --success-hover: #16a34a;
  --warning-color: #ffaa00;
  --error-color: #ff4757;
  --error-hover-bg: rgba(255, 71, 87, 0.1);
  
  /* 基础色彩变量 */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  
  /* 功能色 - 页面特定 */
  --tools-color: #667eea;
  --data-analysis-color: #660066;
  --templates-color: #d6a9f0;
  
  /* 过渡时间 */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --transition-duration: 0.3s;
  
  /* 阴影和发光 */
  --shadow-neon-blue: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 30px #00d4ff;
  --shadow-neon-purple: 0 0 10px #9d4edd, 0 0 20px #9d4edd, 0 0 30px #9d4edd;
  --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* 全局基础样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* 链接基础样式 */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-normal) ease;
}

a:hover {
  color: var(--neon-blue);
}

/* 按钮基础样式 */
button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  font-family: inherit;
  transition: all var(--transition-normal) ease;
}

/* 通用快捷按钮样式 */
.btn-quick {
  padding: 12px 15px;
  background: transparent;
  color: var(--neon-blue);
  border: 2px solid rgba(0, 212, 255, 0.4);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: all var(--transition-normal) ease;
  width: auto;
  margin-top: 0;
}

.btn-quick:hover {
  background: rgba(0, 212, 255, 0.15);
  color: var(--neon-blue);
  border-color: var(--neon-blue);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(0, 212, 255, 0.25),
    0 0 15px rgba(0, 212, 255, 0.1);
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.3);
}

button:focus {
  outline: 2px solid var(--neon-blue);
  outline-offset: 2px;
}

/* 表单元素基础样式 */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 12px;
  transition: all var(--transition-normal) ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--neon-blue);
  outline: none;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* 滚动条基础样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-space-2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue) 100%);
}

/* 工具类 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-spin { animation: spin 1s linear infinite; }
.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s infinite; }

/* 通用容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 响应式容器 */
.container-fluid {
  width: 100%;
  padding: 0 20px;
}

/* 禁用状态 */
.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}