/* 全局样式 */
:root {
  --primary: #0071e3;
  --secondary: #2997ff;
  --accent: #06c;
  --dark: #1d1d1f;
  --light: #fafafa;
  --gray: #86868b;
  --gradient: linear-gradient(90deg, #0071e3, #4285f4);
  --text-dark: #333333;
  --text-light: #666666;
  --bg-light: #f5f5f7;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: #ffffff;
}

/* Logo样式 */
.logo-icon {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}

.logo-icon::before {
  content: "🎮";
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

.slide-up {
  animation: slideUp 0.8s ease-in-out;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* 按钮样式 */
.btn-primary {
  background: var(--gradient);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.btn-outline {
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(0, 113, 227, 0.05);
  transform: translateY(-2px);
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 标题样式 */
.section-title {
  position: relative;
  margin-bottom: 2.5rem;
  font-weight: 600;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 1.5px;
}

.center-underline::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 页脚样式 */
footer {
  background: var(--light);
  color: var(--dark);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* 导航样式 */
.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
  text-decoration: none;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 100%;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #d1d1d6;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray);
}

/* 统计数字动画 */
.counter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
}

.counter:after {
  content: '+';
  position: absolute;
  font-size: 1.5rem;
  top: 0;
  right: -15px;
}

/* 进度条样式 */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

/* 功能网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-item {
  padding: 2rem;
  border-radius: 1rem;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* 数据中心背景网格 */
.bg-grid {
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* 脉冲动画效果 */
.pulse-animation {
  position: relative;
}

.pulse-animation::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background-color: rgba(74, 222, 128, 0.4);
  animation: pulse 2s infinite;
  z-index: -1;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* 语言切换 */
.lang-switcher {
  display: flex;
}

.lang-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.lang-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.lang-btn:last-child {
  border-radius: 0 4px 4px 0;
}

/* 页面切换动画 */
.page-transition {
  animation: fadeIn 0.5s ease-out;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* 数字滚动动画 */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-count {
  animation: countUp 1s ease-out forwards;
}

/* 折线图动画 */
@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.animated-path {
  animation: drawLine 2s ease-out forwards;
}

/* 过渡样式 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

/* 多语言支持 */
[lang="en"] .zh-content,
[lang="zh"] .en-content {
  display: none;
}

/* 无障碍性支持 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 打印样式 */
@media print {
  .no-print {
    display: none;
  }
}

/* 英雄标题透明黑边效果 - 单字符优化方案 */
.text-outline {
  color: transparent; /* 确保文字内部完全透明 */
  font-family: "Microsoft YaHei", "SimHei", sans-serif; /* 选择清晰的中文字体 */
  font-weight: 700; /* 增加中文字重 */
}

.text-outline-primary {
  color: transparent; /* 确保文字内部完全透明 */
  font-family: "Microsoft YaHei", "SimHei", sans-serif; /* 选择清晰的中文字体 */
  font-weight: 700; /* 增加中文字重 */
}

/* 单个字符的样式 */
.text-outline span, .text-outline-primary span {
  display: inline-block;
  margin: 0 2px; /* 稍微调小通用字符间距 */
  -webkit-text-stroke: 1px rgba(0,0,0,0.9); /* 进一步减小轮廓线粗细 */
  text-shadow: none; /* 无阴影 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: -webkit-text-stroke 0.2s ease; /* 添加平滑过渡效果 */
}

/* 为主色调文字设置特殊的轮廓色 */
.text-outline-primary span {
  -webkit-text-stroke: 1px var(--primary); /* 进一步减小轮廓线粗细 */
  transition: -webkit-text-stroke 0.2s ease, color 0.2s ease; /* 添加平滑过渡效果 */
  color: transparent !important; /* 改为透明填充 */
  -webkit-text-fill-color: transparent !important; /* Safari兼容 */
}

/* 中文和英文区分样式 */
html[lang="zh"] .text-outline span, 
html[lang="zh"] .text-outline-primary span {
  font-size: 1.1em; /* 中文字体更大 */
  -webkit-text-stroke: 1.2px rgba(0,0,0,0.9); /* 进一步减小中文粗轮廓 */
  margin: 0 0.5px; /* 中文字符间距再缩小 */
  line-height: 1.4; /* 增加行高避免中文重叠 */
}

html[lang="zh"] .text-outline-primary span {
  -webkit-text-stroke: 1.2px var(--primary); /* 使用主色轮廓 */
  color: transparent !important; /* 确保中文版也是透明填充 */
  -webkit-text-fill-color: transparent !important; /* Safari兼容 */
}

html[lang="en"] .text-outline span, 
html[lang="en"] .text-outline-primary span {
  font-size: 0.9em; /* 英文字体更小 */
  letter-spacing: -0.5px; /* 英文字母间距更紧凑 */
  margin: 0 0.5px; /* 英文字符间距调整 */
  font-family: "Segoe UI", "Arial", sans-serif; /* 更适合英文显示的字体 */
  line-height: 1.3; /* 增加行高避免英文重叠 */
}

html[lang="en"] .text-outline-primary span {
  -webkit-text-stroke: 0.8px var(--primary); /* 进一步减小英文轮廓粗细 */
  color: transparent !important; /* 确保英文版也是透明填充 */
  -webkit-text-fill-color: transparent !important; /* Safari兼容 */
}

/* VANTA动画效果相关样式 */
.vanta-canvas {
  position: absolute !important;
  z-index: 0 !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

#hero {
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

/* 确保float动画存在 */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation-name: float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* 为主色调文字在不同浏览器中兼容显示浅蓝色填充 */
.text-outline-primary {
  color: transparent; /* 确保文字内部完全透明 */
  font-family: "Microsoft YaHei", "SimHei", sans-serif; /* 选择清晰的中文字体 */
  font-weight: 700; /* 增加中文字重 */
}

/* 补充样式，确保浅蓝色文字在不同状态下都能正确显示 */
.text-outline-primary span {
  color: transparent !important; /* 使用!important确保覆盖其他可能的内联样式 */
  -webkit-text-fill-color: transparent !important; /* Safari兼容 */
  fill: transparent !important; /* SVG文本兼容 */
}

@-moz-document url-prefix() {
  /* Firefox特定样式 */
  .text-outline-primary span {
    text-shadow: none !important; /* Firefox替代方案 */
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(calc(-50% - 5px));
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.6);
} 