/* ===== 千万影视 全站样式 ===== */
/* ===== 色彩体系与主题变量 ===== */
:root {
  --bg-light: #ffffff;
  --bg-dark: #0f172a;
  --bg-gradient-light: linear-gradient(145deg, #f0f4ff 0%, #ffffff 100%);
  --bg-gradient-dark: linear-gradient(145deg, #0b1220 0%, #1a2332 100%);
  --text-main-light: #1f2937;
  --text-secondary-light: #334155;
  --text-title-light: #0f172a;
  --bg-card-light: rgba(255, 255, 255, 0.85);
  --border-light: rgba(203, 213, 225, 0.6);
  --accent-light: #2563eb;
  --accent-hover-light: #1d4ed8;
  --accent-dark: #3b82f6;
  --accent-hover-dark: #60a5fa;
  --text-main-dark: #e2e8f0;
  --text-secondary-dark: #cbd5e1;
  --text-title-dark: #f8fafc;
  --bg-card-dark: rgba(30, 41, 59, 0.85);
  --border-dark: rgba(71, 85, 105, 0.5);
  --footer-bg-light: #f1f5f9;
  --footer-bg-dark: #0b1220;
  --shadow-light: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-hover-light: 0 20px 40px rgba(37, 99, 235, 0.15);
  --shadow-hover-dark: 0 20px 40px rgba(59, 130, 246, 0.2);
  --glass-light: rgba(255, 255, 255, 0.7);
  --glass-dark: rgba(15, 23, 42, 0.75);
  --glass-border-light: rgba(255, 255, 255, 0.4);
  --glass-border-dark: rgba(148, 163, 184, 0.2);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
}

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

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

@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;
  }
}

body {
  font-family: var(--font-main);
  background: var(--bg-light);
  color: var(--text-main-light);
  margin: 0;
  line-height: 1.7;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-main-dark);
}

body.dark-mode ::selection {
  background: rgba(59, 130, 246, 0.4);
  color: #fff;
}

::selection {
  background: rgba(37, 99, 235, 0.2);
  color: var(--text-title-light);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.6);
  background-clip: content-box;
  border: 2px solid transparent;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border: 2px solid transparent;
  background-clip: content-box;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
  background-clip: content-box;
  border: 2px solid transparent;
}

