/* ============================================
   星河拾贝录 - 样式表
   ============================================ */

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

:root {
  --bg-deep: #0a0e1a;
  --bg-card: rgba(15, 20, 40, 0.7);
  --bg-card-hover: rgba(20, 28, 58, 0.85);
  --text-primary: #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted: #5c6bc0;
  --accent-blue: #7c9cff;
  --accent-purple: #b388ff;
  --accent-cyan: #80deea;
  --accent-pink: #f48fb1;
  --accent-gold: #ffd54f;
  --glow-blue: rgba(124, 156, 255, 0.3);
  --glow-purple: rgba(179, 136, 255, 0.3);
  --border-subtle: rgba(124, 156, 255, 0.12);
  --border-hover: rgba(124, 156, 255, 0.3);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Starfield Canvas --- */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#starCanvas {
  width: 100%;
  height: 100%;
}

/* --- Meteors --- */
.meteors {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.meteor {
  position: absolute;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(124,156,255,0.8), rgba(179,136,255,0.4));
  border-radius: 50%;
  opacity: 0;
  transform: rotate(-35deg);
  animation: meteorFall linear infinite;
}

.meteor:nth-child(1) { top: -10%; left: 20%; animation-duration: 2.5s; animation-delay: 0s; }
.meteor:nth-child(2) { top: -10%; left: 50%; animation-duration: 3s; animation-delay: 4s; }
.meteor:nth-child(3) { top: -10%; left: 75%; animation-duration: 2s; animation-delay: 7s; }
.meteor:nth-child(4) { top: -10%; left: 35%; animation-duration: 2.8s; animation-delay: 11s; }
.meteor:nth-child(5) { top: -10%; left: 65%; animation-duration: 2.2s; animation-delay: 15s; }

@keyframes meteorFall {
  0% { opacity: 0; transform: rotate(-35deg) translateY(0); }
  5% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-35deg) translateY(120vh); }
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  padding: 12px 40px;
  background: rgba(10, 14, 26, 0.9);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-icon {
  font-size: 1.5rem;
  animation: gentleFloat 3s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(124, 156, 255, 0.1);
}

.nav-link.active {
  color: var(--accent-blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: 700px;
}

.hero-subtitle-top {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 28px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.title-char {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: charReveal 0.8s ease forwards;
  animation-delay: calc(0.5s + var(--i) * 0.12s);
  filter: drop-shadow(0 0 30px var(--glow-blue));
}

@keyframes charReveal {
  0% { opacity: 0; transform: translateY(40px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 1.2s;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  transition: var(--transition-normal);
  opacity: 0;
  animation: fadeInUp 1s ease forwards 1.5s;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  opacity: 0;
  transition: var(--transition-normal);
}

.hero-btn:hover::before {
  opacity: 1;
}

.hero-btn span,
.hero-btn svg {
  position: relative;
  z-index: 1;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-purple);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 2s;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-dot {
  width: 3px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 3px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section Common --- */
.section {
  position: relative;
  z-index: 2;
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent-blue);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Filter Tags --- */
.filter-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 22px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.filter-tag:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(124, 156, 255, 0.05);
}

.filter-tag.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: transparent;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow-blue);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--glow-blue), transparent 70%);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.card:hover .card-glow {
  opacity: 0.15;
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.card:hover .card-image-placeholder {
  transform: scale(1.05);
}

.card-emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

.star-gradient { background: linear-gradient(135deg, #1a1a4e, #2d1b69, #1a237e); }
.sea-gradient { background: linear-gradient(135deg, #0d2137, #0a3d62, #1a5276); }
.dream-gradient { background: linear-gradient(135deg, #2d1b4e, #4a1a6b, #1a1a4e); }
.memory-gradient { background: linear-gradient(135deg, #1a2a3a, #2d3b4e, #1a3a4e); }

.card-body {
  padding: 24px;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--accent-cyan);
  background: rgba(128, 222, 234, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-like {
  padding: 6px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.card-like:hover,
.card-like.liked {
  color: var(--accent-pink);
}

.card-like.liked svg {
  fill: var(--accent-pink);
}

/* Card hidden for filter */
.card.hidden {
  display: none;
}

/* --- Timeline --- */
.timeline-section {
  background: linear-gradient(180deg, transparent, rgba(124, 156, 255, 0.02), transparent);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-blue), var(--accent-purple), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.left {
  left: 0;
  text-align: right;
  padding-right: 60px;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
  padding-left: 60px;
}

.timeline-dot {
  position: absolute;
  top: 28px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-item.left .timeline-dot {
  right: -10px;
}

.timeline-item.right .timeline-dot {
  left: -10px;
}

.timeline-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition-normal);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent-blue);
  letter-spacing: 2px;
  margin-bottom: 8px;
  display: inline-block;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- About Section --- */
.about-section {
  overflow: hidden;
}

.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-system {
  position: relative;
  width: 320px;
  height: 320px;
}

.orbit {
  position: absolute;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  animation: orbitSpin linear infinite;
}

.orbit-1 {
  inset: 20%;
  animation-duration: 8s;
  border-color: rgba(124, 156, 255, 0.2);
}

.orbit-2 {
  inset: 8%;
  animation-duration: 14s;
  animation-direction: reverse;
  border-color: rgba(179, 136, 255, 0.15);
}

.orbit-3 {
  inset: -2%;
  animation-duration: 20s;
  border-color: rgba(128, 222, 234, 0.1);
}

.orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
}

.orbit-1 .orbit-dot { background: var(--accent-blue); box-shadow: 0 0 12px var(--accent-blue); }
.orbit-2 .orbit-dot { background: var(--accent-purple); box-shadow: 0 0 12px var(--accent-purple); }
.orbit-3 .orbit-dot { background: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan); }

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  animation: gentleFloat 3s ease-in-out infinite;
}

.about-text .section-tag {
  text-align: left;
}

.about-text .section-title {
  text-align: left;
  margin-bottom: 24px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
  background: rgba(10, 14, 26, 0.5);
}

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

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Scroll Animations --- */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-right"] {
  transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .about-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-text .section-tag,
  .about-text .section-title {
    text-align: center;
  }

  .about-text p {
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }

  .orbit-system {
    width: 240px;
    height: 240px;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 60px !important;
    padding-right: 20px !important;
    text-align: left !important;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 10px;
    right: auto;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }

  .about-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.8rem;
  }
}

/* --- Selection --- */
::selection {
  background: rgba(124, 156, 255, 0.3);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 156, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 156, 255, 0.5);
}
