/* ═══════════════════════════════════════
   我的人生 — 官网样式 v2
   ═══════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #4C1D95;
  --gold: #D4A843;
  --gold-light: #F5D98A;
  --bg-dark: #0A0A1A;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #E8E4F0;
  --text-secondary: rgba(232, 228, 240, 0.6);
  --text-dim: rgba(232, 228, 240, 0.35);
  --gradient-main: linear-gradient(135deg, var(--purple) 0%, var(--gold) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(212, 168, 67, 0.4) 100%);
  --font-serif: 'Noto Serif SC', 'Georgia', serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

body { position: relative; }
a { color: inherit; text-decoration: none; }

/* ── Particle Canvas ── */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  transition: all 0.4s ease;
}
.nav.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 0.7rem 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.9rem; color: var(--text-secondary);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--gradient-main) !important;
  -webkit-background-clip: unset !important; background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem; border-radius: 2rem;
  font-weight: 500;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Scroll Reveal ── */
.fade-in {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Section Common ── */
.section-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 6rem 2rem;
  position: relative; z-index: 1;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900; text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-subtitle {
  text-align: center; color: var(--text-secondary);
  font-size: 1.1rem; margin-bottom: 4rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}

/* ═══════════ Hero ═══════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.5;
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 26, 0.3) 0%,
    rgba(10, 10, 26, 0.6) 50%,
    rgba(10, 10, 26, 0.95) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 2rem;
  font-size: 0.85rem; color: var(--purple-light);
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  background: rgba(124, 58, 237, 0.1);
}
.hero-title {
  font-family: var(--font-serif);
  margin-bottom: 1.5rem;
}
.title-line {
  display: block;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  text-shadow: none;
}
.hero-slogan {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--gold-light);
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
}
.hero-desc {
  font-size: 1.1rem; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex; gap: 1rem;
  justify-content: center; align-items: center;
  flex-wrap: wrap;
}

/* Download Buttons */
.download-wrapper { position: relative; }
.btn-download {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gradient-main);
  color: #fff; padding: 0.9rem 2rem;
  border-radius: 3rem; font-weight: 500;
  font-size: 1rem; transition: all 0.3s;
  border: none; cursor: pointer;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4); }
.btn-download.big { padding: 1.1rem 2.5rem; font-size: 1.1rem; }
.btn-icon { font-size: 1.2rem; }
.btn-explore {
  display: inline-flex; align-items: center;
  padding: 0.9rem 2rem; border-radius: 3rem;
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--purple-light); font-size: 1rem;
  transition: all 0.3s;
}
.btn-explore:hover {
  border-color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
}

/* QR Popup */
.qr-popup {
  position: absolute; bottom: calc(100% + 1rem);
  left: 50%; transform: translateX(-50%) scale(0.9);
  background: #fff; border-radius: 1rem;
  padding: 1.2rem; text-align: center;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.qr-popup p { color: #666; font-size: 0.8rem; margin-top: 0.5rem; }
.download-wrapper:hover .qr-popup {
  opacity: 1; transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute; bottom: 2rem;
  left: 50%; transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  width: 24px; height: 24px;
  border-right: 2px solid var(--purple-light);
  border-bottom: 2px solid var(--purple-light);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
  opacity: 0.5;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 0.7; }
}

/* ═══════════ Philosophy ═══════════ */
.philosophy {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(15, 10, 40, 1) 100%);
}
.philosophy-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.phi-card {
  border-radius: 1.2rem;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  transition: transform 0.4s, box-shadow 0.4s;
}
.phi-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15);
}
.phi-card-img {
  width: 100%; height: 240px;
  overflow: hidden;
}
.phi-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.phi-card:hover .phi-card-img img {
  transform: scale(1.05);
}
.phi-card-body {
  padding: 1.5rem;
}
.phi-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem; margin-bottom: 0.8rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.phi-card-body p {
  color: var(--text-secondary);
  font-size: 0.95rem; line-height: 1.8;
}

