/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: 'Arial', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #ffffff;
  background-color: #03060f;
  background-image: radial-gradient(ellipse at 50% 25%, #14264f 0%, #0a1128 45%, #03060f 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 星空画布 */
#stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 加载页 */
#loader {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease;
}
#loader.hide { opacity: 0; pointer-events: none; }

.loader-text {
  font-size: clamp(2.4rem, 9vw, 5rem);
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  padding: 20px;
  background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #ff6b6b);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientMove 4s ease-in-out infinite;
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 固定任务栏 */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: #000000;
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 100;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.7s ease 0.25s,
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}
.navbar.show {
  opacity: 1;
  transform: translateY(0);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  z-index: 2;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 42px;
  list-style: none;
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 6px 2px;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, #48dbfb, #ff9ff3);
  transition: width 0.3s ease;
}
.nav-link:hover,
.nav-link.active { color: #ffffff; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* 主体内容入场 */
#content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s ease,
              transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 80px; /* 给固定任务栏留空间 */
}
#content.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hero 首屏（仅主页用） */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 40px;
  text-align: center;
}

.hero-title {
  display: grid;
  place-items: center;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 4px;
  cursor: pointer;
  user-select: none;
}

.normal-view,
.alt-view {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.6s ease;
}

.normal-view { opacity: 1; }
.alt-view { opacity: 0; pointer-events: none; }

.hero-title.alt .normal-view { opacity: 0; }
.hero-title.alt .alt-view { opacity: 1; pointer-events: auto; }

.hero-logo-img {
  height: 140px;
  width: auto;
  display: block;
  object-fit: contain;
}

.hero-divider {
  font-weight: 200;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.22);
}

.hero-sub {
  background: linear-gradient(90deg, #a8d8ff, #ffffff, #a8d8ff, #8fd0ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientMove 7s ease-in-out infinite;
}

.hero-desc {
  margin-top: 28px;
  font-size: 15px;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.42);
}

/* 卡片区（主页） */
.cards-section { padding-bottom: 110px; }

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.card-col {
  flex: 1 1 280px;
  display: flex;
}

.card {
  width: 100%;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 36px 30px 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(72, 219, 251, 0.55);
  box-shadow: 0 24px 60px rgba(72, 219, 251, 0.15);
}

.card-num {
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(72, 219, 251, 0.85);
  margin-bottom: 18px;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.card-desc {
  flex: 1;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 26px;
}

.card-more {
  align-self: flex-start;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.card-more:hover {
  color: #48dbfb;
  letter-spacing: 3px;
}

/* 通用内容区块（其他页面用） */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 32px;
}
.section-title {
  font-size: 32px;
  letter-spacing: 4px;
  margin-bottom: 40px;
  text-align: center;
}
.section-desc {
  font-size: 15px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-bottom: 40px;
}

/* 页脚 */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 24px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* 滚动渐显上浮 */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease,
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 720px) {
  .navbar { height: 56px; padding: 0 16px; }
  .nav-menu { gap: 16px; }
  .nav-link { font-size: 12.5px; letter-spacing: 0; }
  .nav-logo-img { height: 28px; }
  .hero-logo-img { height: 56px; }
  .cards { padding: 0 20px; gap: 20px; }
  .section { padding: 60px 20px; }
}