/* ════════════════════════════════════════════════════════════
   星核科技 · 案例展示页样式
   设计概念：轨道 / ORBIT
   ════════════════════════════════════════════════════════════ */

/* ── 定制预加载 ───────────────────────────────────────── */
.cases-preloader .preloader-label { color: var(--muted); }

/* ── HERO 轨道环 ─────────────────────────────────────── */
.cases-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 5rem) 0 6rem;
  overflow: hidden;
}
.cases-hero-bg {
  position: absolute;
  inset: -18% -10% -12% -10%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 远景星场 ── */
.orbit-stars {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

/* ════════════════════════════════════════════════════
   3D 轨道平面：perspective + rotateX(72deg)
   将正圆压为扁椭圆 —— 俯视的天体轨道投影
   倾角 72° ≈ 几乎从正上方看，轨道极扁
   ════════════════════════════════════════════════════ */
.orbit-plane {
  position: absolute;
  /* 正方形区域放满，让最大轨道圆不被裁 */
  width: 100vmin;
  height: 100vmin;
  transform-style: preserve-3d;
  transform:
    perspective(1800px)
    rotateX(72deg)
    rotateY(15deg)
    translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 单个轨道圈：正圆边框 */
.orbit-track {
  position: absolute;
  border-radius: 50%;
  border: 0.8px solid;
  border-color: rgba(53, 224, 255, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}
/* 中圈 */
.orbit-track:nth-child(2) {
  border-color: rgba(122, 92, 255, 0.10);
}
/* 外圈 */
.orbit-track-outer {
  border-color: rgba(122, 92, 255, 0.07);
  border-width: 0.6px;
}

/* 旋转器：绕自身中心旋转，带动子元素沿轨道运行 */
.orbit-rotor {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: orbit-revolve linear infinite;
  will-change: transform;
  /* 天体位于旋转器顶部：flex-start + justify-content: center */
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@keyframes orbit-revolve {
  to { transform: rotate(360deg); }
}

/* ── 轨道天体 ── */
.orbit-body {
  border-radius: 50%;
  flex-shrink: 0;
  /* 天体放在旋转器顶部边缘 → 因 flex-start，位于旋转器的最上方 */
}
.body-bright {
  background: radial-gradient(circle at 35% 35%, #ffffff, rgba(53,224,255,.85));
  box-shadow:
    0 0 6px rgba(53,224,255,.75),
    0 0 14px rgba(53,224,255,.40),
    0 0 28px rgba(53,224,255,.14);
}
.body-dim {
  background: radial-gradient(circle at 40% 40%, rgba(53,224,255,.75), rgba(122,92,255,.4));
  box-shadow: 0 0 4px rgba(53,224,255,.45), 0 0 10px rgba(122,92,255,.20);
}
.body-violet {
  background: radial-gradient(circle at 40% 40%, rgba(190,170,255,.9), rgba(122,92,255,.4));
  box-shadow: 0 0 5px rgba(122,92,255,.65), 0 0 12px rgba(122,92,255,.28);
}

/* ── 轨道渐入/渐出（下半轨淡出 → 远侧不可见）── */
.orbit-track::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background:
    conic-gradient(
      from -90deg,
      transparent 0deg,
      transparent 105deg,
      rgba(5,7,15,.45) 190deg,
      rgba(5,7,15,.72) 260deg,
      rgba(5,7,15,.45) 340deg,
      transparent 360deg
    );
  pointer-events: none;
}

/* ── 核心星体（2D 层级，不参与 3D 轨道）── */
.orbit-core {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  z-index: 2;
  animation: core-float 4.5s ease-in-out infinite;
}
.orbit-core-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #35E0FF 30%, #7A5CFF 65%, transparent 72%);
  box-shadow:
    0 0 16px rgba(53,224,255,.7),
    0 0 38px rgba(122,92,255,.4),
    0 0 64px rgba(53,224,255,.18);
  animation: core-pulse 2.8s ease-in-out infinite;
}
.orbit-core-halo {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,224,255,.14), transparent 68%);
  animation: core-halo 3.5s ease-in-out infinite;
}
/* 针尖闪光 */
.orbit-core-spark {
  position: absolute;
  top: 2px; left: 45%;
  width: 3px; height: 5px;
  border-radius: 2px;
  background: #fff;
  opacity: 0.8;
  transform: rotate(-30deg);
  animation: spark-glint 1.6s ease-in-out infinite;
}

@keyframes core-pulse {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.30); opacity: 1; }
}
@keyframes core-halo {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.6); opacity: 0.55; }
}
@keyframes core-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes spark-glint {
  0%, 70%, 100% { opacity: 0.1; transform: scale(.7) rotate(-30deg); }
  85% { opacity: 1; transform: scale(1.3) rotate(-30deg); }
}

