:root {
  --pink: #ffb7c5;
  --pink-soft: #ffe0e6;
  --lavender: #d4b8e8;
  --lavender-soft: #ede0f5;
  --mint: #a8e6cf;
  --sky: #87ceeb;
  --cream: #fff8e7;
  --white: #ffffff;
  --dark: #3d3055;
  --text: #4a3f5c;
  --text-light: #8a7f9c;
  --shadow-sm: 0 2px 12px rgba(100, 70, 120, 0.08);
  --shadow-md: 0 8px 32px rgba(100, 70, 120, 0.12);
  --shadow-lg: 0 20px 60px rgba(100, 70, 120, 0.18);
  /* Keep animation vars — now bright pastel */
  --color-unified: #ffe0e6;
  --color-card-1: #ffb7c5;
  --color-card-2: #d4b8e8;
  --color-card-3: #a8e6cf;
  --color-dark: #f5f0fa;
  --color-light: #3d3055;
}

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

body {
  font-family: 'Quicksand', 'Noto Sans SC', -apple-system, sans-serif;
  background: linear-gradient(180deg, #fef5f7 0%, #f8f0fb 20%, #f0f8fb 50%, #f5faf7 75%, #fef9f0 100%);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(200, 180, 220, 0.2);
  transition: transform 0.4s ease;
}
.nav-hidden { transform: translateY(-100%); }
.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-brand > a {
  text-decoration: none;
  background: linear-gradient(135deg, #d4b8e8, #ffb7c5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-sep {
  color: #d4b8e8;
  font-weight: 300;
}
.brand-author {
  font-size: 1.3rem;
  font-weight: 400;
  font-family: 'ZCOOL KuaiLe', 'YouYuan', 'STYuan', 'PingFang SC', 'Noto Sans SC', sans-serif;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}
.brand-author:hover {
  color: #e895b0;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-light); text-decoration: none;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--dark); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6rem 2.5rem 3rem;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 560px; }
.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--lavender-soft);
  color: #8b6baa;
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  color: var(--dark);
}
.hero-line { display: block; }
.hero-line.accent {
  background: linear-gradient(135deg, #e895b0, #c49bdb, #87b8db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-light);
  margin-bottom: 2rem; max-width: 420px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--dark); color: var(--white);
  border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.35s ease;
  box-shadow: 0 4px 20px rgba(100, 70, 120, 0.25);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(100, 70, 120, 0.35);
}

/* Hero floating cards */
.hero-visual {
  position: relative; z-index: 1;
  width: 420px; height: 520px; flex-shrink: 0;
}
.hero-float-card {
  position: absolute;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  background-size: cover;
  background-position: center;
  transition: transform 0.1s ease-out;
}
.hero-float-card.card-a {
  width: 160px; height: 280px;
  top: 5%; left: 5%; z-index: 3;
  transform: rotate(-6deg);
}
.hero-float-card.card-b {
  width: 170px; height: 300px;
  top: 15%; left: 28%; z-index: 2;
  transform: rotate(3deg);
}
.hero-float-card.card-c {
  width: 155px; height: 270px;
  top: 8%; left: 50%; z-index: 1;
  transform: rotate(-2deg);
}
.hero-glow {
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 197, 0.25), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0; pointer-events: none;
}

/* ═══════════════════════════════════════
   STICKY 3-CARD FLIP — PRESERVED
   ═══════════════════════════════════════ */
.sticky {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(180deg, #fef5f7 0%, #f5f0fa 40%, #f0f8fb 70%, #f5faf7 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.sticky-header {
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 500;
  text-align: center;
  color: var(--color-light);
  pointer-events: none;
  white-space: nowrap;
}

.card-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 85%;
  max-width: 900px;
  perspective: 1200px;
}

.card {
  position: relative;
  width: 100%;
  height: 420px;
  max-width: 300px;
  border-radius: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background-repeat: no-repeat;
  overflow: hidden;
}

.card-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: var(--color-unified);
}

.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  gap: 0.6rem;
}