/* ===== 标题与文字层级 ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-title-light);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease-out);
  font-family: var(--font-main);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: var(--text-title-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent-light), transparent) 1;
  padding-bottom: 0.5rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  max-width: 100%;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-hover-light));
  border-radius: 3px;
  transition: width 0.4s var(--ease-out);
}

h2:hover::after {
  width: 100%;
}

body.dark-mode h2 {
  border-image: linear-gradient(90deg, var(--accent-dark), transparent) 1;
}

body.dark-mode h2::after {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-hover-dark));
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

h4 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary-light);
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

body.dark-mode h4 {
  color: var(--text-secondary-dark);
}

p, li, .text-block {
  color: var(--text-main-light);
  transition: color 0.3s var(--ease-out);
}

body.dark-mode p, body.dark-mode li, body.dark-mode .text-block {
  color: var(--text-main-dark);
}

strong, b {
  font-weight: 600;
  color: inherit;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
  position: relative;
}

body.dark-mode a {
  color: var(--accent-dark);
}

a:hover {
  color: var(--accent-hover-light);
  text-decoration: none;
}

body.dark-mode a:hover {
  color: var(--accent-hover-dark);
}

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

section {
  position: relative;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

section[id] {
  scroll-margin-top: 90px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--glass-light);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  border-bottom: 1px solid var(--glass-border-light);
}

body.dark-mode .navbar {
  background: var(--glass-dark);
  border-bottom-color: var(--glass-border-dark);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  margin-left: 0.3rem;
  font-weight: 500;
  color: var(--text-main-light);
  padding: 0.5rem 0.8rem;
  border-radius: 50px;
  transition: all 0.2s var(--ease-out);
  font-size: 0.95rem;
  position: relative;
}

body.dark-mode .nav-links a {
  color: var(--text-main-dark);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

body.dark-mode .nav-links a::after {
  background: var(--accent-dark);
}

.nav-links a:hover {
  color: var(--accent-light);
  background: rgba(37, 99, 235, 0.08);
}

body.dark-mode .nav-links a:hover {
  color: var(--accent-dark);
  background: rgba(59, 130, 246, 0.15);
}

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

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-title-light);
  background: linear-gradient(135deg, var(--accent-light), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}

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

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-hover-light));
  color: #fff;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

body.dark-mode .btn {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-hover-dark));
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

body.dark-mode .btn:hover {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

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

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2rem;
  margin: 1.5rem 0;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

body.dark-mode .card {
  background: var(--bg-card-dark);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-dark);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

body.dark-mode .card::before {
  background: linear-gradient(90deg, var(--accent-dark), transparent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover-light);
  border-color: rgba(37, 99, 235, 0.3);
}

body.dark-mode .card:hover {
  box-shadow: var(--shadow-hover-dark);
  border-color: rgba(59, 130, 246, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin: 1.8rem 0;
}

.card-grid .card {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-grid .card p {
  flex-grow: 1;
}

/* ===== 表格 ===== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--bg-card-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
}

body.dark-mode table {
  background: var(--bg-card-dark);
  box-shadow: var(--shadow-dark);
  border-color: var(--border-dark);
}

th, td {
  border-bottom: 1px solid var(--border-light);
  padding: 0.9rem 1.2rem;
  text-align: left;
  color: var(--text-main-light);
  transition: background 0.2s var(--ease-out);
}

body.dark-mode th, body.dark-mode td {
  border-bottom-color: var(--border-dark);
  color: var(--text-main-dark);
}

th {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

body.dark-mode th {
  background: linear-gradient(135deg, #334155, #1e293b);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.2s var(--ease-out);
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

body.dark-mode tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* ===== 页脚 ===== */
footer {
  background: var(--footer-bg-light);
  margin-top: 4rem;
  padding: 3rem 0 0;
  border-top: 1px solid var(--border-light);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

body.dark-mode footer {
  background: var(--footer-bg-dark);
  border-top-color: var(--border-dark);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-col {
  min-width: 150px;
}

.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-title-light);
}

body.dark-mode .footer-col h4 {
  color: var(--text-title-dark);
}

.footer-col a {
  display: block;
  margin: 0.4rem 0;
  color: var(--text-secondary-light);
  font-size: 0.95rem;
  transition: all 0.2s var(--ease-out);
  padding: 0.2rem 0;
}

body.dark-mode .footer-col a {
  color: var(--text-secondary-dark);
}

.footer-col a:hover {
  color: var(--accent-light);
  transform: translateX(5px);
}

body.dark-mode .footer-col a:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  padding: 1.5rem 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary-light);
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .footer-bottom {
  color: var(--text-secondary-dark);
  border-top-color: var(--border-dark);
  background: rgba(0, 0, 0, 0.2);
}

/* ===== FAQ 样式 ===== */
details {
  background: var(--bg-card-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

body.dark-mode details {
  background: var(--bg-card-dark);
  border-color: var(--border-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

details:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(4px);
}

body.dark-mode details:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

details::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

body.dark-mode details::before {
  background: linear-gradient(180deg, var(--accent-dark), transparent);
}

details:hover::before {
  opacity: 1;
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--text-title-light);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: color 0.2s var(--ease-out);
  font-size: 1.05rem;
}

body.dark-mode summary {
  color: var(--text-title-dark);
}

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

summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-light);
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s var(--ease-out);
  flex-shrink: 0;
}

body.dark-mode summary::before {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-dark);
}

details[open] summary::before {
  transform: rotate(45deg);
  background: var(--accent-light);
  color: #fff;
}

body.dark-mode details[open] summary::before {
  background: var(--accent-dark);
}

