/* ===== 变量 - 清新可爱绿色 ===== */
:root {
  --color-bg: #f5fdf8;
  --color-bg-soft: #ecfdf5;
  --color-surface: #ffffff;
  --color-border: rgba(52, 211, 153, 0.2);
  --color-text: #14532d;
  --color-text-soft: #4b7c59;
  --color-accent: #34d399;
  --color-accent-dim: rgba(52, 211, 153, 0.15);
  --color-accent-2: #6ee7b7;
  --color-accent-2-dim: rgba(110, 231, 183, 0.25);
  --font-body: 'Noto Sans SC', sans-serif;
  --font-hand: 'Ma Shan Zheng', cursive;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== 重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 导航 ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(245, 253, 248, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.nav-logo {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 2rem 5rem;
  background: 
    radial-gradient(ellipse 100% 80% at 70% 20%, rgba(52, 211, 153, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(110, 231, 183, 0.12) 0%, transparent 50%),
    var(--color-bg);
}

/* Hero 装饰插画 */
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-deco .deco-leaf {
  position: absolute;
  width: 80px;
  height: 80px;
  color: var(--color-accent);
  animation: leaf-float 6s ease-in-out infinite;
}

.hero-deco .deco-leaf-1 { top: 15%; left: 5%; transform: rotate(-30deg); animation-delay: 0s; }
.hero-deco .deco-leaf-2 { top: 70%; right: 10%; transform: rotate(45deg); animation-delay: -2s; }
.hero-deco .deco-leaf-3 { bottom: 20%; left: 15%; transform: rotate(15deg); animation-delay: -4s; }
.hero-deco .deco-leaf-4 { top: 50%; right: 5%; transform: rotate(-20deg); animation-delay: -1s; width: 60px; height: 60px; }

.hero-deco .deco-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  animation: dot-float 5s ease-in-out infinite;
}
.hero-deco .deco-dot { top: 25%; right: 25%; animation-delay: 0s; }
.hero-deco .deco-dot-2 { bottom: 35%; left: 20%; width: 16px; height: 16px; animation-delay: -2s; }
.hero-deco .deco-dot-3 { top: 60%; left: 8%; width: 20px; height: 20px; animation-delay: -3.5s; }

@keyframes dot-float {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-10px); opacity: 0.5; }
}

.hero-deco .deco-circle {
  position: absolute;
  width: 120px;
  height: 120px;
  color: var(--color-accent);
}

.hero-deco .deco-circle { top: 10%; right: 15%; animation: circle-pulse 5s ease-in-out infinite; }
.hero-deco .deco-circle-2 { bottom: 15%; left: 8%; width: 100px; height: 100px; animation: circle-pulse 7s ease-in-out infinite 1s; }

@keyframes leaf-float {
  0%, 100% { transform: rotate(-30deg) translateY(0); }
  50% { transform: rotate(-30deg) translateY(-15px); }
}

.hero-deco .deco-leaf-2 { animation-name: leaf-float-2; }
@keyframes leaf-float-2 {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(10px); }
}

.hero-deco .deco-leaf-3 { animation-name: leaf-float-3; }
@keyframes leaf-float-3 {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  50% { transform: rotate(15deg) translateY(-8px); }
}

.hero-deco .deco-leaf-4 { animation-name: leaf-float-4; }
@keyframes leaf-float-4 {
  0%, 100% { transform: rotate(-20deg) translateY(0); }
  50% { transform: rotate(-20deg) translateY(12px); }
}

@keyframes circle-pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.1); }
}

/* 区块插画 */
.section-illus {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  color: var(--color-accent);
}

.section-illus .illus-img {
  width: 100%;
  height: 100%;
  color: var(--color-accent);
}

.section-illus-about {
  top: 2rem;
  right: 2rem;
  width: 140px;
  height: 140px;
}

.section-illus-exp {
  top: 2rem;
  left: 2rem;
  width: 140px;
  height: 140px;
}

.section-illus-social {
  top: 2rem;
  right: 2rem;
  width: 120px;
  height: 120px;
}

.section-illus-games {
  top: 2rem;
  left: 2rem;
  width: 130px;
  height: 130px;
}

