/* ===== 辅助类 ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== 跳过导航 ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: #fff;
  padding: 8px 24px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* ===== 全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --primary-color: #4f6ef6;
  --primary-hover: #3b5de7;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #86909C;
  --text-on-primary: #fff;
  --bg-color: #F7F8FA;
  --card-bg: #FFFFFF;
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-tertiary: #999;
  --border-color: #e8ecf1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --nav-bg: #fff;
  --hero-bg-start: #f0f4ff;
  --hero-bg-end: #e8eeff;
  --search-bg: #fff;
  --footer-bg: #fff;
  --footer-brand-color: #1a1a2e;
  --faq-bg: #f8f9fb;
  --input-border: #d0d5dd;
  --modal-bg: #fff;
  --tag-hover-bg: rgba(79, 110, 246, 0.06);
  --guide-bg: #fff;
}

/* ===== 暗色模式 ===== */
[data-theme="dark"] {
  --primary-color: #6b8cff;
  --primary-hover: #5a7bf0;
  --bg-color: #1a1a2e;
  --card-bg: #1e2433;
  --text-primary: #e4e6eb;
  --text-secondary: #b0b3b8;
  --text-tertiary: #8a8d91;
  --border-color: #2d3148;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --nav-bg: #151922;
  --hero-bg-start: #1a1f33;
  --hero-bg-end: #151a2e;
  --search-bg: #1e2433;
  --footer-bg: #151922;
  --footer-brand-color: #e4e6eb;
  --faq-bg: #161b28;
  --input-border: #3a3f55;
  --modal-bg: #1e2433;
  --tag-hover-bg: rgba(107, 140, 255, 0.12);
  --guide-bg: #1e2433;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-color: #6b8cff;
    --primary-hover: #5a7bf0;
    --bg-color: #1a1a2e;
    --card-bg: #1e2433;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-tertiary: #8a8d91;
    --border-color: #2d3148;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --nav-bg: #151922;
    --hero-bg-start: #1a1f33;
    --hero-bg-end: #151a2e;
    --search-bg: #1e2433;
    --footer-bg: #151922;
    --footer-brand-color: #e4e6eb;
    --faq-bg: #161b28;
    --input-border: #3a3f55;
    --modal-bg: #1e2433;
    --tag-hover-bg: rgba(107, 140, 255, 0.12);
    --guide-bg: #1e2433;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
}

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

a:hover {
  color: #1D39C4;
}

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

/* ===== 顶部导航栏（固定） ===== */
.top-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
}

.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-nav .nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.3px;
}

.top-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-nav .nav-links a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.top-nav .nav-links a:hover {
  color: var(--primary-color);
  background: var(--tag-hover-bg);
}

.top-nav .nav-links a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.top-nav .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 8px;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--primary-color);
  background: var(--tag-hover-bg);
}

/* ===== Hero 横幅（轻量） ===== */
.hero-banner {
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
  padding: 48px 0;
  text-align: center;
}

.hero-banner h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-banner .hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.hero-banner .hero-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 搜索 & 筛选工具栏 ===== */
.search-toolbar {
  background: var(--search-bg);
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-toolbar .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-toolbar .search-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  align-items: center;
}

.search-toolbar .search-box {
  flex: 1;
  position: relative;
}

.search-toolbar .search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: all 0.2s;
  outline: none;
}

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

.search-toolbar .search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 110, 246, 0.1);
}

.search-toolbar .search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-toolbar .filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-toolbar .filter-tag {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--search-bg);
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
}

.search-toolbar .filter-tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.search-toolbar .filter-tag.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ===== 排序下拉框 ===== */
.sort-select {
  padding: 7px 32px 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--search-bg);
  color: var(--text-primary);
  transition: all 0.2s;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.sort-select:hover {
  border-color: var(--primary-color);
}

.sort-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 110, 246, 0.1);
}

