:root {
  --primary: #FF6B9D;
  --primary-dark: #E8558A;
  --primary-light: #FFB3CC;
  --secondary: #FF8FB1;
  --accent: #7C3AED;
  --accent-light: #A78BFA;
  --bg: #FFF5F8;
  --bg-alt: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #2D1B2E;
  --text-secondary: #6B5B6E;
  --text-muted: #9B8B9E;
  --border: rgba(255, 107, 157, 0.18);
  --shadow: 0 8px 32px rgba(255, 107, 157, 0.12);
  --shadow-hover: 0 16px 48px rgba(255, 107, 157, 0.22);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --gradient-hero: linear-gradient(135deg, #FF6B9D 0%, #FF8FB1 35%, #A78BFA 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 107, 157, 0.06), rgba(167, 139, 250, 0.06));
  --gradient-btn: linear-gradient(135deg, #FF6B9D, #E8558A);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --blur: blur(18px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1220;
    --bg-alt: #221A2A;
    --bg-card: rgba(42, 30, 50, 0.78);
    --bg-glass: rgba(42, 30, 50, 0.6);
    --text: #F5EAF5;
    --text-secondary: #C4B0C8;
    --text-muted: #8E7A92;
    --border: rgba(255, 107, 157, 0.22);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(255, 107, 157, 0.18);
    --gradient-hero: linear-gradient(135deg, #B84A75 0%, #9B5DBF 50%, #6D4BA8 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 107, 157, 0.08), rgba(167, 139, 250, 0.08));
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1.1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-btn);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 0.75rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

header nav > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav a[aria-label="亲亲漫画首页"] {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

header nav a[aria-label="亲亲漫画首页"]:hover {
  transform: scale(1.05);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

header nav ul li a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--primary);
  background: rgba(255, 107, 157, 0.1);
  transform: translateY(-2px);
}

/* ===== Main layout ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0;
  scroll-margin-top: 80px;
}

section > article {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

section > article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

section > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 107, 157, 0.35);
}

section > article:hover::after {
  opacity: 1;
}

section > article > * {
  position: relative;
  z-index: 1;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  margin: 1.5rem 0 0;
  padding: 3.5rem 2.5rem;
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  top: -180px;
  right: -120px;
  filter: blur(10px);
  z-index: -1;
  animation: float 8s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  bottom: -140px;
  left: -80px;
  filter: blur(8px);
  z-index: -1;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 20px) scale(1.06); }
}

#hero h1 {
  background: none;
  -webkit-text-fill-color: #FFFFFF;
  color: #FFFFFF;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  max-width: 820px;
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 780px;
  font-size: 1.02rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

#hero > a {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.85rem 2.4rem;
  background: #FFFFFF;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

#hero > a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  background: #FFF0F5;
  color: var(--primary-dark);
}

/* ===== Section intro paragraph ===== */
section > p {
  font-size: 1.02rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ===== News articles ===== */
#news article h3 a {
  color: var(--text);
  transition: color var(--transition);
}

#news article h3 a:hover {
  color: var(--primary);
}

#news article > p:nth-of-type(1) {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

#news article > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 107, 157, 0.1);
  transition: all var(--transition);
}

#news article > a:last-child::after {
  content: "→";
  transition: transform var(--transition);
}

#news article > a:last-child:hover {
  background: var(--gradient-btn);
  color: #FFFFFF;
  transform: translateX(4px);
}

#news article > a:last-child:hover::after {
  transform: translateX(4px);
}

/* ===== FAQ ===== */
#faq article {
  cursor: default;
}

#faq article h3 {
  position: relative;
  padding-left: 1.6rem;
  color: var(--primary-dark);
}

#faq article h3::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--gradient-btn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 0.22em;
}

/* ===== Contact ===== */
#contact address {
  font-style: normal;
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.5rem;
}

#contact address p {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

#contact address p:last-child {
  border-bottom: none;
}

#contact address a {
  font-weight: 600;
  position: relative;
}

#contact address a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gradient-btn);
  border-radius: 2px;
  transition: width var(--transition);
}

#contact address a:hover::after {
  width: 100%;
}

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.06);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #FFFFFF;
  background: var(--gradient-btn);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
}

/* ===== Footer ===== */
footer {
  margin-top: 3rem;
  padding: 3rem 1.5rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
}

footer {
  max-width: 100%;
}

footer > section {
  max-width: 1200px;
  margin: 0 auto 1.75rem;
  padding: 0;
}

footer > section:last-child {
  margin-bottom: 0;
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  padding-left: 0.85rem;
}

footer h2::before {
  width: 4px;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

footer a {
  font-weight: 600;
}

/* ===== Scroll animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

section {
  animation: fadeUp 0.7s ease both;
}

#hero { animation-delay: 0.05s; }
#brand { animation-delay: 0.1s; }
#products { animation-delay: 0.15s; }
#advantages { animation-delay: 0.2s; }
#solutions { animation-delay: 0.25s; }
#cases { animation-delay: 0.3s; }
#news { animation-delay: 0.35s; }
#knowledge { animation-delay: 0.4s; }
#howto { animation-delay: 0.45s; }
#faq { animation-delay: 0.5s; }
#contact { animation-delay: 0.55s; }
#sitemap { animation-delay: 0.6s; }
#links { animation-delay: 0.65s; }

@supports (animation-timeline: view()) {
  section > article {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* ===== Focus states ===== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Selection ===== */
::selection {
  background: var(--primary);
  color: #FFFFFF;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent-light));
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  main {
    padding: 0 1.1rem;
  }

  section {
    padding: 2.25rem 0;
  }

  section > article {
    padding: 1.4rem 1.4rem;
  }

  #hero {
    padding: 2.75rem 1.75rem;
    border-radius: var(--radius);
  }

  header nav ul li a {
    padding: 0.45rem 0.7rem;
    font-size: 0.86rem;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  header nav > div {
    padding: 0.6rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  header nav ul {
    width: 100%;
    gap: 0.15rem;
    justify-content: flex-start;
  }

  header nav ul li a {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  main {
    padding: 0 0.9rem;
  }

  section {
    padding: 1.75rem 0;
    scroll-margin-top: 120px;
  }

  section > article {
    padding: 1.15rem 1.1rem;
    border-radius: var(--radius-sm);
  }

  #hero {
    padding: 2rem 1.25rem;
    margin: 1rem 0 0;
  }

  #hero p {
    font-size: 0.95rem;
  }

  #hero > a {
    padding: 0.75rem 1.8rem;
    font-size: 0.98rem;
  }

  h2 {
    padding-left: 0.9rem;
  }

  #contact address {
    padding: 1.25rem;
  }

  #contact address p {
    flex-direction: column;
    gap: 0.1rem;
  }

  #sitemap ul,
  #links ul {
    gap: 0.45rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.42rem 0.9rem;
    font-size: 0.82rem;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #hero > a {
    display: none;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }

  section > article {
    box-shadow: none;
    border: 1px solid #CCCCCC;
    break-inside: avoid;
  }
}