/* 玩偶姐姐 - 完整样式表 */
/* 版本: 1.0 | 最后更新: 2025-04-28 */

/* ===== CSS变量 & 主题 ===== */
:root {
  /* 主色调 - 温暖粉紫 */
  --primary: #e84393;
  --primary-light: #f8a5c2;
  --primary-dark: #c44569;
  --accent: #f5a623;
  --accent-light: #ffd32a;
  --accent-dark: #d98026;

  /* 渐变 */
  --gradient-banner: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 30%, #e1bee7 60%, #d1c4e9 100%);
  --gradient-card: linear-gradient(145deg, #fff5f7, #fce4ec);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));

  /* 毛玻璃 */
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(232, 67, 147, 0.15);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* 颜色 */
  --text-primary: #2d1b3d;
  --text-secondary: #6c5b7b;
  --text-muted: #9b8ea7;
  --bg-body: #faf5ff;
  --bg-card: #ffffff;
  --bg-section: #fef6fb;
  --border-color: #f0e6f6;

  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 20px rgba(232, 67, 147, 0.2);
}

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f0e6f6;
    --text-secondary: #c4b5d4;
    --text-muted: #8b7a9e;
    --bg-body: #1a1028;
    --bg-card: #2d1b3d;
    --bg-section: #231633;
    --border-color: #3d2a52;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
    --gradient-banner: linear-gradient(135deg, #2d1b3d 0%, #3d2a52 30%, #4a2d5c 60%, #5c3d72 100%);
    --gradient-card: linear-gradient(145deg, #2d1b3d, #3d2a52);
    --glass-bg: rgba(45, 27, 61, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
    --bg-card: #2d1b3d;
  }
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== 通用动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== 头部导航 ===== */
header {
  background: var(--gradient-banner);
  padding: var(--space-lg) var(--space-xl);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(232,67,147,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(245,166,35,0.08) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

/* 导航 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-sm) var(--space-xl);
  animation: slideDown 0.5s ease-out;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

nav ul li a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: var(--primary);
  background: rgba(232, 67, 147, 0.08);
}

nav ul li a:hover::after {
  width: 60%;
}

/* Header 内容 */
header h1 {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary-dark));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
  margin-bottom: var(--space-lg);
  text-shadow: none;
  position: relative;
  z-index: 1;
}

header p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

/* ===== 主体 ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* ===== 面包屑 ===== */
[aria-label="面包屑导航"] {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

[aria-label="面包屑导航"] ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

[aria-label="面包屑导航"] ol li {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

[aria-label="面包屑导航"] ol li + li::before {
  content: '›';
  margin-right: var(--space-sm);
  color: var(--primary-light);
}

[aria-label="面包屑导航"] ol li a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== 通用区块 ===== */
section {
  margin-bottom: var(--space-3xl);
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }

section h2 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ===== 卡片样式 ===== */
article {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--primary-light);
}

article:hover::before {
  transform: scaleX(1);
}

article h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
}

article p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== 毛玻璃卡片 (用于特殊区块) ===== */
section#solutions article,
section#cases article {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ===== 新闻中心 ===== */
#news article {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

#news article time {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  display: block;
  margin-bottom: var(--space-sm);
}

#news article a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

#news article a:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(232, 67, 147, 0.3);
}

/* ===== FAQ ===== */
#faq details {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

#faq details:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

#faq details summary {
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
  user-select: none;
}

#faq details summary::-webkit-details-marker {
  display: none;
}

#faq details summary::after {
  content: '+';
  font-size: var(--font-size-xl);
  color: var(--primary);
  transition: transform 0.3s ease;
}

#faq details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

#faq details summary:hover {
  background: rgba(232, 67, 147, 0.05);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
}

#faq details p {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== 教程 ===== */
#howto {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

#howto h2 {
  margin-top: 0;
}

#howto ol {
  padding-left: var(--space-xl);
  margin: var(--space-lg) 0;
}

#howto ol li {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.8;
}

#howto ol li strong {
  color: var(--primary-dark);
}

#howto h3 {
  color: var(--primary-dark);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

#howto p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== 联系我们 ===== */
#contact {
  background: var(--gradient-banner);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