[data-theme="dark"] .sort-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ===== 能力标签筛选行 ===== */
.feature-tags-bar {
  background: var(--search-bg);
  padding: 0 0 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.feature-tags-bar .container {
  display: flex;
  justify-content: center;
}

.feature-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature-tags .feature-tag {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--search-bg);
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.feature-tags .feature-tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.feature-tags .feature-tag.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ===== 筛选结果计数 ===== */
.filtered-count {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* ===== 统计卡片 ===== */
.stats-section {
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.stat-card.domestic .stat-icon { background: #E8F3FF; color: #4f6ef6; }
.stat-card.permanent .stat-icon { background: #E8FFEA; color: #10b981; }
.stat-card.quota .stat-icon { background: #FFF7E8; color: #f59e0b; }
.stat-card.overseas .stat-icon { background: #F5E8FF; color: #4f6ef6; }

/* ===== 服务商卡片网格 ===== */
.main-content {
  padding: 32px 0 48px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-color);
  color: var(--text-tertiary);
  font-weight: normal;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.provider-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

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

.provider-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.provider-card .provider-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.provider-card .provider-info {
  flex: 1;
  min-width: 0;
}

.provider-card .provider-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.provider-card .provider-name-en {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.provider-card .type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
}

.type-badge.permanent-free {
  background: #d1fae5;
  color: #059669;
}

.type-badge.quota-free {
  background: #fef3c7;
  color: #d97706;
}

.type-badge.overseas {
  background: #fce7f3;
  color: #9d174d;
}

.type-badge.domestic {
  background: #dbeafe;
  color: #1d4ed8;
}

.provider-card .provider-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.provider-card .card-features {
  display: none;
}

.provider-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.provider-card .card-quota {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65%;
}

.provider-card .btn {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.provider-card .btn-primary {
  background: var(--primary-color);
  color: white;
}

.provider-card .btn-primary:hover {
  background: var(--primary-hover);
}

.provider-card .btn-outline {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.provider-card .btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ===== 详情弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--modal-bg);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--modal-bg);
  z-index: 10;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title .provider-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.modal-title h2 {
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-color);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--border-color);
}

.modal-body {
  padding: 24px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section h3::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 2px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  background: var(--bg-color);
  padding: 12px;
  border-radius: var(--radius-md);
}

.info-item .label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.info-item .value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.models-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
}

.model-item .model-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.model-item .model-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.model-item .model-price {
  font-size: 12px;
  color: var(--warning-color);
  font-weight: 500;
}

.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.notes-list li::before {
  content: '💡';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pros-list, .cons-list {
  list-style: none;
}

.pros-list li, .cons-list li {
  font-size: 13px;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.pros-list li::before {
  content: '✅';
  position: absolute;
  left: 0;
  font-size: 12px;
}

.cons-list li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.modal-actions .btn-primary {
  background: var(--primary-color);
  color: white;
}

.modal-actions .btn-primary:hover {
  background: #1D39C4;
}

.modal-actions .btn-outline {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.modal-actions .btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ===== 轻量弹窗（概况摘要） ===== */
.modal-overlay.modal-light .modal {
  max-width: 480px;
}

.modal-overlay.modal-light .modal-body {
  padding: 20px 24px;
}

.modal-summary-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-summary-freequota {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.modal-summary-freequota .label {
  font-size: 12px;
  color: var(--success-color);
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-summary-freequota .text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.modal-summary-models {
  margin-bottom: 16px;
}

.modal-summary-models .label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-summary-models .model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-summary-models .model-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-color);
  background: rgba(47, 84, 235, 0.08);
  border-radius: 20px;
  white-space: nowrap;
}

.modal-light .modal-actions {
  flex-wrap: wrap;
}

.modal-light .modal-actions .btn {
  text-align: center;
  text-decoration: none;
}

/* ===== Key 管理器 ===== */
.key-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-key-btn {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-key-btn:hover {
  background: var(--primary-hover);
}

.test-progress {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.test-progress .progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}
.test-progress .progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s;
}

.keys-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

.key-item:hover {
  box-shadow: var(--shadow-md);
}

.key-item.status-active { border-left-color: #10b981; }
.key-item.status-inactive { border-left-color: #ef4444; }
.key-item.status-checking { border-left-color: #4f6ef6; }
.key-item.status-unknown { border-left-color: #ccc; }

.key-item .key-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.key-item .key-info {
  flex: 1;
  min-width: 0;
}

.key-item .key-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.key-item .key-provider {
  font-size: 12px;
  color: var(--text-tertiary);
}

.key-item .key-value {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: monospace;
  margin-top: 4px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-item .key-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.key-status.active {
  background: #E8FFEA;
  color: #00B42A;
}

.key-status.inactive {
  background: #FFECE8;
  color: #F53F3F;
}

.key-status.checking {
  background: #E8F3FF;
  color: #2F54EB;
}

.key-status.unknown {
  background: var(--bg-color);
  color: var(--text-tertiary);
}

.key-item .key-actions {
  display: flex;
  gap: 8px;
}

.key-item .action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.key-item .action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.key-item .action-btn.delete:hover {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state .empty-text {
  font-size: 14px;
  margin-bottom: 20px;
}

.empty-state .empty-guide-card {
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  transition: border-color 0.2s;
}

.empty-state .empty-guide-card:hover {
  border-color: var(--primary-color);
}

.empty-state .empty-guide-card .guide-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state .empty-guide-card .guide-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state .empty-guide-card .guide-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ===== Key 统计栏 ===== */
.key-stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.key-stats-bar .key-stat-item {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.key-stats-bar .key-stat-item .stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.key-stats-bar .key-stat-item .stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ===== 底部 ===== */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 32px;
  margin-top: 48px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: center;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--footer-brand-color);
}

.footer-info {
  font-size: 13px;
  color: var(--text-tertiary);
}

.sep {
  color: #ddd;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
}

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

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

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

.footer-trust {
  margin-top: 12px;
  text-align: center;
}

.footer-trust small {
  font-size: 11px;
  color: #bbb;
}

/* ---- 返回顶部按钮 ---- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s;
  z-index: 9999;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: scale(1.08);
}

.back-to-top:active {
  transform: scale(0.95);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 首页数据更新时间 ---- */
.data-update-time {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  opacity: 0.6;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .footer-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-nav {
    gap: 12px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
}

/* ===== 指南页面 ===== */
.guide-content {
  background: var(--guide-bg);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.guide-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-content .guide-meta {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.guide-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.guide-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.guide-content p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.guide-content ul, .guide-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.guide-content li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.guide-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.guide-content .tip-box {
  background: #E8F3FF;
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 16px 0;
}

.guide-content .tip-box.warning {
  background: #FFF7E8;
  border-left-color: var(--warning-color);
}

.guide-content .tip-box.danger {
  background: #FFECE8;
  border-left-color: var(--danger-color);
}

.guide-content .tip-box.success {
  background: #E8FFEA;
  border-left-color: var(--success-color);
}

.guide-content .tip-box p {
  margin-bottom: 0;
}

.guide-content code {
  background: var(--bg-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  color: #D93026;
}

.guide-content pre {
  background: #1D2129;
  color: #C9CDD4;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
}

.guide-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.guide-toc {
  background: var(--bg-color);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.guide-toc h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.guide-toc ul {
  list-style: none;
  padding-left: 0;
}

.guide-toc li {
  padding: 4px 0;
}

.guide-toc li a {
  font-size: 13px;
  color: var(--text-secondary);
}

.guide-toc li a:hover {
  color: var(--primary-color);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero-banner {
    padding: 36px 0;
  }

  .hero-banner h1 {
    font-size: 24px;
  }

  .hero-banner .hero-subtitle {
    font-size: 14px;
  }

  .top-nav .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .search-toolbar .search-box {
    max-width: 100%;
  }

  .search-toolbar .search-row {
    flex-direction: column;
    max-width: 100%;
  }

  .search-toolbar .search-box input {
    font-size: 14px;
    height: 44px;
  }

  .search-toolbar .sort-select {
    font-size: 12px;
    padding: 7px 28px 7px 10px;
  }

  .feature-tags .feature-tag {
    padding: 5px 13px;
    font-size: 12px;
  }

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

  .providers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }
  
  .modal {
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-header {
    padding: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .guide-content {
    padding: 24px 20px;
  }
  
  .guide-content h1 {
    font-size: 22px;
  }
  
  .key-item {
    flex-wrap: wrap;
  }
  
  .key-item .key-value {
    max-width: 200px;
  }
}

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

  .hero-banner {
    padding: 28px 0;
  }

  .hero-banner h1 {
    font-size: 22px;
  }

  .search-toolbar {
    padding: 20px 0;
  }

  .search-toolbar .filter-tag {
    font-size: 11px;
    padding: 5px 12px;
  }

  .search-toolbar .sort-select {
    font-size: 11px;
    padding: 5px 24px 5px 8px;
  }

  .feature-tags .feature-tag {
    font-size: 11px;
    padding: 5px 12px;
  }

  .top-nav .nav-logo {
    font-size: 15px;
  }

  .top-nav .nav-links a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

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

/* ===== 服务商独立详情页 ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 14px 0 12px 0;
  text-align: left;
  line-height: 1.5;
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb span[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}
.breadcrumb span[aria-hidden="true"] {
  color: #ccc;
  margin: 0 6px;
  user-select: none;
}

/* Hero 区整体布局 */
.provider-hero {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 32px 0 32px;
}
.provider-hero .provider-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(41, 50, 225, 0.08);
  margin-top: 0;
}
img.provider-icon-large {
  object-fit: contain;
}
.provider-hero .hero-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.provider-hero h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.35;
  letter-spacing: -0.2px;
}
.provider-hero-sub {
  font-size: 15px;
  color: var(--text-tertiary);
  margin: 0 0 8px 0;
}
.provider-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
  line-height: 1.65;
  max-width: 540px;
}

.provider-detail-page {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  margin-top: 16px;
}

.provider-detail-page h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.provider-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.provider-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.provider-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.provider-detail-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-primary);
}

.provider-detail-en {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.provider-section {
  margin-bottom: 24px;
}

.provider-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.provider-section h4 {
  font-size: 13px;
  margin-bottom: 8px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.info-table th,
.info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.info-table th {
  width: 120px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

.info-table td code {
  font-size: 12px;
  word-break: break-all;
}

.info-card {
  background: var(--bg-color);
  padding: 16px;
  border-radius: var(--radius-md);
}
.info-card .info-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-card .info-value {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-all;
}
.info-card .info-value a {
  color: var(--primary-color);
  text-decoration: none;
}
.info-card .info-value a:hover {
  text-decoration: underline;
}
.info-card .info-value code {
  font-size: 13px;
  background: rgba(47, 84, 235, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary-color);
}

.feature-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-color);
  background: rgba(47, 84, 235, 0.08);
  border-radius: 20px;
  margin: 4px;
  white-space: nowrap;
}

.provider-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.provider-cta .btn {
  font-size: 14px;
  padding: 10px 24px;
}

/* 全局按钮基础样式（详情页 CTA 等场景使用） */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-outline {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.8;
}

/* ===== FAQ 区块 ===== */
.faq-section {
  background: var(--faq-bg);
  padding: 48px 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--primary-color);
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.faq-item h3::before {
  content: 'Q: ';
  color: var(--primary-color);
  font-weight: 700;
}

.faq-item p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== 关于作者页 ===== */
.guide-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.guide-meta {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* ===== pre 代码块 ===== */
pre {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0;
}

pre code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  background: none;
  padding: 0;
}

code {
  background: rgba(47, 84, 235, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--primary-color);
}

/* ===== 关于作者页面 ===== */
.about-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}
.about-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
}
.about-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-header h2 {
  font-size: 22px;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.about-role {
  font-size: 15px;
  color: var(--primary-color);
  font-weight: 500;
  margin: 0 0 2px;
}
.about-org {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0;
}
.about-org a {
  color: var(--primary-color);
  text-decoration: none;
}
.about-body {
  padding: 28px 32px 32px;
}
.about-body h3 {
  font-size: 17px;
  color: var(--text-primary);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.about-body h3:first-child {
  margin-top: 0;
}
.about-body ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 8px;
}
.about-body li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.about-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.about-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.about-links a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--hero-bg-start);
  color: var(--primary-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.about-links a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Hero 区访问官网按钮 */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 600;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(47, 84, 235, 0.15);
}
.hero-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 84, 235, 0.3);
}
.hero-cta .arrow {
  font-size: 16px;
  transition: transform 0.2s;
  margin-left: 2px;
}
.hero-cta:hover .arrow {
  transform: translateX(4px);
}

/* 概览 info-grid 等高等宽 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.info-grid .info-card {
  background: var(--bg-color);
  border-radius: 10px;
  padding: 18px 20px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 响应式：小屏 info-grid 变单列 */
@media (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  .provider-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .provider-hero-desc {
    max-width: 100%;
  }
}

/* 类似服务商推荐 */
.related-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}
.related-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}
.related-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.related-card .related-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.related-card .related-info {
  flex: 1;
  min-width: 0;
}
.related-card .related-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.related-card .related-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-card .related-arrow {
  color: var(--text-tertiary);
  font-size: 14px;
  flex-shrink: 0;
}

/* 列表页图标 */
.provider-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 详情页图标 */
img.provider-icon-large {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* ===== 对比工具栏 ===== */
.compare-toolbar {
  background: var(--search-bg);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 56px;
  z-index: 99;
  display: none;
}
.compare-toolbar.active {
  display: block;
}
.compare-toolbar .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.compare-checkbox-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.compare-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}
.compare-count {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 180px;
}
.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.compare-toolbar .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== 对比模式卡片样式 ===== */
.provider-card.compare-mode {
  position: relative;
}
.provider-card.compare-selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 110, 246, 0.25);
}
.provider-card .compare-checkbox {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  accent-color: var(--primary-color);
  cursor: pointer;
  z-index: 2;
}
.provider-card.compare-mode .compare-checkbox {
  display: block;
}
.provider-card.compare-selected .compare-checkbox {
  display: block;
}
.provider-card .compare-check-mark {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: var(--primary-color);
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
}
.provider-card.compare-selected .compare-check-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.provider-card.compare-selected .compare-check-mark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}
.provider-card.compare-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}
.provider-card.compare-disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-color);
}

/* 收藏按钮 */
.provider-card .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.provider-card .fav-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.15);
}
.provider-card .fav-btn svg {
  display: block;
}
/* 对比模式下收藏按钮上移，避开 checkbox */
.provider-card.compare-mode .fav-btn {
  top: 12px;
  right: 44px;
}
.provider-card.compare-disabled .compare-checkbox {
  pointer-events: none;
}

