/* ===== 蚂蚁影院 全站样式 ===== */
:root {
  --primary: #1e5b8a;
  --primary-light: #2d7ab5;
  --primary-dark: #164466;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --bg: #f0f4fa;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-secondary: #52647a;
  --heading: #0d1f33;
  --border: #dce5f0;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
  --bg: #0b1422;
  --bg-card: #141e30;
  --text: #dbe4f0;
  --text-secondary: #a0b0c4;
  --heading: #eef4fb;
  --border: #253349;
  --glass-bg: rgba(20, 30, 48, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ===== 基础重置 ===== */
*,
*::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', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 15% 20%, rgba(45, 122, 181, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 85% 90%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.4s ease;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #fff 60%, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 2.5rem 0 1.5rem;
  position: relative;
  padding-left: 1.2rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 1.6em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

h3 {
  font-size: 1.25rem;
  margin: 1rem 0 0.75rem;
}

h4 {
  font-size: 1.1rem;
  margin: 0.75rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  transition: color 0.4s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

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

body.dark-theme a {
  color: #7cc0ff;
}

body.dark-theme a:hover {
  color: #ffb84d;
}

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

/* ===== 导航栏 ===== */
.nav-bar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.4s ease;
}

body.dark-theme .nav-bar {
  background: rgba(11, 20, 34, 0.85);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
  transition: all 0.3s ease;
}

body.dark-theme .logo {
  color: var(--heading);
}

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

.logo svg {
  transition: transform 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.1);
}

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

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  position: relative;
}

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

.nav-links a:hover {
  color: var(--primary);
  background: rgba(30, 91, 138, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

body.dark-theme .nav-links a:hover {
  color: #7cc0ff;
  background: rgba(124, 192, 255, 0.1);
}

.dark-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 0.4rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.3s ease;
  margin-left: 0.5rem;
  backdrop-filter: blur(10px);
}

.dark-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(30, 91, 138, 0.3);
}

body.dark-theme .dark-toggle:hover {
  background: #7cc0ff;
  color: #0b1422;
  border-color: #7cc0ff;
}

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff !important;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(30, 91, 138, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  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-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(30, 91, 138, 0.4);
  text-decoration: none;
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.65rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(30, 91, 138, 0.25);
  text-decoration: none;
}

body.dark-theme .btn-outline {
  border-color: #7cc0ff;
  color: #7cc0ff;
}

body.dark-theme .btn-outline:hover {
  background: #7cc0ff;
  color: #0b1422 !important;
}

/* ===== Banner ===== */
.banner {
  background: linear-gradient(135deg, #0b2a44 0%, #1e4a6f 40%, #2d6a8f 70%, #3d7fa8 100%);
  color: #fff;
  padding: 4rem 0 4.5rem;
  margin-bottom: 2rem;
  border-radius: 0 0 48px 48px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 40%);
  z-index: -1;
}

.banner::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 70%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

body.dark-theme .banner {
  background: linear-gradient(135deg, #0a1628 0%, #132a44 50%, #1a3b5c 100%);
}

.banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.banner-text {
  flex: 1 1 300px;
  color: #fff;
  animation: fadeInUp 0.8s ease;
}

.banner-text h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  -webkit-text-fill-color: #fff;
}

.banner-text p {
  color: #e0f2fe;
  font-size: 1.15rem;
  max-width: 600px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .banner-text p {
  color: #cce5f5;
}

.banner-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.banner-cta .btn-primary {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0b1e33 !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.banner-cta .btn-primary:hover {
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.5);
  transform: translateY(-3px) scale(1.02);
}

.banner-cta .btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.1);
}

.banner-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff !important;
}

/* Banner 右侧播放图标 */
.banner-visual {
  width: 220px;
  height: 220px;
  background: linear-gradient(145deg, #fff2d0, #ffe8b0);
  border-radius: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  animation: float 4s ease-in-out infinite;
  position: relative;
  flex-shrink: 0;
}

.banner-visual::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 56px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  animation: spin 20s linear infinite;
}

.banner-visual svg {
  filter: drop-shadow(0 8px 16px rgba(30, 91, 138, 0.3));
}

