/* ============================================================
   吉隆集团 · 星空星云视觉设计系统 v1.0
   Starry Sky Design System — Shared CSS
   适用: jilong.es / energiarea.es / jilong.one / jilong.ai / jimi.uno / erp.jimi.uno
   ============================================================ */

/* ---------- CSS 变量 / 设计令牌 ---------- */
:root {
  /* 背景层 */
  --bg-deep-space: #050510;
  --bg-space: #0a0a1a;
  --bg-space-2: #0d1033;
  --bg-space-3: #141440;

  /* 星云渐变 */
  --nebula-purple: linear-gradient(135deg, #1a0533 0%, #2d1b69 50%, #0a0a1a 100%);
  --nebula-blue: linear-gradient(135deg, #0a1628 0%, #1a3a6e 50%, #0a0a1a 100%);
  --nebula-pink: linear-gradient(135deg, #2d0a2e 0%, #6b1d5e 40%, #1a0533 100%);
  --nebula-cyan: linear-gradient(135deg, #0a1a2e 0%, #0d4f6e 50%, #0a0a1a 100%);
  --galaxy-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

  /* 强调色 */
  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-gold: #fbbf24;
  --accent-pink: #ec4899;
  --accent-green: #10b981;

  /* 文字色 */
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8d;
  --text-accent: #00d4ff;

  /* 边框/玻璃 */
  --border-glow: rgba(0, 212, 255, 0.2);
  --glass-bg: rgba(20, 20, 64, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* 排版 */
  --font-sans: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 阴影 */
  --shadow-glow-cyan: 0 0 30px rgba(0, 212, 255, 0.15);
  --shadow-glow-purple: 0 0 30px rgba(168, 85, 247, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ---------- 全局重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-space);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-purple); }

img { max-width: 100%; height: auto; display: block; }

/* ---------- 星空背景 ---------- */
.starry-bg {
  position: relative;
  background: var(--bg-space);
  overflow: hidden;
  min-height: 100vh;
}

/* 星点层 */
.starry-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #ffffff, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, #ffffff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 160px 120px, #ffffff, transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 250px 150px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 300px 100px, rgba(255,255,255,0.5), transparent);
  background-size: 320px 200px;
  animation: star-twinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* 星云叠加层 */
.starry-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(102, 126, 234, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.10), transparent),
    radial-gradient(ellipse 50% 30% at 50% 80%, rgba(0, 212, 255, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

/* 内容层确保在星空之上 */
.starry-bg > * { position: relative; z-index: 1; }

@keyframes star-twinkle {
  0% { opacity: 0.6; }
  50% { opacity: 0.9; }
  100% { opacity: 1; }
}

/* 星云变体 - 各站点可选用 */
.nebula-purple-bg { background: var(--nebula-purple); }
.nebula-blue-bg { background: var(--nebula-blue); }
.nebula-pink-bg { background: var(--nebula-pink); }
.nebula-cyan-bg { background: var(--nebula-cyan); }

/* ---------- 玻璃卡片 ---------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--galaxy-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}
.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: var(--shadow-glow-cyan);
  color: var(--accent-cyan);
}

.btn-gold {
  background: var(--accent-gold);
  color: #1a1a2e;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(251, 191, 36, 0.4);
  color: #1a1a2e;
}

/* ---------- 导航栏 ---------- */
.navbar-starry {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.navbar-starry.scrolled {
  border-bottom-color: var(--border-glow);
  background: rgba(10, 10, 26, 0.9);
}
.navbar-starry .nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-starry .nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--galaxy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-starry .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.navbar-starry .nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}
.navbar-starry .nav-links a:hover { color: var(--accent-cyan); }

/* ---------- Hero 区域 ---------- */
.hero-starry {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}
.hero-starry h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero-starry h1 .gradient-text {
  background: var(--galaxy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-starry .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
}
.hero-starry .hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 章节标题 ---------- */
.section-starry {
  padding: 80px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-starry .section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.section-starry .section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ---------- 网格布局 ---------- */
.grid-starry {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- 页脚 ---------- */
.footer-starry {
  background: var(--bg-deep-space);
  border-top: 1px solid var(--glass-border);
  padding: 60px 24px 30px;
  position: relative;
}
.footer-starry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--galaxy-gradient);
  opacity: 0.5;
}
.footer-starry .footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-starry .footer-col h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-starry .footer-col ul { list-style: none; }
.footer-starry .footer-col li { margin-bottom: 8px; }
.footer-starry .footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-starry .footer-col a:hover { color: var(--accent-cyan); }
.footer-starry .footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- 银河渐变文字 ---------- */
.gradient-text {
  background: var(--galaxy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .navbar-starry .nav-links { display: none; }
  .hero-starry { padding: 100px 16px 60px; }
  .section-starry { padding: 60px 16px; }
  .glass-card { padding: 20px; }
  .btn { padding: 10px 20px; font-size: 0.9rem; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-space); }
::-webkit-scrollbar-thumb { background: var(--bg-space-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* 选中文字 */
::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }
