/* 蜜桃影院 自定义样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  background: #0d0d0f;
  color: #f5f5f7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 头部 ---------- */
.header {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ff6b6b;
  text-decoration: none;
}

.logo span {
  color: #fff;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.search-box {
  display: flex;
  gap: 6px;
}

.search-box input {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  width: 180px;
}

.search-box button {
  padding: 6px 16px;
  border-radius: 20px;
  border: none;
  background: #ff6b6b;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.dark-toggle {
  background: none;
  border: 2px solid #ff6b6b;
  color: #ff6b6b;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ---------- 渐变Banner ---------- */
.banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 20px 0;
  background: linear-gradient(135deg, #1e1e32 0%, #2b1e3e 50%, #3a1a2e 100%);
  min-height: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.banner-slide {
  display: none;
  padding: 40px 30px;
  color: #fff;
  animation: fade 0.6s;
  background: radial-gradient(circle at 20% 30%, rgba(255, 107, 107, 0.15) 0%, transparent 60%);
}

.banner-slide.active {
  display: block;
}

.banner-slide h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner-slide p {
  font-size: 1.1rem;
  color: #ccc;
}

.banner-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.banner-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #555;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.banner-dots span.active {
  background: #ff6b6b;
  transform: scale(1.2);
}

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

/* ---------- 通用区块 ---------- */
.section {
  margin: 40px 0;
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-left: 5px solid #ff6b6b;
  padding-left: 15px;
}

.section h3 {
  font-size: 1.3rem;
  margin: 20px 0 10px;
}

.section h4 {
  font-size: 1.1rem;
  margin: 15px 0 8px;
  color: #555;
}

.dark-mode .section h4 {
  color: #aaa;
}

/* ---------- 圆角卡片 + 毛玻璃效果 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode .card {
  background: rgba(28, 28, 36, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  color: #555;
  font-size: 0.95rem;
}

.dark-mode .card p {
  color: #aaa;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
  cursor: pointer;
  transition: background 0.2s;
}

.dark-mode .faq-item {
  border-color: #333;
}

.faq-question {
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  transition: transform 0.3s;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  color: #555;
  margin-top: 6px;
}

.dark-mode .faq-answer {
  color: #aaa;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

/* ---------- HowTo ---------- */
.howto-step {
  background: rgba(249, 249, 251, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .howto-step {
  background: rgba(30, 30, 40, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.howto-step strong {
  color: #ff6b6b;
}

/* ---------- 文章列表 ---------- */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .article-item {
  background: rgba(28, 28, 36, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-item:hover {
  transform: translateY(-2px);
}

.article-item h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.article-item .meta {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.article-item p {
  color: #555;
  font-size: 0.95rem;
}

.dark-mode .article-item p {
  color: #aaa;
}

.read-more {
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 500;
}

/* ---------- 页脚 ---------- */
.footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 40px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}

.footer a {
  color: #ff6b6b;
  text-decoration: none;
}

.footer .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 10px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin: 4px 0;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #ff6b6b;
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  transition: transform 0.3s;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  transform: scale(1.1);
}

/* ---------- 滚动动画 ---------- */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 统计数字 ---------- */
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #ff6b6b;
}

.stat-label {
  color: #888;
  font-size: 0.9rem;
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    justify-content: center;
  }

  .search-box input {
    width: 140px;
  }

  .banner-slide h2 {
    font-size: 1.4rem;
  }

  .section h2 {
    font-size: 1.4rem;
  }

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

  .article-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

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

  .banner-slide h2 {
    font-size: 1.2rem;
  }

  .banner-slide p {
    font-size: 0.95rem;
  }

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