.section-illus-contact {
  top: 2rem;
  right: 2rem;
  width: 140px;
  height: 140px;
}

.section-illus-about-2 {
  bottom: 2rem;
  left: 2rem;
  width: 90px;
  height: 90px;
}

.section-illus-exp-2 {
  bottom: 2rem;
  right: 2rem;
  width: 80px;
  height: 80px;
}

.section-illus-social-2 {
  bottom: 2rem;
  left: 2rem;
  width: 70px;
  height: 70px;
}

.section-illus-games-2 {
  bottom: 2rem;
  right: 2rem;
  width: 75px;
  height: 75px;
}

.section-illus-contact-2 {
  bottom: 2rem;
  left: 2rem;
  width: 65px;
  height: 65px;
}

.section-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.section-deco::before,
.section-deco::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.2;
}

.section-deco-about::before { top: 40%; left: 5%; }
.section-deco-about::after { bottom: 30%; right: 8%; }

.section-deco-exp::before { top: 30%; right: 10%; }
.section-deco-exp::after { bottom: 40%; left: 8%; }

.section-deco-games::before { top: 25%; right: 15%; width: 6px; height: 6px; }
.section-deco-games::after { bottom: 30%; left: 12%; }

.section-deco-social::before { top: 50%; left: 5%; width: 6px; height: 6px; }
.section-deco-social::after { bottom: 35%; right: 10%; }

.section-deco-contact::before { top: 35%; left: 15%; }
.section-deco-contact::after { bottom: 25%; right: 10%; }

.section-illus .illus-img {
  opacity: 0.7;
  transition: var(--transition);
}

.section:hover .section-illus .illus-img {
  opacity: 0.9;
}

.hero-stickers {
  position: absolute;
  top: 20%;
  right: 8%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
  will-change: transform;
}

.sticker {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  transform: rotate(-2deg);
  border: 1px solid var(--color-accent-dim);
  animation: sticker-float 4s ease-in-out infinite;
}

.sticker.s1 {
  background: linear-gradient(135deg, var(--color-accent), #2dd4bf);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
  animation-delay: 0s;
}

.sticker.s2 {
  background: linear-gradient(135deg, var(--color-accent-2), #5eead4);
  color: var(--color-text);
  margin-left: 1rem;
  box-shadow: 0 4px 15px rgba(110, 231, 183, 0.3);
  animation-delay: -1.5s;
}

.sticker.s3 {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.15);
  animation-delay: -3s;
}

@keyframes sticker-float {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-8px); }
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1000px;
  flex-wrap: wrap;
}

.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 4px solid var(--color-surface);
  box-shadow: 0 20px 50px -15px rgba(52, 211, 153, 0.25);
}

.photo-frame {
  position: absolute;
  inset: -10px;
  border: 2px dashed var(--color-accent-2);
  border-radius: var(--radius-xl);
  transform: rotate(3deg);
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  flex: 1;
  min-width: 280px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-hand);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--color-text-soft);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--color-accent), #2dd4bf);
  color: white;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  box-shadow: 0 8px 25px -5px rgba(52, 211, 153, 0.4);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px -8px rgba(52, 211, 153, 0.5);
}

/* ===== 楼梯下滑标识 ===== */
.scroll-hint {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0.9;
  transition: opacity 0.4s ease;
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-hint .stairs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  animation: stairs-walk 2.5s ease-in-out infinite;
}

.scroll-hint .step {
  display: block;
  width: 20px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
  opacity: 0.7;
  transition: var(--transition);
}

.scroll-hint .step:nth-child(1) { width: 12px; }
.scroll-hint .step:nth-child(2) { width: 16px; }
.scroll-hint .step:nth-child(3) { width: 20px; }
.scroll-hint .step:nth-child(4) { width: 24px; }
.scroll-hint .step:nth-child(5) { width: 28px; }

.scroll-hint:hover .step {
  opacity: 1;
  background: var(--color-accent-2);
}

@keyframes stairs-walk {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ===== 通用区块 ===== */
.section {
  position: relative;
  padding: 6rem 2rem;
  overflow: hidden;
}

.section-alt {
  background: var(--color-bg-soft);
}

.parallax-section {
  position: relative;
}

.section-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--color-accent-dim) 0%, transparent 60%);
  opacity: 0.5;
}