/* ===== 卡片系统 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card,
.article-card,
.faq-item,
.howto-box {
  background: var(--bg-card);
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

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

.card:hover,
.article-card:hover,
.faq-item:hover,
.howto-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 91, 138, 0.3);
}

.card:hover::before,
.article-card:hover::before {
  opacity: 1;
}

body.dark-theme .card,
body.dark-theme .article-card,
body.dark-theme .faq-item,
body.dark-theme .howto-box {
  background: var(--bg-card);
  border-color: var(--border);
}

body.dark-theme .card:hover,
body.dark-theme .article-card:hover {
  border-color: rgba(124, 192, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card h3,
.article-card h3 {
  margin-top: 0;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.card h4 {
  font-size: 1.1rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

body.dark-theme .card h4 {
  color: #7cc0ff;
}

.card p,
.article-card p {
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* ===== 徽章 ===== */
.badge {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a5f;
  padding: 0.25rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(30, 91, 138, 0.1);
  transition: all 0.3s ease;
}

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

body.dark-theme .badge {
  background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
  color: #bfdbfe;
}

/* ===== FAQ ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

details {
  background: var(--bg-card);
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

details:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

body.dark-theme details {
  background: var(--bg-card);
  border-color: var(--border);
}

details[open] {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 91, 138, 0.03), rgba(245, 158, 11, 0.03));
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.3s ease;
}

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

summary::before {
  content: '▸';
  color: var(--primary);
  transition: transform 0.3s ease;
  font-size: 1.1rem;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

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

body.dark-theme details[open] summary {
  color: #7cc0ff;
}

details p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  padding-left: 1.8rem;
  animation: fadeIn 0.4s ease;
}

/* ===== 表格 ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

body.dark-theme table {
  background: var(--bg-card);
}

th,
td {
  border: none;
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

th {
  background: linear-gradient(135deg, #e6edf5, #dbe4f0);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

body.dark-theme th {
  background: linear-gradient(135deg, #1a2a3f, #22354e);
  color: #eef4fb;
}

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

tr:hover td {
  background: rgba(30, 91, 138, 0.04);
}

body.dark-theme tr:hover td {
  background: rgba(124, 192, 255, 0.05);
}

td {
  color: var(--text);
  font-size: 0.95rem;
}

/* ===== 滚动动画 ===== */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== 区块通用 ===== */
section {
  margin: 3rem 0;
  scroll-margin-top: 90px;
}

section > h2:first-child {
  margin-top: 0;
}

/* ===== 文章卡片增强 ===== */
.article-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.article-card h3 {
  font-size: 1.15rem;
  line-height: 1.5;
  flex-grow: 1;
}

.article-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-card a {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  transition: all 0.3s ease;
}

.article-card a::after {
  content: '→';
  transition: transform 0.3s ease;
}

.article-card a:hover {
  color: var(--accent);
  gap: 0.6rem;
}

body.dark-theme .article-card a {
  color: #7cc0ff;
}

body.dark-theme .article-card a:hover {
  color: #ffb84d;
}

/* ===== HowTo 样式 ===== */
.howto-box {
  padding: 2rem;
}

.howto-box h4 {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

body.dark-theme .howto-box h4 {
  color: #7cc0ff;
}

.howto-box ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  counter-reset: howto;
  list-style: none;
}

.howto-box ol li {
  counter-increment: howto;
  position: relative;
  padding: 0.8rem 1rem 0.8rem 3rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(30, 91, 138, 0.05), rgba(245, 158, 11, 0.05));
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.howto-box ol li:hover {
  transform: translateX(6px);
  background: linear-gradient(135deg, rgba(30, 91, 138, 0.1), rgba(245, 158, 11, 0.08));
}

.howto-box ol li::before {
  content: counter(howto);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(30, 91, 138, 0.3);
}

.howto-box p {
  padding-left: 0.5rem;
  font-size: 0.95rem;
}

.howto-box p strong {
  color: var(--heading);
}

body.dark-theme .howto-box p strong {
  color: #eef4fb;
}

