:root {
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-highlight: #2563eb;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0284c7;
  --purple: #7c3aed;
  --purple-hover: #6d28d9;
  --green: #059669;
  --green-hover: #047857;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 90px;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  padding: 28px 0 16px;
  text-align: center;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.site-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.site-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

/* Stats Pill Bar */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--text-dim);
  background: #ffffff;
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  max-width: max-content;
  margin: 0 auto 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stats-bar span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stats-bar strong {
  color: #2563eb;
  font-weight: 700;
}

/* 免会员使用重要提醒横幅 */
.no-vip-banner {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 auto 16px;
  max-width: 880px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.06);
}

.no-vip-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.no-vip-title {
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}

.no-vip-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}

.no-vip-text strong {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.6);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Sticky Navigation Section */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 18px;
}

/* Module Bar (一级业务大类) */
.module-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.module-bar::-webkit-scrollbar {
  display: none;
}

.module-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.module-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.module-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.module-btn .badge-pill {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
}

.module-btn.active .badge-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Search Box */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #94a3b8;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 44px 0 46px;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-clear {
  position: absolute;
  right: 14px;
  background: #e2e8f0;
  color: #64748b;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  visibility: hidden;
}

.search-clear.visible {
  visibility: visible;
}

/* Quick Search Chips */
.quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.chip-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.chip-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* Category Tabs (Scrollable) */
.tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 2px;
  scrollbar-width: none;
}

.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.tab-btn.active {
  color: #2563eb;
  background: #eff6ff;
  font-weight: 700;
}

/* Results Header Bar */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
  padding: 0 4px;
}

.sort-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

/* Grid Layout */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

/* Clean White Card */
.res-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
}

.res-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.res-card.pinned {
  border-color: #bfdbfe;
  background: #ffffff;
}

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

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.tag-zone {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.tag-track {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.tag-pinned {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.tag-showcase {
  background: #fdf4ff;
  border: 1px solid #f0abfc;
  color: #a21caf;
}

.tag-free {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.heat-badge {
  font-size: 11px;
  color: #b45309;
  background: #fffbeb;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Path locator */
.path-locator {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 3px solid #2563eb;
}

.path-locator.showcase-path {
  border-left-color: #7c3aed;
  background: #faf5ff;
}

.path-locator.free-path {
  border-left-color: #059669;
  background: #f0fdf4;
}

.path-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.card-desc {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Action Buttons */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-open {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #2563eb;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-open:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-get-full {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #7c3aed;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-get-full:hover {
  background: #6d28d9;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.btn-passcode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: #475569;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-passcode:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-free-download {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #059669;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-free-download:hover {
  background: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Empty State / Fallback Card */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.fallback-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* FAB Container */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.fab-contact {
  background: #7c3aed;
  color: #ffffff;
}

.fab-contact:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.fab-help {
  background: #2563eb;
  color: #ffffff;
}

.fab-help:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* Modal Drawer (Clean White Style) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Contact Modal Content */
.contact-card {
  display: flex;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.contact-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.contact-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 8px;
}

.wechat-badge {
  display: inline-block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.contact-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

/* Passcode Modal */
.passcode-input-row {
  display: flex;
  gap: 8px;
}

.passcode-input {
  flex: 1;
  height: 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.passcode-input:focus {
  border-color: #2563eb;
}

.btn-verify {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-verify:hover {
  background: #1d4ed8;
}

.passcode-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 8px;
  min-height: 16px;
}

/* FAQ Items */
.faq-item {
  margin-bottom: 18px;
}

.faq-q {
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 6px;
}

.faq-a {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

.faq-callout {
  background: #fff1f2;
  border-left: 3px solid #f43f5e;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: #9f1239;
}

/* Toast */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 999;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .site-title { font-size: 20px; }
  .resource-grid { grid-template-columns: 1fr; }
  .card-actions { flex-direction: column; }
  .btn-open, .btn-copy, .btn-get-full, .btn-free-download, .btn-passcode { width: 100%; }
  .fab-container { bottom: 16px; right: 14px; }
  .fab-btn { padding: 8px 14px; font-size: 12px; }
}
