/* =========================================================
   蜜桃网 · 全站样式表 (style.css)
   s3rww.cn | 影视资讯与测评平台
   ========================================================= */

/* ---------- 全局重置 ---------- */
*,
*::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, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f9fafb 0%, #f0f4f8 100%);
  color: #1f2937;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- 暗色模式 ---------- */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
  color: #e5e7eb;
}

body.dark-mode .card,
body.dark-mode .faq-item,
body.dark-mode .article-card,
body.dark-mode .bg-white {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #e5e7eb !important;
  border-color: rgba(55, 65, 81, 0.5) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4 {
  color: #f9fafb !important;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode .paragraph,
body.dark-mode .description {
  color: #e2e8f0 !important;
}

body.dark-mode .text-secondary,
body.dark-mode .meta,
body.dark-mode .date,
body.dark-mode .author,
body.dark-mode .summary,
body.dark-mode .footnote {
  color: #cbd5e1 !important;
}

body.dark-mode .navbar {
  background: rgba(15, 23, 42, 0.85) !important;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

body.dark-mode .site-footer {
  background: rgba(2, 6, 23, 0.95) !important;
  border-top: 1px solid rgba(55, 65, 81, 0.3);
}

body.dark-mode a {
  color: #93c5fd;
}

body.dark-mode a:hover {
  color: #bfdbfe;
}

body.dark-mode .btn {
  background: #3b82f6;
  color: #fff !important;
}

body.dark-mode .btn-outline {
  border-color: #93c5fd;
  color: #93c5fd;
}

body.dark-mode .btn-outline:hover {
  background: rgba(59, 130, 246, 0.15);
}

body.dark-mode .search-input {
  background: rgba(30, 41, 59, 0.9);
  color: #f9fafb;
  border-color: rgba(75, 85, 99, 0.6);
}

body.dark-mode .search-input::placeholder {
  color: #9ca3af;
}

body.dark-mode .search-btn,
body.dark-mode .menu-toggle {
  color: #e5e7eb;
}

body.dark-mode .mobile-nav {
  background: rgba(30, 41, 59, 0.95);
  border-top-color: #374151;
}

body.dark-mode .mobile-nav a {
  color: #e2e8f0;
}

body.dark-mode .stat-number {
  color: #7dd3fc;
}

body.dark-mode .svg-img {
  background-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .to-top {
  background: #334155;
  color: #fff;
}

/* ---------- 文字排版 ---------- */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; position: relative; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p, li {
  color: #1e293b;
  font-size: 1rem;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ---------- 布局容器 ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
  position: relative;
}

/* ---------- 玻璃拟态工具类 ---------- */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
}

body.dark-mode .glass {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.4);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

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

.logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

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

body.dark-mode .logo {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-weight: 500;
  color: #1e293b;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: width 0.3s ease;
}

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

.nav-links a:hover {
  color: #2563eb;
  text-decoration: none;
}

body.dark-mode .nav-links a {
  color: #e2e8f0;
}

body.dark-mode .nav-links a:hover {
  color: #93c5fd;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input {
  padding: 10px 18px;
  border-radius: 30px;
  border: 1.5px solid rgba(203, 213, 225, 0.8);
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  width: 200px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  width: 240px;
}

.search-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #1f2937;
  transition: transform 0.2s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

body.dark-mode .menu-toggle {
  color: #e5e7eb;
}

/* ---------- 移动导航 ---------- */
.mobile-nav {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e5e7eb;
  padding: 16px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: #1e293b;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  transition: color 0.2s ease, padding-left 0.3s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: #2563eb;
  padding-left: 8px;
  text-decoration: none;
}

.mobile-nav.show {
  display: block;
  animation: slideDown 0.3s ease;
}

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff !important;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::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 ease;
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  text-decoration: none;
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 500;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff !important;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  text-decoration: none;
}

/* ---------- 卡片 ---------- */
.card,
.faq-item,
.article-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s ease;
  color: #1e293b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card:hover,
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

body.dark-mode .card:hover,
body.dark-mode .article-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 轮播 Banner ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: 100%;
  padding: 60px 50px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  color: #ffffff;
  position: relative;
}

.carousel-slide::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.carousel-slide h2 {
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.carousel-slide p {
  color: #cbd5e1;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.carousel-slide .btn {
  position: relative;
  z-index: 1;
}

body.dark-mode .carousel-slide {
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* 轮播指示器 */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: #3b82f6;
  width: 24px;
  border-radius: 4px;
}

/* ---------- 数字统计 ---------- */
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

body.dark-mode .stat-number {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- FAQ ---------- */
.faq-item {
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  padding: 8px 0;
}

.faq-question span {
  transition: transform 0.3s ease;
  font-size: 1.4rem;
  color: #2563eb;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1e293b;
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  margin-top: 8px;
}

/* ---------- 图片占位 ---------- */
.svg-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.svg-img:hover {
  transform: scale(1.02);
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.4rem;
  z-index: 200;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #cbd5e1;
  padding: 50px 0 30px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.site-footer a {
  color: #9ca3af;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ---------- 通用工具 ---------- */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 12px; }
.hidden { display: none; }

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(229, 231, 235, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
}

/* 选择文本 */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: #0f172a;
}

/* 文章卡片特殊样式 */
.article-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-card h4 {
  font-size: 1.2rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.article-card:hover h4 {
  color: #2563eb;
}

.article-card .meta {
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  gap: 8px;
  align-items: center;
}

.article-card .summary {
  color: #475569;
  font-size: 0.95rem;
  flex: 1;
}

.article-card .btn-outline {
  align-self: flex-start;
  font-size: 0.9rem;
}

/* 客户评价样式 */
blockquote {
  position: relative;
  padding-left: 20px;
  margin: 10px 0;
  font-style: italic;
  border-left: 3px solid #2563eb;
}

/* 联系卡片 */
.contact-info p {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 暗色模式切换按钮 */
.dark-mode-toggle {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border: none;
  z-index: 200;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  transform: translateY(-5px) rotate(15deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* 小屏幕适配 */
@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel-slide {
    padding: 40px 30px;
  }

  .carousel-slide h2 {
    font-size: 2rem;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .search-box {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.show {
    display: block;
  }

  .section {
    padding: 40px 0;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }

  .container {
    padding: 0 16px;
  }

  .carousel-slide {
    padding: 30px 20px;
  }

  .carousel-slide h2 {
    font-size: 1.6rem;
  }

  .carousel-slide p {
    font-size: 1rem;
  }

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

@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .to-top,
  .dark-mode-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 20px;
    right: 20px;
  }

  .dark-mode-toggle {
    bottom: 70px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.6s ease both;
}

/* 滚动进入视图动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 装饰性渐变背景 */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

/* 打印样式 */
@media print {
  .navbar,
  .carousel,
  .to-top,
  .dark-mode-toggle,
  .mobile-nav,
  .search-box {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .faq-item,
  .article-card {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* 性能优化：减少重排 */
.card,
.faq-item,
.article-card {
  will-change: transform;
}

.carousel-track {
  will-change: transform;
}

/* 暗色模式过渡 */
body,
body * {
  transition-property: background, background-color, color, border-color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}