/* ===== 评价卡片 ===== */
.card-grid .card:has(> :first-child:contains('⭐')) {
  background: linear-gradient(135deg, #fffdf5, #fff8e6);
}

body.dark-theme .card-grid .card:has(> :first-child:contains('⭐')) {
  background: linear-gradient(135deg, #1a2438, #1e2a40);
}

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(135deg, #0d1f33, #16293f);
  color: #e2e8f0;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
}

body.dark-theme .footer {
  background: linear-gradient(135deg, #070f1d, #0d1a2b);
}

.footer p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer p:first-child {
  font-size: 1.1rem;
  color: #f1f5f9;
  font-weight: 600;
}

.footer a {
  color: #93c5fd;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== 联系区块 ===== */
#联系 {
  background: linear-gradient(135deg, rgba(30, 91, 138, 0.05), rgba(245, 158, 11, 0.05));
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

#联系::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
}

body.dark-theme #联系 {
  background: linear-gradient(135deg, rgba(124, 192, 255, 0.05), rgba(255, 184, 77, 0.05));
}

#联系 p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

#联系 a {
  font-weight: 600;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30, 91, 138, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px rgba(30, 91, 138, 0.4);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

body.dark-theme .back-to-top {
  background: linear-gradient(135deg, #7cc0ff, #6ab0f0);
  color: #0b1422;
  box-shadow: 0 4px 16px rgba(124, 192, 255, 0.3);
}

body.dark-theme .back-to-top:hover {
  background: linear-gradient(135deg, #ffb84d, #f5a623);
  color: #0b1422;
}

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

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 16px;
  }
  
  .banner {
    padding: 3rem 0;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .nav-links {
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
  }
  
  .nav-links a {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
  
  .dark-toggle {
    margin-left: 0.25rem;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
  }
  
  .banner-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }
  
  .banner-visual {
    width: 160px;
    height: 160px;
    border-radius: 36px;
  }
  
  .banner-visual svg {
    width: 90px;
    height: 90px;
  }
  
  .banner-text p {
    margin: 0 auto;
  }
  
  .banner-cta {
    justify-content: center;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    margin: 2.5rem 0;
  }
  
  .howto-box {
    padding: 1.5rem;
  }
  
  .howto-box ol li {
    padding: 0.7rem 0.8rem 0.7rem 2.6rem;
  }
  
  .howto-box ol li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    left: 0.8rem;
  }
  
  #联系 {
    padding: 1.5rem;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.3rem;
  }
  
  .logo svg {
    width: 28px;
    height: 28px;
  }
  
  .nav-links {
    gap: 0;
  }
  
  .nav-links a {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
  
  .dark-toggle {
    font-size: 0.8rem;
    padding: 0.25rem 0.7rem;
  }
  
  .banner {
    border-radius: 0 0 32px 32px;
    padding: 2.5rem 0;
  }
  
  .banner-visual {
    width: 130px;
    height: 130px;
    border-radius: 28px;
  }
  
  .banner-visual svg {
    width: 70px;
    height: 70px;
  }
  
  .banner-text h1 {
    font-size: 1.8rem;
  }
  
  .banner-text p {
    font-size: 1rem;
  }
  
  .btn-primary,
  .btn-outline {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .card,
  .article-card {
    padding: 1.2rem;
  }
  
  details {
    padding: 0.8rem 1rem;
  }
  
  details p {
    padding-left: 1.5rem;
  }
  
  th, td {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .footer {
    padding: 2rem 0 1.5rem;
  }
}

/* ===== 无障碍 ===== */
@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;
  }
}

/* ===== 选择高亮 ===== */
::selection {
  background: rgba(30, 91, 138, 0.2);
  color: var(--heading);
}

body.dark-theme ::selection {
  background: rgba(124, 192, 255, 0.3);
  color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 6px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
}

body.dark-theme ::-webkit-scrollbar-track {
  background: #0b1422;
}

body.dark-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d4a6f, #1e3a5f);
  border-color: #0b1422;
}

/* ===== 链接卡片特殊处理 ===== */
.card a,
.article-card a {
  color: var(--primary);
  font-weight: 600;
}

body.dark-theme .card a,
body.dark-theme .article-card a {
  color: #7cc0ff;
}

/* ===== 星星评分 ===== */
.card-grid .card p:first-child {
  font-size: 1.3rem;
  letter-spacing: 0.1em;
}

/* ===== 结构化数据区块 ===== */
.schema-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

body.dark-theme .schema-block {
  background: var(--bg-card);
  border-color: var(--border);
}

/* ===== 打印样式 ===== */
@media print {
  .nav-bar,
  .banner,
  .back-to-top,
  .dark-toggle {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .card,
  .article-card,
  details {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}