/* ========================================================
   AI 平台大屏首页样式
   结构：变量与重置 -> 背景与舞台 -> 环形旋转标签 -> 标题文案与圈内数据指标
   ======================================================== */

:root {
  --orbit-radius: 340px;      /* 环形标签轨道半径，JS 会读取这个值来定位标签 */
  --glow-cyan: #4fd1ff;
  --glow-violet: #8b5cf6;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: radial-gradient(ellipse at 50% 40%, #0d1226 0%, #05060f 55%, #030308 100%);
  /* 桌面大屏下内容正好一屏放得下，不会出现滚动条；
     手机端缩小后如果内容仍然偏高，允许纵向滚动，横向依然锁死避免出现横向滚动条 */
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #e6ecff;
}

/* ---------- 粒子背景层 ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ---------- 舞台：居中承载环形标签与标题 ---------- */
.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  z-index: 1;
}

/* 环形引导线：一圈极细发光圆圈，标记标签所在轨道
   用 top/left 50% + translate(-50%,-50%) 显式居中，不依赖 flex 对绝对定位子元素的隐式居中 */
.orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--orbit-radius) * 2);
  height: calc(var(--orbit-radius) * 2);
  border-radius: 50%;
  border: 1px solid rgba(140, 170, 255, 0.18);
  box-shadow: 0 0 30px rgba(79, 209, 255, 0.08) inset,
              0 0 30px rgba(139, 92, 246, 0.08);
  transform: translate(-50%, -50%);
}

/* ---------- 环形旋转标签 ----------
   外层 .orbit-ring 整体持续旋转（纯 CSS，GPU 合成，流畅不卡顿）；
   每个标签的 .orbit-item 用内联 transform 摆到圆周上固定角度；
   .counter-spin 与外层同时长反向旋转，抵消整体自转，让文字始终水平可读。
*/
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  animation: spin-ring 100s linear infinite;
}

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* .orbit-item / .counter-spin 都显式设为 0x0：
   这样它们自身的 transform-origin（默认是自身盒子的中心）就精确落在
   圆周上的目标点，rotate()/translateY() 才会围绕这个点做正确的圆周运动，
   而不是围绕"标签卡片实际尺寸的中心"（那样标签会明显偏出轨道）。 */
.orbit-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}

/* 静态抵消层：抵消 .orbit-item 自身的固定角度（角度值由 JS 内联 style 写入）。
   没有这一层，每个标签会带着自己在圆周上所处的角度被永久性地倾斜/倒转——
   只有它和下面的 .counter-spin（抵消圆环持续自转）叠加，标签才会在任意
   时刻、任意位置都保持正面朝上。 */
.counter-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}

.counter-spin {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  animation: spin-ring-reverse 100s linear infinite;
}

@keyframes spin-ring-reverse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* 标签卡片：图标在上、名字在下，统一尺寸；名字过长（超过四五个字符的宽度）
   由 text-overflow: ellipsis 自动截断为省略号，悬停可通过 title 看完整名称。
   translate(-50%,-50%) 让卡片的几何中心正好落在圆周上的定位点，
   即卡片"骑在"轨道线上，而不是悬浮在轨道外侧。
   卡片本身不再描边，只做一个很淡的背景做视觉承托，边框只加在下面的 logo 徽标上。 */
.tag-pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 68px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  cursor: default;
}

/* logo 徽标：圆形描边容器，边框和发光都加在这里，而不是整个标签卡片上 */
.tag-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(140, 170, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 12px rgba(79, 209, 255, 0.18);
}

/* 图标：用真实品牌 SVG 作为 mask，统一染成主题色，保持视觉一致、简洁高级 */
.tag-icon {
  width: 16px;
  height: 16px;
  background-color: #cfe0ff;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tag-name {
  max-width: 60px;
  font-size: 11px;
  font-weight: 500;
  color: #d8e2ff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 中心标题文案 ---------- */
.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.hero-title {
  font-size: 76px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(90deg, var(--glow-cyan), var(--glow-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(79, 209, 255, 0.45))
          drop-shadow(0 0 36px rgba(139, 92, 246, 0.35));
  animation: title-glow 4s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% {
    filter: drop-shadow(0 0 18px rgba(79, 209, 255, 0.45))
            drop-shadow(0 0 36px rgba(139, 92, 246, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(79, 209, 255, 0.7))
            drop-shadow(0 0 50px rgba(139, 92, 246, 0.55));
  }
}

.hero-subtitle {
  margin-top: 22px;
  font-size: 20px;
  color: #9aa8d0;
  letter-spacing: 1px;
}

.hero-subtitle .hl {
  color: #cfe0ff;
  text-shadow: 0 0 12px rgba(79, 209, 255, 0.5);
  font-weight: 600;
}

/* “衡舟网络，连接数字未来”：比上面一行颜色更暗一些，并拉开一点间距，作为副标题下的弱化点缀 */
.hero-subtitle .tagline {
  display: block;
  margin-top: 14px;
  color: #5c6688;
}

/* ---------- 数据指标（圈内，位于 hero-copy 下方） ---------- */
.stats-bar {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 40px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--glow-cyan), var(--glow-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(79, 209, 255, 0.4));
}

.stat-label {
  margin-top: 6px;
  font-size: 15px;
  color: #8a95bd;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(140, 170, 255, 0.4), transparent);
}

/* ---------- 入口按钮 ---------- */
.enter-site-btn {
  /* .hero-copy 整体 pointer-events:none（纯展示文案），这里单独恢复以便可点击 */
  pointer-events: auto;
  display: inline-block;
  margin-top: 40px;
  padding: 14px 44px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #0b0e1f;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--glow-cyan), var(--glow-violet));
  box-shadow: 0 0 20px rgba(79, 209, 255, 0.35),
              0 0 40px rgba(139, 92, 246, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.enter-site-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(79, 209, 255, 0.55),
              0 0 56px rgba(139, 92, 246, 0.4);
}

/* ========================================================
   响应式：平板/手机
   核心思路是保留“旋转圆环”这个主视觉，只是把轨道半径、标签卡片、
   文案字号等按屏幕宽度整体等比缩小，标签数量也相应减少避免拥挤
   （具体减少多少由 script.js 里的 getVisibleModels() 控制）。
   ======================================================== */
@media (max-width: 768px) {
  :root {
    --orbit-radius: 190px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: 1px;
  }

  .hero-subtitle {
    margin-top: 12px;
    font-size: 13px;
  }

  .hero-subtitle .tagline {
    margin-top: 8px;
  }

  .stats-bar {
    margin-top: 18px;
    gap: 16px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-divider {
    height: 22px;
  }

  .enter-site-btn {
    margin-top: 18px;
    padding: 8px 24px;
    font-size: 13px;
  }

  .tag-pill {
    width: 52px;
    padding: 6px 3px;
    gap: 3px;
  }

  .tag-icon-badge {
    width: 24px;
    height: 24px;
  }

  .tag-icon {
    width: 13px;
    height: 13px;
  }

  .tag-name {
    max-width: 44px;
    font-size: 9px;
  }
}

@media (max-width: 420px) {
  :root {
    --orbit-radius: 128px;
  }

  .hero-title {
    font-size: 24px;
    letter-spacing: 0.5px;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .hero-subtitle .tagline {
    margin-top: 6px;
  }

  .stats-bar {
    margin-top: 14px;
    gap: 12px;
  }

  .stat-number {
    font-size: 17px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-divider {
    height: 18px;
  }

  .enter-site-btn {
    margin-top: 14px;
    padding: 7px 20px;
    font-size: 12px;
  }

  /* 轨道太小放不下"图标+文字"卡片了，这个尺寸下只保留圆形 logo 徽标，
     文字标签隐藏，靠 title 属性悬停/长按仍可看到完整名称 */
  .tag-pill {
    width: auto;
    padding: 0;
    background: none;
  }

  .tag-icon-badge {
    width: 26px;
    height: 26px;
  }

  .tag-icon {
    width: 14px;
    height: 14px;
  }

  .tag-name {
    display: none;
  }
}

/* ---------- ICP 备案号 ---------- */
.site-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 3;
  text-align: center;
  font-size: 12px;
}
.site-beian a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}
.site-beian a:hover {
  color: rgba(255, 255, 255, 0.8);
}