/* ── 交叉光线（conic-gradient 弱射线，模拟星核发射的辐射能量）── */
.orbit-rays {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  z-index: 1;
  opacity: 0.45;
  background:
    conic-gradient(
      from 0deg,
      transparent 43%, rgba(53,224,255,.05) 44.5%, transparent 46%,
      transparent 88%, rgba(122,92,255,.04) 89.5%, transparent 91%,
      transparent 133%, rgba(53,224,255,.04) 134.5%, transparent 136%,
      transparent 178%, rgba(122,92,255,.05) 179.5%, transparent 181%,
      transparent 223%, rgba(53,224,255,.03) 224.5%, transparent 226%,
      transparent 268%, rgba(122,92,255,.04) 269.5%, transparent 271%,
      transparent 313%, rgba(53,224,255,.03) 314.5%, transparent 316%,
      transparent
    );
  animation: rays-rotate 42s linear infinite;
}
@keyframes rays-rotate { to { transform: rotate(360deg); } }

.cases-hero-inner { position: relative; z-index: 1; }
.cases-hero-tags { display: flex; gap: 1.5rem; margin-top: 2rem; }
.cases-hero-tags .mono-tag { color: var(--cyan); }

/* ── 筛选栏 ──────────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 800;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s;
}
.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.2rem 0;
}
.filter-label { color: var(--cyan); flex-shrink: 0; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.filter-pill {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.35s, color 0.35s, background-color 0.35s, box-shadow 0.35s;
}
.filter-pill:hover { border-color: var(--line-strong); color: var(--text); }
.filter-pill.active {
  border-color: transparent;
  background: var(--grad);
  color: #04060D;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(53, 224, 255, 0.3);
}

/* ── 案例网格 ─────────────────────────────────────────── */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.case-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.005));
  padding: 1.6rem;
  transition: border-color 0.4s, opacity 0.35s var(--ease-out),
              transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}
.case-card:hover { border-color: var(--line-strong); }
.case-card.filtering-out {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(3px);
  pointer-events: none;
}

/* 缩略图 */
.case-thumb {
  height: 160px;
  border-radius: 14px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  margin-bottom: 1.24rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.4s;
}
.case-card:hover .case-thumb { border-color: var(--line-strong); }

/* ── 抽象几何插画（每种类型一种形状组合） ── */
.thumb-shape { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 1rem; }

/* 小程序：手机屏 */
.thumb-shape-mp b {
  width: 64px; height: 100px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(53, 224, 255, 0.2), rgba(122, 92, 255, 0.15));
  border: 1.4px solid rgba(53, 224, 255, 0.35);
}
.thumb-shape-mp i {
  width: 14px; height: 4px;
  border-radius: 2px;
  background: var(--faint);
  transform: translateY(-40px);
}
.thumb-shape-mp i:nth-child(2) { opacity: 0.8; }
.thumb-shape-mp i:nth-child(3) { opacity: 0.5; width: 10px; }
.thumb-shape-mp i:nth-child(4) { opacity: 0.3; width: 8px; }
.thumb-shape-mp i:nth-child(5) { opacity: 0.15;width: 6px; }

/* Web 系统：列块 + 横条 */
.thumb-shape-web span {
  width: 70%; height: 10px;
  border-radius: 4px;
  background: var(--grad);
  opacity: 0.6;
}
.thumb-shape-web b {
  width: 30%; height: 60px;
  border-radius: 8px;
  background: rgba(53, 224, 255, 0.12);
  border: 1px solid rgba(53, 224, 255, 0.25);
}
.thumb-shape-web b:first-of-type { width: 38%; height: 60px; }
.thumb-shape-web b:last-of-type { width: 28%; }

/* 教育：圆 + 线 */
.thumb-shape-edu em {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(53,224,255,.25), rgba(122,92,255,.2));
}
.thumb-shape-edu i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.thumb-shape-edu b { width: 20%; height: 3px; border-radius: 2px; background: var(--line-strong); }

/* OA：四宫格 */
.thumb-shape-oa b {
  width: 35%; height: 50px;
  border-radius: 8px;
  background: rgba(122, 92, 255, 0.1);
  border: 1px solid rgba(122, 92, 255, 0.3);
}

