```css
/* ==========================================================
   男同网站 - 同志影视动漫社区
   完整样式表 | lihuanshangmao.com
   ========================================================== */

/* ---------- CSS变量与主题 ---------- */
:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --secondary: #764ba2;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #334155;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.dark {
  --bg: #0b1120;
  --bg-alt: #111a2e;
  --card-bg: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
}

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

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  font-size: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input {
  font-family: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

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

::selection {
  background: var(--primary);
  color: white;
}

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--card-bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
  transition: var(--transition);
  flex-shrink: 0;
}

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

.logo svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}

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

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

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border-radius: 50px;
  padding: 8px 18px;
  border: 1px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.search-box svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 150px;
  font-size: 0.9rem;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.dark-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  padding: 4px;
  transition: var(--transition);
}

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

/* ---------- 移动端菜单 ---------- */
#mobileMenu {
  display: none;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
}

#mobileMenu a {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
}

#mobileMenu a:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ---------- Hero区 ---------- */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #a855f7 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    transform: translateX(0) scale(1);
  }
  100% {
    transform: translateX(30px) scale(1.1);
  }
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out;
}

.hero-section p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 720px;
  margin: 0 auto 40px;
  opacity: 0.92;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

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

.btn-primary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.5px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn-primary:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
  color: var(--text);
  letter-spacing: -0.5px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
}

/* ---------- 网格布局 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

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

/* ---------- 卡片 ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 700;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- 文章卡片 ---------- */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.article-card svg {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.article-card:hover svg {
  transform: scale(1.03);
}

.article-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.2s;
}

.article-card:hover .article-content h3 {
  color: var(--primary);
}

.article-content .meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-content p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  transition: var(--transition);
  align-self: flex-start;
}

.read-more:hover {
  transform: translateX(6px);
  color: var(--primary-dark);
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-item:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: var(--shadow-hover);
}

.faq-item summary {
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

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

.faq-item[open] summary {
  color: var(--primary);
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- HowTo ---------- */
.howto-step {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.howto-step:hover {
  background: color-mix(in srgb, var(--bg-alt) 90%, var(--primary) 10%);
  transform: translateX(4px);
}

.howto-step h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

.howto-step p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

.howto-step p strong {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 统计数字 ---------- */
.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 40px;
  transition: background 0.3s ease;
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ---------- 滚动动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

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

/* 延迟动画 */
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

/* ---------- 轮播横幅 ---------- */
.banner-carousel {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.banner-carousel::-webkit-scrollbar {
  display: none;
}

.banner-item {
  min-width: 80%;
  scroll-snap-align: start;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  padding: 48px;
  color: white;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.banner-item::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .nav-links {
    gap: 20px;
  }

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

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

  .nav .container {
    height: 60px;
    gap: 12px;
  }

  .nav-links,
  .search-box {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo svg {
    width: 28px;
    height: 28px;
  }

  .hero-section {
    padding: 60px 0;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .card {
    padding: 24px;
  }

  .howto-step {
    padding: 20px;
  }

  .footer-links {
    gap: 16px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .dark-toggle {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
}

/* ---------- 暗色模式细节 ---------- */
body.dark .nav {
  background: color-mix(in srgb, var(--card-bg) 85%, transparent);
}

body.dark .hero-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
}

body.dark .faq-item summary::after {
  color: var(--primary);
}

body.dark .stat-number {
  background: linear-gradient(135deg, #93c5fd, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 辅助工具类 ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* ---------- 打印样式 ---------- */
@media print {
  .nav,
  .back-to-top,
  .dark-toggle,
  .menu-toggle,
  .search-box,
  .footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 20px 0;
  }

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

/* ---------- 无障碍 ---------- */
@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,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 性能优化 ---------- */
.card,
.article-card,
.faq-item,
.btn-primary,
.dark-toggle,
.menu-toggle {
  will-change: transform, box-shadow;
}
```