summary:hover {
  color: var(--accent-light);
}

body.dark-mode summary:hover {
  color: var(--accent-dark);
}

details p {
  margin: 1rem 0 0 2.2rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(37, 99, 235, 0.2);
  font-size: 0.98rem;
}

body.dark-mode details p {
  border-left-color: rgba(59, 130, 246, 0.2);
}

/* ===== 图片与占位 ===== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.svg-placeholder {
  background: linear-gradient(145deg, #e5e7eb, #cbd5e1);
  border-radius: 16px;
  width: 100%;
  height: auto;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 600;
  font-size: 1.1rem;
  border: 2px dashed rgba(15, 23, 42, 0.2);
  transition: all 0.3s var(--ease-out);
}

body.dark-mode .svg-placeholder {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}

/* ===== Banner ===== */
.banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: #ffffff;
  padding: 4rem 3rem;
  border-radius: 32px;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(30, 58, 138, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.dark-mode .banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(20deg);
  animation: bannerShine 6s ease infinite;
}

@keyframes bannerShine {
  0%, 100% {
    transform: rotate(20deg) translateX(0);
  }
  50% {
    transform: rotate(20deg) translateX(30%);
  }
}

.banner h2, .banner p {
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.banner h1 {
  color: #ffffff;
  position: relative;
  z-index: 2;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.banner p {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  opacity: 0.95;
  max-width: 600px;
}

.banner .btn {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.banner .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== 滚动动画 ===== */
.reveal {
  opacity: 1;
  transform: none;
}

/* ===== 暗色模式切换按钮 ===== */
#darkModeToggle {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-main-light);
  transition: all 0.3s var(--ease-out);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.dark-mode #darkModeToggle {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--border-dark);
  color: var(--text-main-dark);
}

#darkModeToggle:hover {
  background: rgba(37, 99, 235, 0.2);
  transform: scale(1.05);
}

body.dark-mode #darkModeToggle:hover {
  background: rgba(59, 130, 246, 0.25);
}

#darkModeToggle::before {
  content: '🌙';
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

body.dark-mode #darkModeToggle::before {
  content: '☀️';
  transform: rotate(180deg);
}

/* ===== 移动端菜单 ===== */
.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  transition: all 0.2s var(--ease-out);
  color: var(--text-title-light);
}

body.dark-mode .menu-icon {
  color: var(--text-title-dark);
}

.menu-icon:hover {
  background: rgba(37, 99, 235, 0.1);
}

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .banner {
    padding: 3rem 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 65px;
    right: 16px;
    background: var(--glass-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 200px;
    border: 1px solid var(--glass-border-light);
    animation: slideIn 0.3s var(--ease-out);
  }

  body.dark-mode .nav-links {
    background: var(--glass-dark);
    border-color: var(--glass-border-dark);
  }

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

  .nav-links a {
    margin: 0.3rem 0;
    width: 100%;
    padding: 0.6rem 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: translateX(5px);
  }

  .navbar .menu-icon {
    display: block;
  }

  .navbar {
    padding: 0.6rem 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .banner {
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
  }

  .banner h1 {
    font-size: 1.8rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .banner::before {
    display: none;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

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

  .footer-grid {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-col {
    width: 100%;
  }

  #darkModeToggle {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }

  details {
    padding: 0.8rem 1rem;
  }

  details p {
    margin-left: 1.5rem;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  .card {
    padding: 1.3rem;
  }
}

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

  .banner {
    padding: 2rem 1.2rem;
    margin: 1.5rem 0;
  }

  .banner .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
    margin-top: 2.5rem;
  }

  .navbar {
    padding: 0.5rem 0.8rem;
  }

  .nav-links {
    width: 180px;
    right: 12px;
  }

  .logo {
    font-size: 1.1rem;
  }

  #darkModeToggle {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .navbar, .menu-icon, #darkModeToggle, .btn, footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

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

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ===== 焦点可见性 ===== */
:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

body.dark-mode :focus-visible {
  outline-color: var(--accent-dark);
}

/* ===== 工具类 ===== */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-3 { margin-bottom: 3rem; }

/* ===== 暗色模式过渡优化 ===== */
body.dark-mode .card,
body.dark-mode details,
body.dark-mode table {
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

/* ===== 性能优化：减少重绘 ===== */
.card, details, .banner, .btn {
  will-change: transform, box-shadow;
}

/* ===== 站点地图/联系卡片特殊样式 ===== */
#contact .card p {
  margin-bottom: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-light);
}

body.dark-mode #contact .card p {
  border-bottom-color: var(--border-dark);
}

#contact .card p:last-child {
  border-bottom: none;
}

/* ===== 文章卡片增强 ===== */
#articles .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

#articles .card h4 {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text-title-light);
  transition: color 0.2s var(--ease-out);
}