/* ===== 对比页面 ===== */
.compare-page {
  padding: 32px 0 48px;
}
.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.compare-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.compare-header-actions {
  display: flex;
  gap: 8px;
}
.compare-table-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* 对比表格（桌面端） */
.compare-table {
  display: grid;
  width: 100%;
  border-collapse: collapse;
}
.compare-table .compare-th {
  background: var(--bg-color);
  padding: 16px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: top;
}
.compare-table .compare-dim-label {
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.compare-table .compare-td {
  padding: 14px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.compare-table .compare-td.compare-dim-label {
  border-bottom: 1px solid var(--border-color);
}
.compare-table .compare-provider-header {
  text-align: center;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.compare-provider-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.compare-provider-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.compare-provider-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  text-align: center;
}
.compare-provider-link {
  font-size: 12px;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}
.compare-provider-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.compare-table .compare-value {
  text-align: center;
}
.compare-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: block;
}
.compare-empty-val {
  color: var(--text-tertiary);
  font-size: 14px;
}
.compare-model-item {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.compare-model-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.compare-model-ctx {
  font-size: 11px;
  color: var(--primary-color);
  background: rgba(79, 110, 246, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
}
.compare-model-desc {
  font-size: 11px;
  color: var(--text-tertiary);
}
.compare-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.compare-list li {
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.compare-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
}

/* 对比卡片（移动端） */
.compare-cards {
  display: none;
}
.compare-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.compare-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-color);
}
.compare-card-body {
  padding: 16px 18px;
}
.compare-card-body dl {
  margin: 0;
}
.compare-card-body dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.compare-card-body dt:first-child {
  margin-top: 0;
}
.compare-card-body dd {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* 对比页面响应式 */
@media (max-width: 768px) {
  .compare-table {
    display: none;
  }
  .compare-cards {
    display: block;
  }
  .compare-header h1 {
    font-size: 20px;
  }
  .compare-toolbar .container {
    gap: 10px;
  }
  .compare-count {
    min-width: auto;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .compare-page {
    padding: 20px 0 32px;
  }
  .compare-header-actions .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ===== P1: FAQ 手风琴 ===== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-accordion-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-accordion-item:hover {
  border-color: var(--primary-color);
}
.faq-accordion-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  line-height: 1.5;
  font-family: inherit;
  transition: background 0.2s;
}
.faq-accordion-question:hover {
  background: rgba(79, 110, 246, 0.04);
}
.faq-accordion-question::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 0.25s;
  width: 24px;
  text-align: center;
}
.faq-accordion-item.open .faq-accordion-question::after {
  content: '−';
  color: var(--primary-color);
}
.faq-accordion-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}
.faq-accordion-item.open .faq-accordion-answer {
  max-height: 300px;
  padding: 0 20px 16px;
}
.faq-accordion-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ===== P1: TOC 侧栏 ===== */
.toc-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 13px;
  z-index: 10;
}
.toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px 12px;
  margin: 0;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li a {
  display: block;
  padding: 8px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  font-size: 13px;
  line-height: 1.4;
}
.toc-list li a:hover {
  color: var(--primary-color);
  background: rgba(79, 110, 246, 0.04);
}
.toc-list li a.active {
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
  background: rgba(79, 110, 246, 0.06);
}