/* AI：脉冲星 */
.thumb-shape-ai em {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,224,255,.5), transparent);
  animation: core-pulse 2.2s ease-in-out infinite;
}
.thumb-shape-ai i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.7;
}

/* 餐饮：矩形 + 圆点 */
.thumb-shape-food b {
  width: 68px; height: 80px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(53,224,255,.18), rgba(122,92,255,.12));
  border: 1.4px solid rgba(53,224,255,.28);
}
.thumb-shape-food i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }

/* 仪表盘：条 + 块 */
.thumb-shape-dash b {
  width: 40%; height: 24px;
  border-radius: 6px;
  background: rgba(53,224,255,.15);
  border: 1px solid rgba(53,224,255,.25);
}
.thumb-shape-dash span {
  width: 40%; height: 3px;
  border-radius: 2px;
  background: var(--grad);
  opacity: 0.6;
}

/* CMS：行块布局 */
.thumb-shape-cms b { width: 50%; height: 35px; border-radius: 8px; background: rgba(53,224,255,.1); border: 1px solid rgba(53,224,255,.25); }
.thumb-shape-cms i { width: 20%; height: 6px; border-radius: 3px; background: var(--line-strong); }
.thumb-shape-cms span { width: 30%; height: 4px; border-radius: 2px; background: var(--grad); opacity: 0.4; }

/* ── 案例卡片文字 ── */
.case-tag { color: var(--cyan); display: inline-block; margin-bottom: 0.5rem; }
.case-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.55rem; line-height: 1.35; }
.case-card > p { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.1rem; line-height: 1.6; min-height: 2.9em; }
.case-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.case-pills span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--faint);
  transition: border-color 0.3s, color 0.3s;
}
.case-card:hover .case-pills span { border-color: rgba(53, 224, 255, 0.3); color: var(--muted); }
.case-card::after {
  content: "查看详情 →";
  position: absolute;
  right: 1.6rem; bottom: 1.6rem;
  font-size: 0.82rem;
  color: var(--faint);
  transition: color 0.35s;
}
.case-card:hover::after { color: var(--cyan); }

/* ── Modal ────────────────────────────────────────────── */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  visibility: hidden;
  pointer-events: none;
}
.case-modal.open { visibility: visible; pointer-events: auto; }
.case-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.45s;
}
.case-modal.open .case-modal-bg { opacity: 1; }

.case-modal-inner {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--ink-2);
  padding: 2.4rem clamp(1.6rem, 3vw, 2.6rem);
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.case-modal.open .case-modal-inner { opacity: 1; transform: none; }

.case-modal-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ink-3);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, color 0.3s;
}
.case-modal-close:hover { border-color: var(--cyan); color: var(--cyan); }

.case-modal-thumb {
  height: 200px;
  border-radius: 14px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-modal-thumb .thumb-shape { gap: 14px; transform: scale(1.5); }

.case-modal-body { margin: 1.4rem 0 1.8rem; display: flex; flex-direction: column; gap: 1.2rem; }
.case-modal-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.case-modal-body p { color: var(--muted); font-size: 0.93rem; line-height: 1.7; }
.case-modal-body h4::before {
  content: "▸  ";
  color: var(--cyan);
}
.case-modal .case-modal-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.case-modal .case-modal-pills span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}

.case-modal-inner::-webkit-scrollbar { width: 6px; }
.case-modal-inner::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 3px; }

/* ── CTA 横幅 ─────────────────────────────────────────── */
.cta-band { text-align: center; border-top: 1px solid var(--line); }
.cta-band-inner { padding: 1rem 0; }

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .cases-hero { min-height: 60vh; }
}
@media (max-width: 768px) {
  .cases-grid { grid-template-columns: 1fr; }
  .filter-bar-inner { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .case-modal { padding: 1rem; }
  .case-modal-inner { padding: 1.6rem; }
}
@media (max-width: 560px) {
  .cases-hero { min-height: 58vh; }
  .filter-pills { width: 100%; }
  .filter-pill { flex: 1; text-align: center; font-size: 0.8rem; padding: 0.5rem 0.6rem; }
  .cta-band .btn { width: 100%; justify-content: center; }
}

/* ── 降级 ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring { animation: none !important; opacity: 0.35; }
  .orbit-core { animation: none; opacity: 0.5; }
  .case-card { transition: none !important; }
}
