/* ============================================
 * 观鼎山首页 · 核心样式 core.css
 * 板块：核心
 * 包含：CSS变量、全局重置、布局、背景
 * ============================================ */

/* ---------- CSS 变量（昼夜双套） ---------- */
:root {
  /* 昼模式（默认不启用，留备用） */
  --bg-light: #faf6ee;
  --text-light: #2c2416;
  --border-light: #c0a86a;
  --palace-bg-light: rgba(255, 255, 255, 0.6);

  /* 夜模式（鼎哥指定默认） */
  --bg-dark: #0d0d1a;
  --text-dark: #c8d0e0;
  --border-dark: #5a6a9a;
  --palace-bg-dark: rgba(20, 24, 50, 0.6);

  /* 九宫模块颜色指纹（永不更改） */
  --c-xun: #4A90D9;   /* 巽4 古数学 蓝 */
  --c-li: #D4A843;    /* 离9 好运来 金 */
  --c-kun: #5BAE6E;   /* 坤2 双同源 绿 */
  --c-zhen: #45B5AA;  /* 震3 观鼎历 青 */
  --c-center: #8B6914;/* 中5 观鼎山 主金 */
  --c-dui: #E8914F;   /* 兑7 养生道 橙 */
  --c-gen: #7B61A5;   /* 艮8 玄机盘 紫 */
  --c-kan: #8B6B4A;   /* 坎1 择风水 棕 */
  --c-qian: #C85043;  /* 乾6 鼎商城 红 */

  /* 通用 */
  --radius: 16px;
  --radius-sm: 10px;
  --gap: 12px;
  --pad: 8px;
  --max-width: 680px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- 星空背景（暗色专属） ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(91, 106, 154, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(123, 97, 165, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(69, 181, 170, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* 星点 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(200, 208, 224, 0.7), transparent),
    radial-gradient(1px 1px at 25% 65%, rgba(200, 208, 224, 0.5), transparent),
    radial-gradient(1px 1px at 47% 32%, rgba(200, 208, 224, 0.6), transparent),
    radial-gradient(1px 1px at 68% 78%, rgba(200, 208, 224, 0.4), transparent),
    radial-gradient(1px 1px at 82% 15%, rgba(200, 208, 224, 0.6), transparent),
    radial-gradient(1px 1px at 92% 55%, rgba(200, 208, 224, 0.5), transparent),
    radial-gradient(2px 2px at 38% 88%, rgba(212, 168, 67, 0.4), transparent),
    radial-gradient(1px 1px at 55% 12%, rgba(200, 208, 224, 0.3), transparent);
  pointer-events: none;
  animation: gds-twinkle 8s ease-in-out infinite alternate;
}

@keyframes gds-twinkle {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

/* ---------- 主体布局 ---------- */
.gds-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* ---------- Slogan 轮播 ---------- */
.gds-slogan {
  text-align: center;
  padding: 8px 0;
  position: relative;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gds-slogan-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  opacity: 0.85;
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: absolute;
  white-space: nowrap;
}

.gds-slogan-text.gds-slogan-fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.gds-slogan-text.gds-slogan-fade-in {
  opacity: 0.85;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  .gds-main {
    padding: 20px 12px;
    gap: 18px;
  }
  .gds-slogan-text {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
  }
}