/* 统计页面主布局样式 */

.statistics-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2); /* 使用与station-list.html相同的渐变背景 */
  font-family: 'Noto Serif SC', serif;
  position: relative;
  color: #333333;
}


/* 移动端调整渐变色背景位置 */
@media (max-width: 768px) {
  .statistics-page::before {
    top: 120px; /* 移动端header高度 */
    height: calc(100% - 120px);
  }
}

@media (max-width: 480px) {
  .statistics-page::before {
    top: 110px; /* 小屏幕header高度 */
    height: calc(100% - 110px);
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .statistics-page::before {
    top: 100px; /* 横屏模式header高度 */
    height: calc(100% - 100px);
  }
}

.main-content {
  display: block !important;
  flex: none !important;
  padding: 10px !important; /* 与station-map.html一致 */
  max-width: 1500px !important; /* 与station-map.html一致 */
  margin: 0 auto !important;
  width: 100% !important;
  position: relative;
  z-index: 1;
}

/* 概览统计区域 */
.overview-section {
  margin-bottom: 30px;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.overview-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(240, 240, 240, 0.4), transparent);
  transition: left 0.6s ease;
}

.overview-card:hover::before {
  left: 100%;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.12),
    0 3px 10px rgba(0, 0, 0, 0.08);
  border-color: #e0e0e0;
}

.card-icon {
  font-size: 2.5rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

.overview-card:hover .card-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.3);
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333333;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 8px 0;
  line-height: 1.2;
  font-family: 'Noto Serif SC', serif;
}

.overview-card:hover .card-value {
  color: #1a252f;
}

.card-description {
  font-size: 0.9rem;
  color: #666666;
  margin: 0;
  font-weight: 400;
}

/* 图表区域 */
.charts-section {
  margin-bottom: 30px;
}

.charts-row {
  display: grid;
  gap: 25px;
  margin-bottom: 25px;
}

.chart-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4a90e2, #357abd);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chart-card:hover::before {
  opacity: 1;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.12),
    0 3px 10px rgba(0, 0, 0, 0.08);
  border-color: #e0e0e0;
}

.chart-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #333333;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.chart-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #4a90e2, #357abd);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.chart-card:hover h3::after {
  width: 60px;
}

.chart-container {
  width: 100%;
  height: 350px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

/* 图表加载动画 */
.chart-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-text {
  color: #666666;
  font-size: 0.9rem;
  font-weight: 500;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 图表加载完成后的状态 */
.chart-container.loaded .chart-loading {
  display: none;
}

/* 详细统计区域 */
.detailed-stats-section {
  margin-bottom: 30px;
}

.stats-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #666666;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
}

.tab-btn:hover {
  background: #f8f9fa;
  border-color: #4a90e2;
  color: #4a90e2;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.tab-content {
  display: none;
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导出区域 */
.export-section {
  margin-bottom: 30px;
}

.export-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  text-align: center;
}

.export-card h3 {
  margin: 0 0 25px 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333333;
  position: relative;
  padding-bottom: 15px;
}

.export-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #4a90e2, #357abd);
  border-radius: 1px;
}

.export-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.export-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 25px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #666666;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  font-family: 'Noto Serif SC', serif;
}

.export-btn:hover {
  background: #f8f9fa;
  border-color: #4a90e2;
  color: #4a90e2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.export-btn span:first-child {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.export-btn:hover span:first-child {
  transform: scale(1.1);
}

.export-btn span:last-child {
  font-size: 0.85rem;
  font-weight: 500;
}

/* 黄色分隔条 */
.yellowbar {
  border-bottom: 3px solid rgba(17, 82, 166, 0.8);
  margin: 10px 80px;
  position: relative;
  box-shadow: 
    0 4px 6px rgba(17, 82, 166, 0.1),
    0 1px 3px rgba(17, 82, 166, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: linear-gradient(
    to right,
    rgba(17, 82, 166, 0.1),
    rgba(17, 82, 166, 0.3)
  );
  animation: yellowbarGlow 3s ease-in-out infinite alternate;
}

.yellowbar::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(17, 82, 166, 0.8),
    transparent
  );
  opacity: 0.8;
  animation: yellowbarFlow 6s linear infinite;
}

@keyframes yellowbarGlow {
  0% {
    box-shadow: 
      0 4px 6px rgba(17, 82, 166, 0.1),
      0 1px 3px rgba(17, 82, 166, 0.08),
      inset 0 1px 1px rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 
      0 8px 12px rgba(17, 82, 166, 0.2),
      0 2px 6px rgba(17, 82, 166, 0.15),
      inset 0 2px 2px rgba(255, 255, 255, 0.15);
  }
}

@keyframes yellowbarFlow {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* 导航菜单样式 */
.sidebar-nav {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 9999 !important;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 15px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  backdrop-filter: blur(10px);
  cursor: move;
  user-select: none;
  transition: box-shadow 0.3s ease;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.sidebar-nav:hover {
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1);
}

.sidebar-nav.dragging {
  opacity: 0.8;
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.15);
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 15px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #666666;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
  font-family: 'Noto Serif SC', serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-btn:hover {
  background: #f8f9fa;
  border-color: #4a90e2;
  color: #4a90e2;
  transform: translateX(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.nav-btn span:first-child {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.nav-btn:hover span:first-child {
  transform: scale(1.1);
}

.nav-btn span:last-child {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* 表格样式 */
.stats-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  background: #ffffff;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-table th {
  background: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333333;
  border-bottom: 2px solid #e0e0e0;
}

.stats-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #666666;
}

.stats-table tbody tr:hover {
  background: #f8f9fa;
  transition: background 0.3s ease;
}

.table-cell-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-flag,
.affiliation-logo {
  width: 20px;
  height: 15px;
  object-fit: contain;
  border-radius: 2px;
}

.affiliation-logo {
  width: 24px;
  height: 18px;
}

/* 移除自定义footer样式，使用base.css中的footer样式 */
/* 确保footer字体与warehouse.html一致 */
footer {
  font-family: Arial, sans-serif;
} 