body.dark-mode #articles .card h4 {
  color: var(--text-title-dark);
}

#articles .card h4:hover {
  color: var(--accent-light);
}

body.dark-mode #articles .card h4:hover {
  color: var(--accent-dark);
}

#articles .card p {
  font-size: 0.95rem;
  margin: 0.3rem 0;
}

#articles .card p:nth-child(2) {
  color: var(--text-secondary-light);
  font-size: 0.85rem;
  opacity: 0.8;
}

body.dark-mode #articles .card p:nth-child(2) {
  color: var(--text-secondary-dark);
}

#articles .card a {
  margin-top: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s var(--ease-out);
}

#articles .card a:hover {
  gap: 0.8rem;
}

/* ===== 评价卡片 ===== */
#testimonials .card {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.05), var(--bg-card-light));
  border-left: 4px solid var(--accent-light);
}

body.dark-mode #testimonials .card {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), var(--bg-card-dark));
  border-left-color: var(--accent-dark);
}

#testimonials .card p:last-child {
  font-style: italic;
  opacity: 0.8;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* ===== HowTo 样式 ===== */
#howto .card ul,
#howto .card ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

#howto .card li {
  margin: 0.5rem 0;
  padding-left: 0.5rem;
}

#howto .card li::marker {
  color: var(--accent-light);
  font-weight: 700;
}

body.dark-mode #howto .card li::marker {
  color: var(--accent-dark);
}

#howto .card h4 {
  margin-top: 1.5rem;
  color: var(--accent-light);
  font-weight: 600;
}

body.dark-mode #howto .card h4 {
  color: var(--accent-dark);
}

/* ===== 高对比度支持 ===== */
@media (prefers-contrast: high) {
  :root {
    --border-light: #94a3b8;
    --border-dark: #64748b;
    --accent-light: #1e40af;
    --accent-dark: #93c5fd;
  }
  
  .card {
    border-width: 2px;
  }
}

/* ===== 减少动效支持 ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: fadeInUp 0.6s var(--ease-out) both;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ===== 滚动进度条 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-hover-light));
  z-index: 2000;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

body:hover::before {
  opacity: 1;
}

@media (min-width: 769px) {
  body::before {
    animation: scrollProgress auto linear both;
    animation-timeline: scroll();
  }
}

@keyframes scrollProgress {
  to {
    transform: scaleX(1);
  }
}

/* ===== 暗色模式下的图片处理 ===== */
body.dark-mode img {
  filter: brightness(0.9) contrast(1.1);
}

/* ===== 链接下划线动画 ===== */
.footer-col a, #contact a {
  background-image: linear-gradient(transparent 95%, var(--accent-light) 95%);
  background-size: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-out), color 0.2s var(--ease-out);
}

.footer-col a:hover, #contact a:hover {
  background-size: 100% 100%;
  color: var(--accent-light);
}

/* ===== 毛玻璃效果增强 ===== */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .navbar, .card, details, .nav-links[style*="flex"] {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}

/* ===== 移动端性能优化 ===== */
@media (max-width: 768px) {
  .card, details, .banner {
    transform: translateZ(0);
  }
}