#contact p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

#contact p strong {
  color: var(--text-primary);
}

/* ===== 网站地图 & 友情链接 ===== */
section:last-of-type {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

section:last-of-type nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

section:last-of-type nav ul li a {
  color: var(--primary);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}

section:last-of-type nav ul li a:hover {
  background: rgba(232, 67, 147, 0.1);
  text-decoration: underline;
}

/* 友情链接 */
section:last-of-type > ul {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

section:last-of-type > ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color 0.3s;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

section:last-of-type > ul li a:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}

/* ===== Footer ===== */
footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) var(--space-xl);
  background: var(--gradient-banner);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  text-align: center;
}

footer p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 var(--space-sm);
  transition: color 0.3s;
}

footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== 响应式设计 ===== */

/* 平板 (≤1024px) */
@media (max-width: 1024px) {
  header h1 {
    font-size: var(--font-size-3xl);
  }

  main {
    padding: var(--space-lg);
  }

  article {
    padding: var(--space-lg);
  }

  #howto, #contact {
    padding: var(--space-xl);
  }
}

/* 手机 (≤768px) */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.35rem;
    --font-size-xl: 1.15rem;
  }

  header {
    padding: var(--space-lg);
    min-height: 60vh;
  }

  header h1 {
    font-size: var(--font-size-3xl);
  }

  header p {
    font-size: var(--font-size-base);
  }

  /* 导航在手机上可滚动 */
  nav {
    padding: var(--space-sm) var(--space-md);
    overflow-x: auto;
  }

  nav ul {
    gap: var(--space-sm);
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  nav ul li a {
    font-size: var(--font-size-sm);
    white-space: nowrap;
    padding: var(--space-xs) var(--space-sm);
  }

  main {
    padding: var(--space-md);
  }

  section {
    margin-bottom: var(--space-2xl);
  }

  article {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  #howto, #contact {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  #howto ol {
    padding-left: var(--space-lg);
  }

  /* 面包屑 */
  [aria-label="面包屑导航"] {
    padding: var(--space-sm) var(--space-md);
  }

  /* FAQ */
  #faq details summary {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
  }

  #faq details p {
    padding: 0 var(--space-md) var(--space-md);
  }

  /* Footer */
  footer {
    padding: var(--space-xl) var(--space-md);
  }

  /* 友情链接 */
  section:last-of-type > ul {
    gap: var(--space-sm);
  }
}

/* 小屏手机 (≤480px) */
@media (max-width: 480px) {
  header {
    min-height: 50vh;
    padding: var(--space-md);
  }

  header h1 {
    font-size: 1.65rem;
  }

  header p {
    font-size: var(--font-size-sm);
  }

  nav ul li a {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
  }

  section h2 {
    font-size: var(--font-size-2xl);
  }

  article h3 {
    font-size: var(--font-size-lg);
  }

  #news article a {
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-md);
  }
}

/* ===== 暗色模式微调 ===== */
@media (prefers-color-scheme: dark) {
  article {
    border-color: var(--border-color);
  }

  #faq details {
    border-color: var(--border-color);
  }

  #faq details summary:hover {
    background: rgba(232, 67, 147, 0.1);
  }

  section:last-of-type {
    border: 1px solid var(--border-color);
  }

  section:last-of-type > ul li a {
    border-color: var(--border-color);
  }

  #howto {
    background: var(--gradient-card);
  }

  #contact {
    background: var(--gradient-banner);
  }

  footer {
    background: var(--gradient-banner);
  }
}

/* ===== 打印样式 ===== */
@media print {
  nav {
    position: static;
    background: none;
    backdrop-filter: none;
    border: none;
  }

  header {
    min-height: auto;
    padding: var(--space-lg);
  }

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

  article:hover {
    transform: none;
    box-shadow: none;
  }

  section {
    animation: none;
  }
}

/* ===== 无障碍支持 ===== */
@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;
  }
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #1a1028;
    --text-secondary: #2d1b3d;
    --border-color: #6c5b7b;
  }

  article {
    border-width: 2px;
  }

  nav ul li a {
    text-decoration: underline;
  }
}