/* ESGAI Web应用 - 全局样式文件 */

/* 现代化主题颜色变量 */
:root {
  /* 主色调 - 深绿色系 */
  --primary-green: #065f46;
  --secondary-green: #047857;
  --accent-green: #10b981;
  --light-green: #d1fae5;
  --dark-green: #064e3b;
  
  /* 扩展色彩系统 */
  --color-blue: #3b82f6;
  --color-purple: #8b5cf6;
  --color-orange: #f59e0b;
  --color-red: #ef4444;
  --color-cyan: #06b6d4;
  --color-indigo: #6366f1;
  
  /* 渐变背景 */
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-hero: linear-gradient(135deg, #065f46 0%, #047857 50%, #10b981 100%);
  
  /* 文字颜色 */
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* 背景颜色 */
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  
  /* 边框颜色 */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-dark: #d1d5db;
  
  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* 圆角系统 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* 动画时长 */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
}

/* 现代化导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--duration-normal) ease;
}

.navbar-brand:hover {
  transform: translateY(-1px);
  color: #3b82f6;
}

.navbar-nav .nav-link {
  color: #64748b;
  font-weight: 500;
  transition: all var(--duration-normal) ease;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: #1e293b;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* 现代化工具卡片样式 */
.tool-card {
  background: var(--bg-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) ease;
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--duration-normal) ease;
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: var(--accent-green);
}

.tool-card-header {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.tool-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tool-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.tool-card-body {
  padding: 1.5rem;
}

.tool-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.tool-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  padding-left: 1.5rem;
}

.tool-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
}

.tool-features li:last-child {
  border-bottom: none;
}

/* 现代化按钮样式 */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: var(--text-white);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--duration-normal) ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.btn-primary::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 var(--duration-slow) ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  filter: brightness(1.1);
  color: var(--text-white);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--duration-normal) ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--duration-normal) ease;
  z-index: -1;
}

.btn-outline:hover::before {
  width: 100%;
}

.btn-outline:hover {
  color: var(--text-white);
  border-color: var(--accent-green);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* 表单样式 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* 卡片容器样式 */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  background: var(--bg-light);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 1.5rem;
}

/* 进度条样式 */
.progress {
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent-green), var(--secondary-green));
  height: 100%;
  transition: width 0.3s ease;
}

/* 专家页面样式 */
.expert-header {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.expert-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  margin: 0 auto 1rem;
  display: block;
  object-fit: cover;
}

.expert-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.expert-title {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.expert-intro {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-green);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--accent-green);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--accent-green);
}

.timeline-year {
  font-weight: 700;
  color: var(--primary-green);
  font-size: 0.9rem;
}

.timeline-content {
  margin-top: 0.5rem;
}

/* 成就展示样式 */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.achievement-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(6, 95, 70, 0.15);
}

.achievement-icon {
  font-size: 2rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
}

.achievement-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.achievement-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .tool-card {
    margin-bottom: 1.5rem;
  }
  
  .expert-name {
    font-size: 1.5rem;
  }
  
  .achievement-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline {
    padding-left: 1rem;
  }
  
  .timeline:before {
    left: 0.25rem;
  }
  
  .timeline-item {
    padding-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .tool-card-header {
    padding: 1rem;
  }
  
  .tool-card-body {
    padding: 1rem;
  }
  
  .expert-header {
    padding: 2rem 0;
  }
  
  .expert-avatar {
    width: 80px;
    height: 80px;
  }
}

/* 无障碍样式 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 焦点样式 */
*:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--accent-green);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== 现代化增强样式 ==================== */

/* 现代化动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* 加载动画 */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* 工具卡片动画 */
.tool-card {
  animation: fadeInUp 0.6s ease-out;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }

/* 悬停效果增强 */
.tool-card:hover .tool-icon {
  animation: pulse 1s infinite;
}

/* 数据可视化增强 */
.chart-container {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: all var(--duration-normal) ease;
}

.chart-container:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* 状态指示器 */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 进度条样式 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

/* 现代化表单增强 */
.form-control {
  transition: all var(--duration-normal) ease;
  border: 2px solid var(--border-light);
}

.form-control:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

/* 数据表格增强 */
.data-table {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.data-table th {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
  font-weight: 600;
  color: var(--text-dark);
  padding: 1rem;
  border-bottom: 2px solid var(--border-light);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--duration-fast) ease;
}

.data-table tr:hover td {
  background: rgba(16, 185, 129, 0.02);
}

/* 通知系统增强 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  animation: slideInLeft 0.3s ease-out;
  max-width: 400px;
}

.notification-success {
  background: var(--bg-white);
  border-left: 4px solid var(--accent-green);
  color: var(--text-dark);
}

.notification-error {
  background: var(--bg-white);
  border-left: 4px solid var(--color-red);
  color: var(--text-dark);
}

.notification-warning {
  background: var(--bg-white);
  border-left: 4px solid var(--color-orange);
  color: var(--text-dark);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
  .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tool-card {
    margin-bottom: 1rem;
  }
  
  .btn-primary, .btn-outline {
    width: 100%;
    text-align: center;
  }
  
  .chart-container {
    padding: 1rem;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .tool-card-header {
    padding: 1rem;
  }
  
  .tool-card-body {
    padding: 1rem;
  }
  
  .btn-primary, .btn-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .chart-container {
    padding: 0.75rem;
  }
}
