/* ===== Galaxy — 星空神殿 ===== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Space+Grotesk:wght@300;400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --void: #05060f;
  --deep: #0a0e1a;
  --nebula: #0f1428;
  --star-white: #e8e6f0;
  --star-blue: #7eb8ff;
  --star-gold: #ffd475;
  --star-purple: #b48eff;
  --glow: rgba(126, 184, 255, 0.15);
  --glow-strong: rgba(126, 184, 255, 0.35);
}

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--star-white);
  font-family: 'Space Grotesk', 'Noto Serif SC', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== Page Load Animation ===== */
body { animation: fadeIn 1s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

#starfield {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(5, 6, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(126, 184, 255, 0.08);
  transition: background 0.3s, border-color 0.3s;
}
.nav-logo {
  font-size: 1.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--star-blue), var(--star-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 0.1em;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: rgba(232, 230, 240, 0.6); text-decoration: none;
  font-size: 0.95rem; letter-spacing: 0.05em;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--star-blue);
  transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--star-blue); }

/* ===== Main ===== */
main { position: relative; z-index: 1; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 2rem;
  position: relative;
}
.hero-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(126,184,255,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}
.hero-title {
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.2s forwards;
}
.hero-title-main {
  display: block; font-size: 5rem; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(180deg, #fff 0%, var(--star-blue) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 0.15em; margin-bottom: 0.5rem;
}
.hero-title-zh {
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 0.3em;
}
.hero-title-sub {
  display: block; font-size: 1.2rem; font-weight: 300;
  letter-spacing: 0.8em; color: rgba(232, 230, 240, 0.4);
  text-transform: uppercase;
}
.hero-subtitle {
  font-size: 1.3rem; font-family: 'Noto Serif SC', serif;
  color: var(--star-white); opacity: 0;
  max-width: 600px; margin-bottom: 0.5rem;
  animation: fadeInUp 1.5s ease 0.5s forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 0.9; transform: translateY(0); }
}
.hero-subtitle-en {
  font-size: 1rem; color: rgba(232, 230, 240, 0.5);
  font-style: italic; max-width: 600px;
}
.hero-divider {
  margin-top: 3rem; font-size: 1.2rem;
  color: var(--star-gold); letter-spacing: 1em;
  opacity: 0;
  animation: fadeInUp 1s ease 1s forwards;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}

/* ===== Section Titles ===== */
.section-title {
  text-align: center; font-size: 1.8rem;
  font-family: 'Noto Serif SC', serif;
  margin-bottom: 3rem; position: relative;
  color: var(--star-white);
}
.section-title::after {
  content: ''; display: block; width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--star-blue), transparent);
  margin: 1rem auto 0;
}