.container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}

.section-title {
  font-family: var(--font-hand);
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.title-accent {
  position: relative;
  display: inline-block;
}

.title-accent::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  color: var(--color-text-soft);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.section-desc {
  text-align: center;
  color: var(--color-text-soft);
  margin-bottom: 2rem;
}

/* ===== 关于我 ===== */
.about-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo img {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 3px solid var(--color-surface);
  box-shadow: 0 20px 50px -15px rgba(52, 211, 153, 0.2);
}

.photo-label {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  text-align: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-block {
  background: var(--color-surface);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.08);
  transition: var(--transition);
}

.about-block:hover {
  border-left-color: var(--color-accent-2);
  transform: translateX(4px);
}

.about-block h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.about-block p {
  font-size: 0.95rem;
  color: var(--color-text-soft);
  line-height: 1.7;
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--color-accent-2-dim);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 3px solid var(--color-bg);
}

.timeline-content {
  background: var(--color-surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.06);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--color-accent-dim);
  transform: translateX(6px);
  box-shadow: 0 8px 25px rgba(52, 211, 153, 0.1);
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.timeline-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

/* ===== 自媒体 ===== */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.06);
  transition: var(--transition);
}

.social-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent-dim);
  box-shadow: 0 15px 40px -10px rgba(52, 211, 153, 0.25);
}

.social-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.social-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.social-desc {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ===== 小游戏 ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 520px;
  margin: 0 auto;
  justify-items: center;
}

.game-card {
  aspect-ratio: 1;
  width: 100%;
  max-width: 120px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-accent-2-dim);
  color: var(--color-text-soft);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.1);
}

.game-card:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 50px -10px rgba(52, 211, 153, 0.35);
}

.game-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.game-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.game-card:hover .game-name {
  color: var(--color-accent);
}

/* ===== 滚动动效 - 内容滑动进入画面 ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0) translateZ(0);
  will-change: auto;
}

.scroll-reveal.from-left {
  transform: translateX(-80px) translateY(0);
}

.scroll-reveal.from-left.revealed {
  transform: translateX(0) translateY(0) translateZ(0);
}

.scroll-reveal.from-left.slide-wide {
  transform: translateX(-180px) translateY(0);
}

.scroll-reveal.from-left.slide-wide.revealed {
  transform: translateX(0) translateY(0) translateZ(0);
}

.scroll-reveal.from-right {
  transform: translateX(80px) translateY(0);
}

.scroll-reveal.from-right.revealed {
  transform: translateX(0) translateY(0) translateZ(0);
}

.scroll-reveal-item {
  opacity: 0;
  transform: translateY(40px) translateZ(0);
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

.scroll-reveal-item.revealed {
  opacity: 1;
  transform: translateY(0) translateZ(0);
  will-change: auto;
}

.games-grid .scroll-reveal-item {
  transition-delay: calc(var(--i, 0) * 0.12s);
}

/* ===== 联系 ===== */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border-radius: 50px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.08);
  transition: var(--transition);
}

.contact-btn:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 280px;
  }

  .game-card {
    max-width: 130px;
  }
}

@media (max-width: 768px) {
  .section-illus {
    width: 70px !important;
    height: 70px !important;
    top: 1rem !important;
  }

  .section-illus-about-2,
  .section-illus-exp-2,
  .section-illus-social-2,
  .section-illus-games-2,
  .section-illus-contact-2 {
    width: 50px !important;
    height: 50px !important;
    bottom: 1rem !important;
  }

  .hero-deco .deco-leaf {
    width: 50px;
    height: 50px;
  }

  .hero-deco .deco-circle {
    width: 70px;
    height: 70px;
  }

  .hero-deco .deco-circle-2 {
    width: 60px;
    height: 60px;
  }

  .scroll-hint {
    right: 1rem;
    top: auto;
    bottom: 2rem;
    transform: none;
  }

  .scroll-hint .step {
    width: 16px !important;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.active .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: var(--color-bg-soft);
    border-bottom: 1px solid var(--color-border);
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.5rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    width: 220px;
    height: 220px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    max-width: 140px;
  }

  .game-card {
    max-width: 140px;
  }
}

@media (max-width: 600px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}