/* ===== P1: TOC + 内容双栏布局 ===== */
.provider-detail-wrapper {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.provider-detail-wrapper .toc-col {
  flex: 0 0 200px;
  display: block;
}
.provider-detail-wrapper .content-col {
  flex: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .provider-detail-wrapper {
    flex-direction: column;
  }
  .provider-detail-wrapper .toc-col {
    flex: none;
    position: static;
    width: 100%;
  }
  .toc-sidebar {
    position: static;
    max-height: none;
  }
}

/* ===== P1: 费率摘要条 ===== */
.rate-summary {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.rate-summary .rate-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.rate-summary .rate-text {
  color: var(--text-primary);
  line-height: 1.6;
}
.rate-summary .rate-text strong {
  color: var(--success-color);
  font-size: 15px;
}
[data-theme="dark"] .rate-summary {
  background: linear-gradient(135deg, #0f2e1a, #0d2818);
  border-color: #1a5c2e;
}

/* ========== P2: 适用场景卡片 ========== */
.use-case-section { margin-top: 24px; }
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.use-case-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.use-case-card:hover {
  border-color: var(--primary-color, #2F54EB);
  box-shadow: 0 2px 12px rgba(47,84,235,0.08);
}
.use-case-card .uc-icon { font-size: 22px; margin-bottom: 6px; }
.use-case-card .uc-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; color: var(--text-primary, #111); }
.use-case-card .uc-reason { font-size: 13px; color: var(--text-secondary, #666); line-height: 1.5; }

/* ========== P2: 最新动态 ========== */
.news-section { margin-top: 28px; }
.news-list { list-style: none; padding: 0; }
.news-item {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border-color, #f0f0f0);
}
.news-item:last-child { border-bottom: none; }
.news-item .news-date {
  flex-shrink: 0; font-size: 12px; color: var(--primary-color, #2F54EB);
  background: var(--primary-light, #eef2ff); padding: 2px 8px; border-radius: 4px;
  font-weight: 500;
}
.news-item .news-text { font-size: 14px; color: var(--text-primary, #333); line-height: 1.5; }

/* ========== P2: 竞品对比 ========== */
.competitor-section { margin-top: 24px; }
.competitor-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.competitor-table th {
  text-align: left; padding: 10px 12px;
  background: var(--bg-secondary, #f9fafb); font-weight: 600;
  color: var(--text-primary, #111); border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.competitor-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-color, #f0f0f0);
  color: var(--text-primary, #333);
}
.competitor-table td:first-child { font-weight: 600; }
.competitor-table .price-free { color: var(--success-color, #10b981); font-weight: 500; }
.competitor-table tr:hover { background: var(--hover-bg, #f9fafb); }

[data-theme="dark"] .competitor-table th { background: #1a1f2e; border-color: #2a2f3e; }
[data-theme="dark"] .competitor-table td { border-color: #2a2f3e; color: #d1d5db; }
[data-theme="dark"] .competitor-table tr:hover { background: #1a1f2e; }

/* ========== P2: 社区热度 ========== */
.community-heat {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
}
.community-heat .ch-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary, #666);
  background: var(--bg-secondary, #f9fafb); padding: 4px 12px;
  border-radius: 20px; border: 1px solid var(--border-color, #eee);
}
.community-heat .ch-item .ch-icon { font-size: 16px; }
.community-heat .ch-item strong { color: var(--text-primary, #333); }
[data-theme="dark"] .community-heat .ch-item {
  background: #1a1f2e; border-color: #2a2f3e; color: #9ca3af;
}
[data-theme="dark"] .community-heat .ch-item strong { color: #e5e7eb; }