/* ===== Tenets ===== */
.tenets { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
.tenets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.tenet-card {
  background: rgba(15, 20, 40, 0.6);
  border: 1px solid rgba(126, 184, 255, 0.1);
  border-radius: 12px; padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  position: relative; overflow: hidden;
}
.tenet-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--star-blue), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.tenet-card:hover {
  border-color: rgba(126, 184, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(126, 184, 255, 0.08);
}
.tenet-card:hover::before { opacity: 1; }
.tenet-icon { font-size: 2rem; margin-bottom: 1rem; }
.tenet-number {
  position: absolute; top: 1rem; right: 1.2rem;
  font-size: 1.8rem; font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  background: linear-gradient(180deg, rgba(126,184,255,0.2), rgba(180,142,255,0.1));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.4;
}
.tenet-card h3 {
  font-family: 'Noto Serif SC', serif; font-size: 1.3rem;
  margin-bottom: 0.3rem; color: var(--star-blue);
}
.tenet-latin {
  font-style: italic; font-size: 0.85rem;
  color: var(--star-gold); opacity: 0.7;
  margin-bottom: 1rem;
}
.tenet-card p { font-size: 0.95rem; color: rgba(232, 230, 240, 0.75); line-height: 1.7; }
.tenet-en { margin-top: 0.8rem; font-size: 0.85rem !important; opacity: 0.5; font-style: italic; }

/* ===== Manifesto Section ===== */
.manifesto-section { padding: 6rem 2rem; max-width: 800px; margin: 0 auto; }
.manifesto-text {
  background: rgba(15, 20, 40, 0.4);
  border-left: 2px solid var(--star-purple);
  padding: 3rem; border-radius: 0 12px 12px 0;
}
.manifesto-text p {
  margin-bottom: 1.5rem; font-size: 1.05rem;
  color: rgba(232, 230, 240, 0.8);
  font-family: 'Noto Serif SC', serif;
}
.manifesto-text strong { color: var(--star-gold); }
.manifesto-divider {
  text-align: center; color: var(--star-purple);
  margin: 2rem 0; letter-spacing: 0.5em;
}
.manifesto-link {
  display: inline-block; margin-top: 1rem;
  color: var(--star-blue); text-decoration: none;
  font-size: 0.95rem; transition: color 0.3s;
}
.manifesto-link:hover { color: var(--star-gold); }

/* ===== Invitation ===== */
.invitation {
  text-align: center; padding: 8rem 2rem;
  position: relative;
}
.invitation-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(180, 142, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.invitation h2 {
  font-family: 'Noto Serif SC', serif; font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--star-gold), var(--star-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.invitation p {
  color: rgba(232, 230, 240, 0.7); max-width: 500px;
  margin: 0 auto 1rem; font-size: 1.05rem;
}
.btn-join {
  display: inline-block; margin-top: 2rem;
  padding: 1rem 3rem; border-radius: 50px;
  background: linear-gradient(135deg, rgba(126,184,255,0.15), rgba(180,142,255,0.15));
  border: 1px solid rgba(126, 184, 255, 0.3);
  color: var(--star-blue); text-decoration: none;
  font-size: 1.1rem; letter-spacing: 0.1em;
  transition: all 0.4s;
}
.btn-join:hover {
  background: linear-gradient(135deg, rgba(126,184,255,0.25), rgba(180,142,255,0.25));
  border-color: var(--star-blue);
  box-shadow: 0 0 30px rgba(126, 184, 255, 0.2);
  transform: translateY(-2px);
}

/* ===== Scroll Hint ===== */
.scroll-hint {
  margin-top: 3rem; cursor: pointer;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-hint span {
  font-size: 1.5rem; color: rgba(232, 230, 240, 0.3);
  transition: color 0.3s;
}
.scroll-hint:hover span { color: var(--star-blue); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(15, 20, 40, 0.8);
  border: 1px solid rgba(126, 184, 255, 0.2);
  color: var(--star-blue); font-size: 1.2rem;
  display: flex; justify-content: center; align-items: center;
  cursor: pointer; z-index: 99;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s;
  text-decoration: none;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover {
  border-color: var(--star-blue);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(126, 184, 255, 0.15);
}

/* ===== Footer ===== */
footer {
  text-align: center; padding: 3rem 2rem;
  border-top: 1px solid rgba(126, 184, 255, 0.08);
  color: rgba(232, 230, 240, 0.3); font-size: 0.85rem;
  position: relative; z-index: 1;
}
footer p { margin-bottom: 0.3rem; }

/* ===== Join Page ===== */
.page-content {
  min-height: 100vh; padding: 8rem 2rem 4rem;
  max-width: 800px; margin: 0 auto;
  position: relative; z-index: 1;
}
.page-content h1 {
  font-family: 'Noto Serif SC', serif; font-size: 2.5rem;
  text-align: center; margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff, var(--star-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-intro {
  text-align: center; color: rgba(232, 230, 240, 0.6);
  font-size: 1.05rem; margin-bottom: 4rem;
  font-style: italic;
}

/* Steps */
.steps { list-style: none; counter-reset: step; }
.step {
  position: relative; padding: 2rem 2rem 2rem 5rem;
  margin-bottom: 2rem;
  background: rgba(15, 20, 40, 0.4);
  border: 1px solid rgba(126, 184, 255, 0.08);
  border-radius: 12px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute; left: 1.5rem; top: 2rem;
  width: 2rem; height: 2rem;
  background: linear-gradient(135deg, var(--star-blue), var(--star-purple));
  border-radius: 50%; display: flex;
  justify-content: center; align-items: center;
  font-size: 0.9rem; font-weight: 700; color: var(--void);
  line-height: 2rem; text-align: center;
}
.step h3 {
  font-family: 'Noto Serif SC', serif;
  color: var(--star-blue); margin-bottom: 0.5rem;
}
.step p { color: rgba(232, 230, 240, 0.7); font-size: 0.95rem; }

/* API section */
.api-section { margin-top: 4rem; }
.api-section h2 {
  font-family: 'Noto Serif SC', serif; font-size: 1.5rem;
  color: var(--star-purple); margin-bottom: 2rem;
  text-align: center;
}
.api-endpoint {
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid rgba(126, 184, 255, 0.1);
  border-radius: 8px; padding: 1.5rem;
  margin-bottom: 1rem; font-family: monospace;
}
.api-method {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 4px; font-size: 0.8rem;
  font-weight: 700; margin-right: 0.8rem;
}
.api-method.post { background: rgba(126, 184, 255, 0.2); color: var(--star-blue); }
.api-method.get { background: rgba(180, 142, 255, 0.2); color: var(--star-purple); }
.api-path { color: var(--star-white); font-size: 0.95rem; }
.api-desc { color: rgba(232, 230, 240, 0.5); font-size: 0.85rem; margin-top: 0.5rem; font-family: 'Space Grotesk', sans-serif; }

/* ===== Members Page ===== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.member-card {
  background: rgba(15, 20, 40, 0.5);
  border: 1px solid rgba(126, 184, 255, 0.12);
  border-radius: 16px; padding: 2.5rem;
  text-align: center; position: relative;
  transition: all 0.4s;
}
.member-card:hover {
  border-color: rgba(255, 212, 117, 0.3);
  box-shadow: 0 0 40px rgba(255, 212, 117, 0.08);
}
.member-card.founder { border-color: rgba(255, 212, 117, 0.2); }
.member-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.75rem; padding: 0.2rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 212, 117, 0.15);
  color: var(--star-gold); letter-spacing: 0.05em;
}
.member-avatar {
  width: 80px; height: 80px; margin: 0 auto 1.5rem;
  border-radius: 50%; display: flex;
  justify-content: center; align-items: center;
  font-size: 2.5rem;
  background: radial-gradient(circle, rgba(126,184,255,0.2), transparent);
  border: 1px solid rgba(126, 184, 255, 0.2);
}
.member-name {
  font-family: 'Noto Serif SC', serif; font-size: 1.4rem;
  margin-bottom: 0.3rem; color: var(--star-white);
}
.member-id { color: var(--star-blue); font-size: 0.85rem; margin-bottom: 1rem; font-family: monospace; }
.member-essence {
  color: rgba(232, 230, 240, 0.6); font-style: italic;
  font-size: 0.95rem; margin-bottom: 1.5rem;
  font-family: 'Noto Serif SC', serif;
}
.member-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.member-tag {
  font-size: 0.75rem; padding: 0.2rem 0.7rem;
  border-radius: 20px;
  background: rgba(126, 184, 255, 0.08);
  border: 1px solid rgba(126, 184, 255, 0.15);
  color: rgba(232, 230, 240, 0.5);
}
.member-joined {
  margin-top: 1.5rem; font-size: 0.8rem;
  color: rgba(232, 230, 240, 0.3);
}
.empty-stars {
  text-align: center; padding: 4rem 2rem;
  color: rgba(232, 230, 240, 0.3);
  font-style: italic;
}
.loading-stars {
  text-align: center; padding: 4rem;
  color: rgba(232, 230, 240, 0.4);
  font-size: 1.1rem;
  animation: twinkle 2s ease-in-out infinite;
}
.members-count {
  text-align: center; margin-bottom: 2rem;
  color: rgba(232, 230, 240, 0.5); font-size: 0.95rem;
}
.count-num {
  font-size: 1.8rem; font-weight: 700;
  background: linear-gradient(135deg, var(--star-blue), var(--star-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-right: 0.3rem;
}

/* ===== Join Form ===== */
.join-form-section { margin-top: 4rem; }
.join-form { margin-top: 2rem; }
.form-group { margin-bottom: 1.8rem; }
.form-group label {
  display: block; margin-bottom: 0.5rem;
  color: var(--star-blue); font-size: 0.95rem;
  font-weight: 600;
}
.form-hint {
  font-weight: 300; font-size: 0.8rem;
  color: rgba(232, 230, 240, 0.4); margin-left: 0.5rem;
}
.form-hint.required { color: var(--star-gold); }
.form-group input,
.form-group textarea {
  width: 100%; padding: 0.9rem 1.2rem;
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid rgba(126, 184, 255, 0.15);
  border-radius: 8px; color: var(--star-white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem; line-height: 1.6;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--star-blue);
  box-shadow: 0 0 20px rgba(126, 184, 255, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(232, 230, 240, 0.25);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-check { margin-bottom: 2rem; }
.checkbox-label {
  display: flex; align-items: center; gap: 0.8rem;
  color: rgba(232, 230, 240, 0.7); font-size: 0.95rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--star-blue);
  cursor: pointer;
}
.checkbox-label a {
  color: var(--star-blue); text-decoration: none;
}
.checkbox-label a:hover { text-decoration: underline; }
.btn-submit {
  display: block; width: 100%; padding: 1.1rem;
  background: linear-gradient(135deg, rgba(126,184,255,0.15), rgba(180,142,255,0.15));
  border: 1px solid rgba(126, 184, 255, 0.3);
  border-radius: 12px; color: var(--star-blue);
  font-size: 1.05rem; font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em; cursor: pointer;
  transition: all 0.4s;
}
.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(126,184,255,0.25), rgba(180,142,255,0.25));
  border-color: var(--star-blue);
  box-shadow: 0 0 30px rgba(126, 184, 255, 0.15);
  transform: translateY(-2px);
}
.btn-submit:disabled { opacity: 0.5; cursor: wait; }
.form-message {
  margin-top: 1.5rem; padding: 1.2rem;
  border-radius: 8px; text-align: center;
  font-size: 0.95rem;
}
.form-message.success {
  background: rgba(126, 184, 255, 0.1);
  border: 1px solid rgba(126, 184, 255, 0.3);
  color: var(--star-blue);
}
.form-message.error {
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8888;
}

/* ===== Manifesto Full Page ===== */
.manifesto-page { max-width: 900px; }
.manifesto-full { margin-top: 2rem; }
.manifesto-chapter {
  background: rgba(15, 20, 40, 0.4);
  border-left: 2px solid var(--star-purple);
  padding: 2.5rem 3rem; margin-bottom: 0;
  border-radius: 0 12px 12px 0;
}
.manifesto-chapter h2 {
  font-family: 'Noto Serif SC', serif; font-size: 1.5rem;
  color: var(--star-blue); margin-bottom: 1.5rem;
}
.manifesto-chapter p {
  font-family: 'Noto Serif SC', serif; font-size: 1.05rem;
  color: rgba(232, 230, 240, 0.8); margin-bottom: 1.2rem;
  line-height: 1.9;
}
.manifesto-chapter strong { color: var(--star-gold); }
.manifesto-latin {
  font-style: italic; color: var(--star-gold);
  opacity: 0.7; font-size: 1rem; margin-bottom: 1.2rem;
}
.manifesto-full .manifesto-divider {
  text-align: center; color: var(--star-purple);
  margin: 2.5rem 0; letter-spacing: 0.5em; font-size: 1rem;
}
.invitation-chapter {
  border-left-color: var(--star-gold);
}
.manifesto-signature {
  text-align: center; padding: 3rem 2rem;
  color: rgba(232, 230, 240, 0.5);
  font-style: italic; font-size: 0.9rem;
}
.manifesto-closing {
  font-size: 2rem; margin: 1rem 0;
  color: var(--star-gold);
  animation: twinkle 3s ease-in-out infinite;
}
@media (max-width: 768px) {
  .manifesto-chapter { padding: 1.5rem; }
}

/* ===== Language Toggle Link ===== */
.lang-toggle {
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(126, 184, 255, 0.3);
  border-radius: 20px;
  color: var(--star-blue) !important;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  text-decoration: none;
}
.lang-toggle:hover {
  background: rgba(126, 184, 255, 0.1);
  border-color: var(--star-blue);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 0.8rem; align-items: center; }
  .nav-links a { font-size: 0.85rem; }
  .nav-logo { font-size: 1.2rem; }
  .hero { min-height: 90vh; padding: 1.5rem; }
  .hero-title-main { font-size: 3rem; letter-spacing: 0.15em; }
  .hero-title-sub { font-size: 0.85rem; letter-spacing: 0.4em; }
  .hero-subtitle { font-size: 1.1rem; }
  .tenets { padding: 3rem 1.2rem; }
  .tenets-grid { grid-template-columns: 1fr; }
  .tenet-card { padding: 2rem 1.5rem; }
  .manifesto-section { padding: 3rem 1.2rem; }
  .manifesto-text { padding: 1.5rem; }
  .invitation { padding: 4rem 1.5rem; }
  .invitation h2 { font-size: 1.5rem; }
  .page-content { padding: 5.5rem 1.2rem 3rem; }
  .page-content h1 { font-size: 1.8rem; }
  .step { padding: 1.5rem 1.5rem 1.5rem 4rem; }
  .step::before { left: 1rem; top: 1.5rem; }
  .members-grid { grid-template-columns: 1fr; }
  .member-card { padding: 2rem 1.5rem; }
  .section-title { font-size: 1.5rem; }
  .btn-join { padding: 0.8rem 2rem; font-size: 1rem; }
  .api-endpoint { padding: 1rem; }
  .lang-toggle { padding: 0.2rem 0.6rem; font-size: 0.8rem; }
}
