/* 我家家家 - 现代风格设计 */

:root {
  /* 现代配色方案 */
  --primary: #7c3aed;      /* 更鲜艳的紫色 */
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --accent: #ec4899;        /* 更鲜艳的粉色 */
  --accent-light: #f9a8d4;

  /* 背景色 */
  --bg-dark: #0a0a0f;       /* 更深的背景 */
  --bg-card: #1a1a2e;       /* 更明显的卡片背景 */
  --bg-glass: rgba(26, 26, 46, 0.9);

  /* 文字色 - 提高对比度 */
  --text-primary: #ffffff;  /* 纯白色 */
  --text-secondary: #e2e8f0; /* 更亮的次要文字 */
  --text-muted: #94a3b8;    /* 更亮的次要文字 */

  /* 边框和分割线 - 更明显 */
  --border: rgba(255, 255, 255, 0.2);
  --border-hover: rgba(255, 255, 255, 0.4);

  /* 间距 */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* 字体 */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* 圆角 */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.5);

  /* 容器宽度 */
  --container: 1200px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

img, svg {
  max-width: 100%;
  display: block;
}

/* 背景装饰 */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
}

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

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

.logo-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.375rem;
  width: 1.5rem;
  height: 1.125rem;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

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

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

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
  }
}

/* 主容器 */
main {
  position: relative;
  z-index: 1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

/* 首屏 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
  filter: blur(60px);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-badge span:first-child {
  font-size: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* 雪球装饰 */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.snow-globe {
  position: relative;
  width: 300px;
  height: 300px;
}

.globe-content {
  width: 100%;
  height: 100%;
  background: var(--bg-glass);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 0 60px rgba(124, 58, 237, 0.2),
    var(--shadow-glow);
  animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow:
      inset 0 0 60px rgba(124, 58, 237, 0.2),
      var(--shadow-glow);
  }
  50% {
    box-shadow:
      inset 0 0 80px rgba(124, 58, 237, 0.3),
      0 0 60px rgba(124, 58, 237, 0.6);
  }
}

.globe-icon {
  font-size: 5rem;
  animation: float 4s ease-in-out infinite;
}

.globe-base {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .snow-globe {
    width: 200px;
    height: 200px;
  }

  .globe-icon {
    font-size: 3rem;
  }
}

/* 章节样式 */
.section {
  padding: var(--spacing-xl) 0;
}

.section-alt {
  background: var(--bg-card);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-number {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* 特性卡片 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* 时光卡片 */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.moment-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.moment-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.moment-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.moment-large {
  grid-column: 2;
  grid-row: span 2;
}

.moment-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.moment-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
}

.moment-emoji {
  font-size: 4rem;
  position: relative;
  z-index: 1;
}

.moment-content {
  padding: 1.5rem;
}

.moment-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.moment-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.moment-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .moments-grid {
    grid-template-columns: 1fr;
  }

  .moment-large {
    grid-column: 1;
    grid-row: auto;
  }
}

/* 手记列表 */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.note-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.note-item:hover {
  background: var(--bg-card);
  border-color: var(--primary-light);
  transform: translateX(8px);
}

.note-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
}

.note-date .day {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.note-date .month {
  font-size: 0.875rem;
  color: var(--primary-light);
}

.note-content {
  flex: 1;
}

.note-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.note-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.note-arrow {
  font-size: 1.5rem;
  color: var(--primary-light);
  transition: transform 0.3s ease;
}

.note-item:hover .note-arrow {
  transform: translateX(8px);
}

@media (max-width: 768px) {
  .note-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .note-date {
    flex-direction: row;
    gap: 0.5rem;
    min-width: auto;
  }
}

/* 联系区域 */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-content {
  text-align: left;
}

.contact-content .section-number {
  display: block;
  margin-bottom: 1rem;
}

.contact-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-actions {
  display: flex;
  gap: 1rem;
}

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

.contact-icon {
  font-size: 8rem;
  animation: float 5s ease-in-out infinite;
}

@media (max-width: 768px) {
  .contact-box {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .contact-actions {
    justify-content: center;
  }

  .contact-icon {
    font-size: 5rem;
  }
}

/* 页脚 */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo {
  font-size: 2rem;
}

.footer-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.copyright {
  margin-bottom: 0.5rem;
}

.beian a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.beian a:hover {
  color: var(--primary-light);
}

/* 雪花效果 */
.snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  user-select: none;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.3;
  }
}

.snowflake::before {
  content: "❄";
}

.snowflake:nth-child(3n+1)::before {
  content: "❄";
}

.snowflake:nth-child(3n+2)::before {
  content: "❅";
}

.snowflake:nth-child(3n+3)::before {
  content: "❆";
}

/* 响应式调整 */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 4rem;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }

  .container {
    padding: 0 1.5rem;
  }
}
