/* ========== 变量 ========== */
:root {
  --bg: #12101c;
  --bg-soft: #1a1628;
  --card: #221c36;
  --card-hover: #2a2344;
  --text: #f3f0ff;
  --muted: #a69cc4;
  --lavender: #a78bfa;
  --lavender-soft: rgba(167, 139, 250, 0.25);
  --moon: #fde68a;
  --moon-dim: #fbbf24;
  --pink-glow: rgba(244, 114, 182, 0.15);
  --font: "Noto Sans SC", system-ui, sans-serif;
  --font-display: "ZCOOL KuaiLe", "Noto Sans SC", cursive;
  --r: 16px;
  --r-sm: 12px;
  --max: 1080px;
}

/* ========== 动效 ========== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-soft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes moon-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.06);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes title-shine {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ========== 基础 ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--lavender);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 700;
}

.wrap {
  width: min(100% - 36px, var(--max));
  margin-inline: auto;
}

/* 星空背景层 */
.stars {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 72% 18%, rgba(253, 230, 138, 0.4), transparent),
    radial-gradient(1px 1px at 88% 80%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 45% 40%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 55% 90%, rgba(167, 139, 250, 0.4), transparent);
  animation: twinkle 5s ease-in-out infinite;
}

/* ========== 头部 ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
  background: rgba(18, 16, 28, 0.88);
  backdrop-filter: blur(14px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand span {
  color: var(--moon);
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 26px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn-moon {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  color: #1c1530;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35);
}

.btn-moon:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--lavender-soft);
}

.btn-outline:hover {
  border-color: var(--lavender);
  color: var(--lavender);
}

.btn-wide {
  width: 100%;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 10vw, 88px) 0 clamp(56px, 8vw, 80px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 85% 15%, rgba(167, 139, 250, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 70%, rgba(251, 191, 36, 0.08), transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, var(--pink-glow), transparent 55%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr minmax(280px, 380px);
  }
}

.hero-text > * {
  animation: fade-up 0.75s ease backwards;
}

.hero-text .badge {
  animation-delay: 0.05s;
}

.hero-text h1 {
  animation-delay: 0.1s;
}

.hero-text .lead {
  animation-delay: 0.18s;
}

.hero-text .hero-btns {
  animation-delay: 0.24s;
}

.hero-text .hero-tags {
  animation-delay: 0.3s;
}

.badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--moon);
  background: rgba(253, 230, 138, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.25);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.title-accent {
  display: inline-block;
  background: linear-gradient(100deg, var(--lavender), #e9d5ff 40%, var(--moon-dim), var(--lavender));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shine 8s ease infinite;
}

.lead {
  margin: 0 0 26px;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-tags li {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--card);
  border-radius: var(--r-sm);
  border: 1px solid rgba(167, 139, 250, 0.15);
}

.hero-art-wrap {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  animation: fade-up 0.85s ease 0.12s backwards, float-soft 6s ease-in-out 0.8s infinite;
}

.moon-glow {
  position: absolute;
  inset: -8%;
  background: radial-gradient(circle at 75% 28%, rgba(253, 230, 138, 0.2), transparent 55%);
  border-radius: 24px;
  animation: moon-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

.hero-svg {
  position: relative;
  border-radius: var(--r);
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* ========== 区块通用 ========== */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(52px, 7vw, 88px) 0;
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid rgba(167, 139, 250, 0.08);
}

.sec-title {
  text-align: center;
  margin-bottom: 40px;
  animation: fade-up 0.65s ease backwards;
}

.sec-title-left {
  text-align: left;
}

.sec-title h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.sec-title p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  margin-inline: auto;
}

.sec-title-left p {
  margin-inline: 0;
}

/* ========== 关于卡片 ========== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.about-card {
  padding: 26px 24px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid rgba(167, 139, 250, 0.12);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: fade-up 0.65s ease backwards;
}

.about-card:nth-child(1) {
  animation-delay: 0.08s;
}

.about-card:nth-child(2) {
  animation-delay: 0.14s;
}

.about-card:nth-child(3) {
  animation-delay: 0.2s;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.about-ico {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lavender);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.about-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ========== 玩法列表 ========== */
.mode-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
}

.mode-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 24px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid rgba(167, 139, 250, 0.1);
  transition: border-color 0.2s, transform 0.2s;
  animation: fade-up 0.6s ease backwards;
}

.mode-item:nth-child(1) {
  animation-delay: 0.06s;
}

.mode-item:nth-child(2) {
  animation-delay: 0.12s;
}

.mode-item:nth-child(3) {
  animation-delay: 0.18s;
}

.mode-item:hover {
  border-color: rgba(253, 230, 138, 0.25);
  transform: translateX(4px);
}

.mode-item img {
  flex-shrink: 0;
}

.mode-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.mode-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ========== 活动卡片 ========== */
.event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.event-card {
  padding: 24px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid rgba(167, 139, 250, 0.12);
  transition: transform 0.25s, border-color 0.25s;
  animation: fade-up 0.65s ease backwards;
}

.event-card:nth-child(1) {
  animation-delay: 0.06s;
}

.event-card:nth-child(2) {
  animation-delay: 0.12s;
}

.event-card:nth-child(3) {
  animation-delay: 0.18s;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.35);
}

.event-card time {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--moon-dim);
}

.event-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ========== 加入 ========== */
.join {
  border-top: 1px solid rgba(167, 139, 250, 0.1);
}

.join-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 800px) {
  .join-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.join-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.join-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  color: var(--muted);
  font-size: 0.95rem;
}

.join-list strong {
  display: inline-block;
  min-width: 5em;
  color: var(--lavender);
  font-weight: 600;
}

.join-form {
  padding: 28px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid rgba(167, 139, 250, 0.15);
}

.join-form label {
  display: block;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.join-form input,
.join-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.2s;
}

.join-form input:focus,
.join-form textarea:focus {
  border-color: var(--lavender);
}

.join-form textarea {
  resize: vertical;
  min-height: 88px;
}

/* ========== 页脚 ========== */
.footer {
  position: relative;
  z-index: 1;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
  background: #0e0c16;
}

.footer-inner {
  text-align: center;
}

.footer-name {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--muted);
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(166, 156, 196, 0.55);
}

/* ========== 响应式 ========== */
@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .header .btn-moon {
    padding: 9px 16px;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