.card-1 .card-back { background: var(--color-card-1); color: #5a3040; }
.card-2 .card-back { background: var(--color-card-2); color: #3d3055; }
.card-3 .card-back { background: var(--color-card-3); color: #2a4040; }

.card-number {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.6;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.card-back h3 {
  font-size: 1.3rem;
  font-weight: 500;
  text-align: center;
}

.card-artist {
  font-size: 0.85rem;
  opacity: 0.65;
}

.card-price {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 1.2rem;
  background: rgba(255,255,255,0.5);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
}

/* ── Sections (after sticky) ── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-tag {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b090c8;
  margin-bottom: 0.6rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--dark);
}

/* Gallery */
.gallery {
  padding: 5rem 2.5rem 6rem;
  max-width: 1300px;
  margin: 0 auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--lavender) transparent;
}
.gallery-grid::-webkit-scrollbar { width: 5px; }
.gallery-grid::-webkit-scrollbar-track { background: transparent; }
.gallery-grid::-webkit-scrollbar-thumb { background: var(--lavender); border-radius: 3px; }

.wallpaper-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 9/16;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: box-shadow 0.4s ease;
  background: #eee;
}
.wallpaper-card:hover { box-shadow: var(--shadow-lg); z-index: 10; }
.wallpaper-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.wallpaper-card:hover img { transform: scale(1.08); }

.wallpaper-card .price-tag {
  position: absolute;
  bottom: 1rem; right: 1rem;
  padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  font-weight: 700; font-size: 0.9rem;
  color: var(--dark);
  transform: translateY(10px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}
.wallpaper-card:hover .price-tag { transform: translateY(0); opacity: 1; }

.wallpaper-card .badge-new {
  position: absolute;
  top: 0.8rem; left: 0.8rem;
  padding: 0.25rem 0.7rem;
  background: var(--pink); color: #fff;
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0; transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}
.wallpaper-card:hover .badge-new { transform: translateY(0); opacity: 1; }

.wallpaper-card .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-out 0.7s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-out {
  to { transform: scale(4); opacity: 0; }
}

/* About */
.about {
  padding: 6rem 2.5rem;
  display: flex; justify-content: center;
}
.about-content { text-align: center; max-width: 600px; }
.about-content h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--dark); margin-bottom: 1rem;
}
.about-content p {
  color: var(--text-light); line-height: 1.8;
  font-size: 1.05rem; margin-bottom: 2.5rem;
}
.about-stats {
  display: flex; justify-content: center; gap: 3rem;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-size: 2.5rem; font-weight: 700;
  background: linear-gradient(135deg, #d4b8e8, #ffb7c5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 0.3rem; }

/* Footer */
.footer {
  padding: 3rem 2.5rem; text-align: center;
  background: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(200, 180, 220, 0.15);
}
.footer-brand {
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.footer-brand > a:first-child {
  text-decoration: none;
  background: linear-gradient(135deg, #d4b8e8, #ffb7c5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-tagline { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }
.footer-copy { color: var(--text-light); font-size: 0.78rem; opacity: 0.7; }

/* ── Payment Modal ── */
.pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(30, 20, 40, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.pay-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.pay-modal {
  display: flex;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 2rem;
  max-width: 640px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(100, 70, 120, 0.2);
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pay-overlay.active .pay-modal {
  transform: translateY(0) scale(1);
}
.pay-close {
  position: absolute;
  top: 12px; right: 18px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  z-index: 2;
}
.pay-close:hover { color: var(--dark); }

.pay-preview {
  flex: 0 0 160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pay-preview img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
}

.pay-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pay-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.2rem;
}
.pay-artist {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}
.pay-price-row {
  margin-bottom: 1rem;
}
.pay-price {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e895b0, #c49bdb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pay-qr {
  background: #fff;
  border-radius: 16px;
  padding: 0.8rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.8rem;
}
.pay-qr img {
  width: 140px;
  height: 140px;
  display: block;
  object-fit: contain;
}
.pay-qr-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}
.pay-note {
  font-size: 0.7rem;
  color: var(--text-light);
  opacity: 0.7;
}

@media (max-width: 520px) {
  .pay-modal {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  .pay-preview { flex: 0 0 120px; }
  .pay-preview img { aspect-ratio: auto; height: 180px; }
  .pay-qr img { width: 120px; height: 120px; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    padding: 5rem 1.5rem 3rem;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-sub { max-width: 100%; }
  .hero-visual { width: 300px; height: 350px; margin-top: 2rem; }
  .hero-float-card.card-a { width: 120px; height: 200px; }
  .hero-float-card.card-b { width: 130px; height: 220px; }
  .hero-float-card.card-c { width: 115px; height: 190px; }
  .nav { padding: 0.9rem 1.2rem; }
  .nav-links { gap: 1rem; }
  .gallery { padding: 2rem 1rem 4rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; max-height: 400px; }
  .about-stats { flex-wrap: wrap; gap: 2rem; }
}

@media (max-width: 800px) {
  .sticky-header { white-space: normal; top: 50%; }
  .card-container { flex-direction: column; gap: 1.5rem; width: 90%; }
  .card { max-width: 100%; height: 300px; border-radius: 8px; }
  .card-front { background-size: 100% 100% !important; background-position: 50% 50% !important; border-radius: 8px; }
}

@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; max-height: 360px; }
}
