/* 全局重置与变量 */
:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --primary: #e94560;
  --secondary: #0f3460;
  --accent: #16213e;
  --card-bg: rgba(248, 249, 250, 0.8);
  --border: #e0e0e0;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 16px;
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

body.dark-mode {
  --bg: #1a1a2e;
  --text: #e0e0e0;
  --card-bg: rgba(22, 33, 62, 0.8);
  --border: #2a2a4e;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(26, 26, 46, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
  color: #d63851;
}

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

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

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, #fff, #ffd6d6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

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

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

p {
  margin-bottom: 1rem;
}

/* 按钮样式 */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #ff6b81);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
  text-decoration: none;
  color: #fff;
}

/* 头部导航 */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.logo {
  display: flex;
  align-items: center;
  transition: transform var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

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

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

.dark-mode-toggle,
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover,
.mobile-menu-toggle:hover {
  background: var(--card-bg);
  transform: rotate(15deg);
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Banner 渐变背景 */
#hero {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  background: linear-gradient(135deg, var(--secondary) 0%, #1a1a2e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(15, 52, 96, 0.2) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(2%, 2%) scale(1.1);
  }
}

.slide {
  display: none;
  padding: 100px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease;
}

.slide.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-content {
  max-width: 700px;
  margin: 0 auto;
}

.slide-content h1,
.slide-content h2 {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slide-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.slider-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
  padding: 0 16px;
}

.slider-controls button {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--glass-shadow);
}

.slider-controls button:hover {
  background: var(--primary);
  transform: scale(1.1);
  border-color: var(--primary);
}

.slider-dots {
  text-align: center;
  padding: 16px;
  position: relative;
  z-index: 2;
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  margin: 0 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.dot.active {
  background: var(--primary);
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.5);
}

/* 通用卡片样式 - 圆角 + 毛玻璃效果 */
.product-card,
.solution-card,
.knowledge-card,
.service-item,
.feature,
blockquote,
details {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card::before,
.solution-card::before,
.knowledge-card::before,
.service-item::before,
.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #ff6b81, var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.product-card:hover::before,
.solution-card:hover::before,
.knowledge-card:hover::before,
.service-item:hover::before,
.feature:hover::before {
  transform: scaleX(1);
}

.product-card:hover,
.solution-card:hover,
.knowledge-card:hover,
.service-item:hover,
.feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* 网格布局 */
.about-grid,
.products-grid,
.services-grid,
.solutions-grid,
.features-grid,
.testimonials-grid,
.knowledge-grid,
.contact-grid {
  display: grid;
  gap: 32px;
}

.about-grid {
  grid-template-columns: 2fr 1fr;
}

.products-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.solutions-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.knowledge-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-grid {
  grid-template-columns: 1fr 1fr;
}

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

  .products-grid,
  .services-grid,
  .solutions-grid,
  .features-grid,
  .testimonials-grid,
  .knowledge-grid {
    gap: 20px;
  }
}

/* 统计数字动画 */
.stat {
  text-align: center;
  padding: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #ff6b81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.8;
}

/* 引用块 */
blockquote {
  padding: 24px 28px;
  border-left: 4px solid var(--primary);
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 12px;
  color: var(--primary);
  opacity: 0.3;
  font-family: Georgia, serif;
}

blockquote p {
  font-style: italic;
  font-size: 1.05rem;
  padding-left: 24px;
}

blockquote footer {
  margin-top: 12px;
  font-weight: 600;
  color: var(--primary);
  border: none;
  background: none;
  padding: 0;
  backdrop-filter: none;
}

/* FAQ 手风琴 */
details {
  padding: 18px 24px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

details:hover {
  border-color: var(--primary);
}

details summary {
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--transition);
}

details summary::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform var(--transition);
  color: var(--primary);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details[open] {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.1);
}

details p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 指南列表 */
#howto ol {
  padding-left: 24px;
  counter-reset: step;
}

#howto li {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  list-style: none;
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  transition: all var(--transition);
}

#howto li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #ff6b81);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

#howto li:hover {
  transform: translateX(8px);
  border-color: var(--primary);
}

/* 联系表单 */
.contact-form {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: block;
  margin-top: 16px;
  font-weight: 500;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition);
  margin-top: 6px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

.contact-form button {
  margin-top: 20px;
  width: 100%;
}

/* 联系信息 */
.contact-info {
  padding: 32px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.contact-info p {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  transition: all var(--transition);
}

.contact-info p:hover {
  transform: translateX(4px);
  border-left: 3px solid var(--primary);
}

/* 页脚 */
footer {
  background: var(--accent);
  color: #ccc;
  padding: 60px 0 24px;
  margin-top: 60px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #ff6b81, var(--secondary));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}

.footer-col h3,
.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #aaa;
  transition: all var(--transition);
  display: inline-block;
}

.footer-col a:hover {
  color: var(--primary);
  transform: translateX(4px);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 32px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, var(--primary), #ff6b81);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
}

/* 滚动动画 */
section {
  opacity: 0;
  transform: translateY(40px);
  animation: sectionFadeIn 0.8s ease forwards;
}

@keyframes sectionFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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:nth-child(11) {
  animation-delay: 1s;
}

/* 辅助功能 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 响应式微调 */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .slide {
    padding: 60px 16px;
  }

  .slider-controls button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .product-card,
  .solution-card,
  .knowledge-card,
  .service-item,
  .feature {
    padding: 20px;
  }

  .contact-form {
    padding: 20px;
  }
}