/* ═══════════ Stats ═══════════ */
.stats {
  position: relative; z-index: 1;
  background: rgba(15, 10, 40, 1);
  border-top: 1px solid var(--bg-card-border);
  border-bottom: 1px solid var(--bg-card-border);
}
.stats .section-inner { padding: 4rem 2rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item {
  padding: 2rem 1rem;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.stat-formula {
  font-size: clamp(2rem, 4vw, 2.8rem) !important;
}
.stat-formula sup {
  font-size: 0.6em;
}
.stat-label {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.stat-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ═══════════ Features ═══════════ */
.features {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(15, 10, 40, 1) 0%, var(--bg-dark) 30%, rgba(15, 10, 40, 1) 100%);
}
.feature-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  margin-bottom: 6rem;
}
.feature-item:last-child { margin-bottom: 0; }
.feature-item.reverse { direction: rtl; }
.feature-item.reverse > * { direction: ltr; }

.feature-visual {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
}
.feature-img {
  width: 100%;
  border-radius: 1.2rem;
  display: block;
  transition: transform 0.6s;
}
.feature-visual:hover .feature-img {
  transform: scale(1.03);
}
.feature-img-glow {
  position: absolute; inset: 0;
  border-radius: 1.2rem;
  background: var(--gradient-glow);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.feature-visual:hover .feature-img-glow { opacity: 0.15; }

.feature-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 1rem;
  font-size: 0.8rem;
  color: var(--purple-light);
  margin-bottom: 1rem;
}
.feature-info h3 {
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 900;
  margin-bottom: 1rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-info p {
  color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 1.5rem;
}
.feature-info em {
  color: var(--gold-light);
  font-style: normal;
}
.feature-list {
  list-style: none; padding: 0;
}
.feature-list li {
  position: relative; padding-left: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem; font-size: 0.95rem;
}
.feature-list li::before {
  content: ''; position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--purple-light);
  border-radius: 50%;
}

/* ═══════════ Realms Timeline ═══════════ */
.realms {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(15, 10, 40, 1) 0%, var(--bg-dark) 100%);
}
.realm-timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0;
}
.realm-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--purple) 0%, var(--gold) 100%);
  transform: translateX(-50%);
}
.realm-node {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
}
.realm-node:last-child { margin-bottom: 0; }
.realm-dot {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px;
  background: var(--purple);
  border: 3px solid var(--bg-dark);
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s;
}
.realm-dot.final {
  width: 22px; height: 22px;
  background: var(--gold);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.5);
}
.realm-node:hover .realm-dot {
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}
.realm-content {
  width: calc(50% - 40px);
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 0.8rem;
  transition: all 0.3s;
}
.realm-content.left {
  margin-right: auto;
  text-align: right;
}
.realm-content.right {
  margin-left: auto;
}
.realm-node:hover .realm-content {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.05);
}
.realm-content h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  background: var(--gradient-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}
.realm-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.realm-dot.mystery {
  width: 22px; height: 22px;
  background: transparent;
  border: 3px dashed var(--purple-light);
  animation: mysteryPulse 2s infinite;
}
@keyframes mysteryPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(167, 139, 250, 0.3); }
  50% { box-shadow: 0 0 20px rgba(167, 139, 250, 0.6); }
}
.mystery-content {
  border-style: dashed !important;
  border-color: rgba(167, 139, 250, 0.2) !important;
}
.mystery-content h4 {
  letter-spacing: 0.3em;
}
.realm-footer {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-top: 3rem;
  letter-spacing: 0.1em;
}

/* ═══════════ Download ═══════════ */
.download {
  position: relative; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
}
.download .section-inner { padding-bottom: 4rem; }
.download-center {
  text-align: center;
}
.download-wrapper.large {
  display: inline-block;
}
.download-note {
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ═══════════ Footer ═══════════ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--bg-card-border);
  padding: 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-main {
  display: flex; align-items: center; gap: 2rem;
}
.footer-brand {
  color: var(--text-dim); font-size: 0.85rem;
}
.footer-links a {
  color: var(--text-dim); font-size: 0.8rem;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--text-secondary); }

/* Easter Egg */
.footer-easter-egg {
  opacity: 0.3;
  transition: opacity 0.5s, transform 0.5s;
  cursor: pointer;
}
.footer-easter-egg:hover {
  opacity: 1;
  transform: scale(1.3) rotate(-5deg);
}
.easter-egg-img {
  width: 50px; height: 50px;
  object-fit: cover;
  border-radius: 50%;
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1024px) {
  .philosophy-cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .feature-item { gap: 2.5rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .philosophy-cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .phi-card-img { height: 200px; }
  .feature-item,
  .feature-item.reverse { grid-template-columns: 1fr; gap: 1.5rem; direction: ltr; }
  .feature-item.reverse > * { direction: ltr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section-inner { padding: 4rem 1.5rem; }

  /* Timeline mobile */
  .realm-line { left: 20px; }
  .realm-dot { left: 20px !important; }
  .realm-content { width: auto !important; margin-left: 50px !important; margin-right: 0 !important; text-align: left !important; }

  /* QR popup hidden on mobile */
  .qr-popup { display: none; }

  .footer-inner { flex-direction: column; gap: 1rem; }
  .footer-main { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { padding: 1rem 0.5rem; }
}
