:root {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(255, 255, 255, 0.88);
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f7;
  --bg-sidebar: rgba(245, 245, 247, 0.85);
  --bg-input: #f5f5f7;
  --bg-badge: #f0f0f5;

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --text-inverse: #ffffff;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: #e8f0fe;
  --success: #34c759;
  --warning: #ff9f0a;
  --danger: #ff3b30;
  --star: #ff9500;

  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 52px;
  --sidebar-width: 240px;
  --content-max: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #1c1c1e;
  --bg-secondary: #2c2c2e;
  --bg-glass: rgba(44, 44, 46, 0.72);
  --bg-glass-hover: rgba(44, 44, 46, 0.88);
  --bg-card: #2c2c2e;
  --bg-card-hover: #3a3a3c;
  --bg-sidebar: rgba(28, 28, 30, 0.85);
  --bg-input: #3a3a3c;
  --bg-badge: #3a3a3c;

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;

  --accent: #2997ff;
  --accent-hover: #40a9ff;
  --accent-light: #1a3a5c;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ===== */
.nav-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
}
.nav-header .logo { height: 28px; margin-right: 24px; }
.nav-header .logo img { height: 100%; }
.nav-header .nav-links { display: flex; gap: 4px; flex: 1; }
.nav-header .nav-links a {
  padding: 6px 14px; border-radius: var(--radius-full);
  color: var(--text-secondary); text-decoration: none; font-size: 14px;
  font-weight: 500; transition: all var(--transition-fast);
}
.nav-header .nav-links a:hover,
.nav-header .nav-links a.active {
  color: var(--text-primary); background: var(--bg-card-hover);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .btn-search {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg-input); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition-fast);
}
.nav-actions .btn-search:hover { background: var(--bg-card-hover); }

/* ===== HERO / SEARCH ===== */
.hero-section {
  padding: calc(var(--header-height) + 60px) 24px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.hero-section h1 {
  font-size: 40px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-section p { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; }

.search-container {
  max-width: 640px; margin: 0 auto; position: relative;
}
.search-container input {
  width: 100%; height: 52px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 0 52px 0 20px;
  font-size: 16px; color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  outline: none;
}
.search-container input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-md);
}
.search-container .search-icon {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); pointer-events: none;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; max-width: var(--content-max); margin: 0 auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-bar .filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 16px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition-fast);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent); color: white; border-color: var(--accent);
}

/* ===== SORT SELECTOR ===== */
.sort-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 16px; max-width: var(--content-max); margin: 0 auto;
}
.sort-bar .sort-label { font-size: 13px; color: var(--text-tertiary); }
.sort-bar select {
  appearance: none; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 32px 6px 12px;
  font-size: 13px; color: var(--text-primary); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ===== CARD GRID ===== */
.section-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  margin: 32px 0 16px; padding: 0 24px;
  max-width: var(--content-max); margin-left: auto; margin-right: auto;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; padding: 0 24px;
  max-width: var(--content-max); margin: 0 auto;
}

/* ===== SITE CARD ===== */
.site-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-base);
  cursor: pointer;
  overflow: hidden;
}
.site-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.site-card .card-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px;
}
.site-card .card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--bg-input); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.site-card .card-icon img { width: 100%; height: 100%; object-fit: contain; }
.site-card .card-info { flex: 1; min-width: 0; }
.site-card .card-title {
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-card .card-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 4px;
}

.site-card .card-meta {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
}
.site-card .card-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--star); font-weight: 600;
}
.site-card .card-rating .count {
  color: var(--text-tertiary); font-weight: 400;
}
.site-card .card-tags {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1; justify-content: flex-end;
}
.site-card .tag {
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
  background: var(--bg-badge); color: var(--text-secondary);
}

/* Visit button overlay */
.site-card .btn-visit {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--accent); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8);
  transition: all var(--transition-fast);
  cursor: pointer; z-index: 2;
  font-size: 14px;
}
.site-card:hover .btn-visit { opacity: 1; transform: scale(1); }
.site-card .btn-visit:hover { background: var(--accent-hover); transform: scale(1.1); }

/* Featured badge */
.site-card .badge-featured {
  position: absolute; top: 0; left: 20px;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 8px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center; padding: 40px 24px;
  color: var(--text-tertiary); font-size: 13px;
  border-top: 0.5px solid var(--border); margin-top: 60px;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  transition: all var(--transition-fast); text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-light); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg-input); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 16px;
  transition: all var(--transition-fast);
}
.theme-toggle:hover { background: var(--bg-card-hover); }

/* ===== STAR RATING ===== */
.star-rating { display: inline-flex; gap: 2px; }
.star-rating .star {
  font-size: 18px; color: var(--border); cursor: pointer;
  transition: color var(--transition-fast);
}
.star-rating .star.filled { color: var(--star); }
.star-rating .star:hover { color: var(--star); }

/* ===== MOBILE SITE GRID =====
   桌面端由模板内联 `repeat(CardsPerRow, minmax(0,1fr))` 控制列数；
   平板/手机上强制一列并加大字号，避免 4 列挤成一排。 */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
  .site-card { padding: 18px 16px; }
  .site-card .card-title { font-size: 17px; }
  .site-card .card-desc { -webkit-line-clamp: 3; }
  .site-card .card-icon { width: 44px; height: 44px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section h1 { font-size: 26px; }
  .hero-section p { font-size: 14px; }
  .nav-header .nav-links { display: none; }
  .section-title { font-size: 18px; }
}
@media (max-width: 480px) {
  .hero-section { padding-top: calc(var(--header-height) + 28px); }
  .card-grid { padding: 0 14px; }
}

/* ===== MOBILE HEADER ===== */
@media (max-width: 768px) {
  .nav-header { padding: 0 10px; }
  .nav-header .logo { margin-right: 8px; }
  .nav-header .logo img { max-height: 24px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 6px 10px; font-size: 12px; }
  .nav-actions .btn .btn-text { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .theme-toggle { width: 32px; height: 32px; font-size: 14px; flex-shrink: 0; }
}

/* ===== MOBILE CATEGORY DRAWER ===== */
.nav-drawer {
  position: fixed; top: var(--header-height); right: 0; bottom: 0; z-index: 99;
  width: min(280px, 78vw); background: var(--bg-card);
  border-left: 0.5px solid var(--border);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  padding: 16px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a {
  display: block; padding: 12px 14px; border-radius: var(--radius-md);
  color: var(--text-primary); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background var(--transition-fast);
}
.nav-drawer a:hover, .nav-drawer a.active { background: var(--bg-card-hover); }
.nav-drawer .drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 14px; border-bottom: 0.5px solid var(--border); margin-bottom: 8px;
}
.nav-drawer .drawer-head span { font-size: 13px; color: var(--text-tertiary); font-weight: 600; letter-spacing: 0.05em; }
.nav-drawer .drawer-close {
  width: 30px; height: 30px; border-radius: var(--radius-full); border: none;
  background: var(--bg-input); color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nav-backdrop {
  position: fixed; inset: var(--header-height) 0 0 0; z-index: 98;
  background: rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

/* 移动端菜单按钮（默认隐藏，仅 <768px 显示） */
.btn-menu { display: none; }
@media (max-width: 768px) {
  .btn-menu { display: inline-flex; }
}

/* ===== MOBILE DETAIL PAGE ===== */
@media (max-width: 768px) {
  .detail-page { padding: calc(var(--header-height) + 20px) 14px 40px; }
  .detail-header { flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .detail-title { font-size: 22px; }
  .detail-actions { flex-wrap: wrap; gap: 8px; margin: 18px 0; }
  .detail-actions .btn { flex: 1; min-width: 120px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 10px 14px; white-space: nowrap; }
  .health-bar { gap: 12px; flex-wrap: wrap; }
  .rating-big { font-size: 38px; }
  .rating-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pricing-table th, .pricing-table td { padding: 10px; font-size: 13px; }
}

/* ===== MOBILE SUBMIT PAGE ===== */
@media (max-width: 480px) {
  .auth-page { padding: 16px; align-items: flex-start; }
  .auth-card { padding: 24px 18px; border-radius: var(--radius-lg); }
  .auth-card h2 { font-size: 21px; }
  .form-group label { font-size: 13px; }
  .form-group input, .form-group textarea, .form-group select { font-size: 15px; }
}

/* ===== MOBILE AD SLOTS ===== */
@media (max-width: 768px) {
  #ad-homepage-top, #ad-homepage-bottom, #ad-site-detail-bottom, #ad-submit-sidebar {
    padding-left: 14px; padding-right: 14px;
  }
}

/* ===== DIRECTORY REFRESH ===== */
body { background: #f7f8fa; }
[data-theme="dark"] body { background: #17181a; }
.nav-header { height: 64px; padding: 0 max(20px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.9); }
[data-theme="dark"] .nav-header { background: rgba(31,32,34,.92); }
.nav-header .logo { height: 30px; margin-right: 34px; }
.nav-header .nav-links { gap: 12px; }
.nav-header .nav-links a { border-radius: 6px; padding: 8px 10px; }
.hero-section { padding: 142px 24px 76px; text-align: left; background: #eef4ff; border-bottom: 1px solid #dce7f7; }
[data-theme="dark"] .hero-section { background: #1d2a3b; border-bottom-color: #2d4058; }
.hero-inner { max-width: 1240px; margin: 0 auto; }
.eyebrow { display: block; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 1.3; }
.hero-section h1 { max-width: 720px; margin: 12px 0 10px; color: #132238; background: none; -webkit-text-fill-color: initial; font-size: clamp(34px, 5vw, 62px); letter-spacing: 0; line-height: 1.08; }
[data-theme="dark"] .hero-section h1 { color: #f5f7fb; }
.hero-section p { max-width: 620px; margin: 0 0 28px; color: #52647b; font-size: 17px; }
[data-theme="dark"] .hero-section p { color: #b4c1d2; }
.search-container { max-width: 620px; margin: 0; }
.search-container input { height: 56px; border: 1px solid #cbd7e7; border-radius: 8px; padding-left: 48px; box-shadow: 0 8px 20px rgba(39,74,121,.08); }
.search-container .search-icon { left: 18px; right: auto; color: var(--accent); font-size: 24px; }
.search-container kbd { position: absolute; top: 17px; right: 16px; padding: 2px 7px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-tertiary); font-size: 11px; }
.hero-links { display: flex; gap: 20px; align-items: center; margin-top: 20px; color: #6e7f95; font-size: 13px; }
.hero-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 42px 24px 0; }
.directory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.directory-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.directory-toolbar h2 { margin: 6px 0 3px; font-size: 25px; letter-spacing: 0; }
.toolbar-controls { display: flex; gap: 8px; }
.toolbar-controls select { min-width: 118px; }
.filter-bar { padding: 0 0 25px; gap: 8px; }
.filter-bar .filter-chip { border-radius: 6px; padding: 7px 13px; }
.directory-section { scroll-margin-top: 84px; margin-bottom: 44px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading h3 { margin-top: 5px; font-size: 20px; letter-spacing: 0; }
.heading-note, .sort-label { color: var(--text-tertiary); font-size: 12px; }
.card-grid { padding: 0; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 12px; }
.site-card { min-height: 156px; padding: 18px; border-radius: 8px; box-shadow: 0 1px 2px rgba(27,45,70,.03); }
.site-card:hover { transform: translateY(-3px); border-color: #b8cff0; box-shadow: 0 10px 24px rgba(38,75,125,.1); }
.site-card .card-header { margin-bottom: 19px; }
.site-card .card-icon { width: 42px; height: 42px; border-radius: 8px; color: var(--accent); font-size: 20px; }
.site-card .card-title { font-size: 15px; }
.site-card .card-desc { font-size: 12px; }
.site-card .card-meta { justify-content: space-between; margin-top: auto; }
.price-label { color: var(--text-tertiary); font-size: 11px; }
.btn-visit { opacity: 1 !important; transform: none !important; width: 27px !important; height: 27px !important; top: 14px !important; right: 14px !important; background: var(--bg-input) !important; color: var(--accent) !important; }
.card-badge { position: absolute; right: 14px; bottom: 14px; padding: 3px 7px; border-radius: 4px; background: var(--accent-light); color: var(--accent); font-size: 10px; }
.rank-card { border-top: 2px solid var(--accent); }
.rank-number { position: absolute; top: 10px; right: 14px; color: #b5c3d5; font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.rank-card .card-header { padding-right: 30px; }
.directory-aside { position: sticky; top: 88px; }
.side-panel { padding: 20px 0; border-top: 1px solid var(--border); }
.side-panel:first-child { padding-top: 0; border-top: 0; }
.side-panel h3 { margin: 8px 0 16px; font-size: 17px; }
.side-copy { color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.note-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.note-dot { width: 7px; height: 7px; margin-top: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--warning); }
.note-dot.blue { background: var(--accent); }
.note-item strong { display: block; font-size: 13px; font-weight: 600; }
.note-item small { display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 11px; }
.side-link, .side-links a { display: flex; justify-content: space-between; padding-top: 14px; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.side-links a { padding: 9px 0; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.side-stats { display: flex; gap: 34px; margin-top: 18px; }
.side-stats b, .side-stats small { display: block; }
.side-stats b { color: var(--accent); font-size: 20px; }
.side-stats small { color: var(--text-tertiary); font-size: 11px; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--text-tertiary); }
.empty-state .btn { margin-left: 8px; }
.ad-slot { margin-bottom: 18px; }
.ad-unit img { max-width: 100%; border-radius: 8px; }
.site-footer { margin-top: 20px; }
@media (max-width: 900px) { .directory-layout { grid-template-columns: 1fr; gap: 10px; } .directory-aside { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 600px) { .nav-header { height: 56px; padding: 0 14px; } .nav-header .logo { margin-right: 8px; } .nav-actions .btn-primary { display: none; } .hero-section { padding: 108px 18px 48px; } .hero-section h1 { font-size: 34px; } .hero-section p { font-size: 14px; } .hero-links { align-items: flex-start; flex-direction: column; gap: 8px; } .page-shell { padding: 28px 14px 0; } .directory-toolbar { align-items: flex-start; flex-direction: column; margin-bottom: 13px; } .toolbar-controls { width: 100%; } .toolbar-controls select { flex: 1; min-width: 0; } .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; } .directory-aside { display: block; } .directory-aside .side-panel { margin-top: 20px; } .card-grid { grid-template-columns: 1fr !important; } .site-card { min-height: 146px; } }
.site-card[hidden] { display: none; }

/* CodePK-inspired directory layout: compact navigation, rankings, dense provider list */
body { background: #f5f6f8; color: #20242b; }
[data-theme="dark"] body { background: #15171a; color: #f0f2f5; }
.nav-header { position: sticky; height: 58px; padding: 0 max(16px, calc((100vw - 1180px) / 2)); background: #fff; border-bottom: 1px solid #e8eaee; box-shadow: 0 1px 3px rgba(20,32,50,.04); }
[data-theme="dark"] .nav-header { background: #202326; border-bottom-color: #30343a; }
.nav-header .logo { margin-right: 24px; }
.nav-header .nav-links { gap: 2px; }
.nav-header .nav-links a { border-radius: 5px; color: #727984; font-size: 13px; padding: 7px 11px; }
.nav-header .nav-links a.active, .nav-header .nav-links a:hover { background: #f0f3f7; color: #20242b; }
[data-theme="dark"] .nav-header .nav-links a.active, [data-theme="dark"] .nav-header .nav-links a:hover { background: #30343a; color: #fff; }
.hero-section { padding: 26px 20px 22px; text-align: center; background: #fff; border-bottom: 1px solid #e8eaee; }
[data-theme="dark"] .hero-section { background: #202326; border-bottom-color: #30343a; }
.hero-inner { max-width: 1180px; }
.hero-section .eyebrow { display: none; }
.hero-section h1 { max-width: none; margin: 0 0 5px; color: #20242b; font-size: 25px; font-weight: 700; }
[data-theme="dark"] .hero-section h1 { color: #f0f2f5; }
.hero-section p { max-width: none; margin: 0 auto 16px; color: #808792; font-size: 13px; }
.search-container { max-width: 480px; margin: 0 auto; }
.search-container input { height: 40px; border-radius: 5px; padding-left: 38px; box-shadow: none; background: #f7f8fa; border-color: #e1e5ea; font-size: 13px; }
.search-container .search-icon { left: 13px; font-size: 20px; }
.hero-links { justify-content: center; margin-top: 12px; font-size: 12px; }
.page-shell { max-width: 1180px; padding: 24px 20px 0; }
.directory-layout { display: block; }
.directory-toolbar { align-items: center; margin-bottom: 12px; }
.directory-toolbar .eyebrow { display: inline; margin-right: 9px; }
.directory-toolbar h2 { display: inline; font-size: 19px; }
.directory-toolbar .sort-label { display: block; margin-top: 4px; }
.filter-bar { padding-bottom: 18px; border-bottom: 1px solid #e4e7eb; }
.filter-bar .filter-chip { background: transparent; border: 0; border-radius: 4px; padding: 6px 11px; color: #6f7782; }
.filter-bar .filter-chip.active { background: #1677ff; color: #fff; }
.directory-section { margin-bottom: 28px; }
.section-heading { align-items: center; margin-bottom: 10px; }
.section-heading .eyebrow { display: inline; margin-right: 8px; }
.section-heading h3 { display: inline; font-size: 17px; }
.heading-note { font-size: 11px; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ranking-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.site-card { min-height: 132px; padding: 14px; border: 1px solid #e3e6ea; border-radius: 5px; box-shadow: 0 1px 2px rgba(20,32,50,.025); }
[data-theme="dark"] .site-card { border-color: #30343a; }
.site-card:hover { transform: translateY(-1px); border-color: #9bbff0; box-shadow: 0 4px 12px rgba(20,60,120,.08); }
.site-card .card-header { gap: 10px; margin-bottom: 14px; }
.site-card .card-icon { width: 38px; height: 38px; border-radius: 5px; }
.site-card .card-title { font-size: 14px; }
.site-card .card-desc { font-size: 11px; line-height: 1.45; }
.site-card .card-meta { margin-top: auto; font-size: 12px; }
.rank-card { min-height: 108px; border-top: 2px solid #1677ff; }
.rank-number { top: 8px; right: 10px; font-size: 17px; }
.rank-card .card-header { padding-right: 20px; }
.btn-visit { top: 10px !important; right: 10px !important; width: 24px !important; height: 24px !important; font-size: 12px; }
.card-badge { right: 10px; bottom: 10px; }
.directory-aside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 8px; padding-top: 22px; border-top: 1px solid #e4e7eb; }
.side-panel, .side-panel:first-child { padding: 0; border: 0; }
.side-panel h3 { margin: 5px 0 10px; font-size: 15px; }
.note-item { padding: 7px 0; }
.side-copy, .note-item small { font-size: 12px; }
.site-footer { margin-top: 30px; padding: 25px 20px; }
@media (max-width: 900px) { .ranking-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .directory-aside { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .nav-header { position: sticky; height: 54px; } .nav-header .nav-links { display: none; } .hero-section { padding: 22px 14px 20px; } .hero-section h1 { font-size: 21px; } .hero-section p { font-size: 12px; } .hero-links { display: none; } .page-shell { padding: 18px 14px 0; } .directory-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; } .toolbar-controls { width: 100%; } .filter-bar { overflow-x: auto; white-space: nowrap; margin-right: -14px; padding-right: 14px; } .card-grid, .ranking-grid { grid-template-columns: 1fr; } .rank-card { min-height: 118px; } .directory-aside { display: block; } .side-panel { margin-top: 20px; } }

/* ===== WORKBENCH DIRECTORY ===== */
body { background-color: #f4f8f8; background-image: linear-gradient(#e9f0f0 1px, transparent 1px), linear-gradient(90deg, #e9f0f0 1px, transparent 1px); background-size: 32px 32px; color: #273442; padding-bottom: 34px; }
[data-theme="dark"] body { background-color: #182022; background-image: linear-gradient(#253133 1px, transparent 1px), linear-gradient(90deg, #253133 1px, transparent 1px); color: #e9f0ef; }
.codepk-header { height: 66px; background: rgba(247,252,251,.9); border-bottom: 1px solid #dce9e7; backdrop-filter: blur(12px); }
[data-theme="dark"] .codepk-header { background: rgba(27,34,35,.92); border-color: #344342; }
.header-inner { max-width: 1538px; height: 100%; margin: auto; display: flex; align-items: center; padding: 0 20px; }
.brand { width: 210px; flex-shrink: 0; }.brand a { color: #344252; text-decoration: none; }.brand img { max-width: 145px; max-height: 42px; }.brand strong { font-size: 21px; letter-spacing: .02em; }
.codepk-header nav { display: flex; gap: 9px; flex: 1; }.codepk-header nav a, .header-link { padding: 7px 13px; border-radius: 18px; color: #64727b; font-size: 12px; text-decoration: none; }.codepk-header nav a.active, .codepk-header nav a:hover, .header-link:hover { color: #008e86; background: #e4f5f2; }
.header-actions { display: flex; align-items: center; gap: 8px; }.mode-button, .lang-button, .user-button { height: 28px; min-width: 28px; padding: 0 9px; border: 1px solid #64d5ca; border-radius: 16px; background: transparent; color: #008f87; cursor: pointer; }.mode-button { border-color: #f2bd45; color: #e89d0c; }.user-button { border-radius: 50%; padding: 0; }
.codepk-shell { max-width: 1538px; margin: 0 auto; padding: 0 0 24px; display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 16px; align-items: stretch; }.ranking-panel, .news-panel { background: rgba(255,255,255,.78); border: 1px solid #dbe6e6; border-radius: 16px; margin-top: 0; min-height: calc(100vh - 102px); }.provider-area { min-width: 0; padding-top: 0; }.ranking-panel { overflow: hidden; }.panel-title, .side-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px; border-bottom: 1px solid #e5eded; font-size: 13px; }.panel-title b { padding: 4px 9px; border: 1px solid #82ddd1; border-radius: 14px; color: #00a895; font-size: 11px; }.bars { color: #00b49e; font-style: normal; }.rank-tabs { display: flex; gap: 4px; padding: 10px 12px; }.rank-tabs button { flex: 1; padding: 5px; border: 1px solid #e2e9e9; border-radius: 6px; background: transparent; color: #71808a; font-size: 11px; }.rank-tabs button.active { background: #00b69e; border-color: #00b69e; color: white; }.rank-row { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #384654; text-decoration: none; font-size: 13px; }.rank-row:hover { background: #eff9f7; }.rank-row em { width: 17px; color: #00af9a; font-style: normal; text-align: center; font-weight: 700; }.rank-avatar { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #e8f3f2; overflow: hidden; font-size: 11px; }.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }.rank-row strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6bdc75; }.expand-ranking { width: 100%; padding: 12px; border: 0; border-top: 1px solid #e5eded; background: transparent; color: #68757e; font-size: 12px; }
.provider-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 12px; }.provider-toolbar h1 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }.provider-toolbar p { margin: 0; color: #87939a; font-size: 11px; }.toolbar-tools { display: flex; gap: 6px; }.search-mini { display: flex; align-items: center; gap: 4px; padding: 0 9px; height: 30px; border: 1px solid #d6e4e2; border-radius: 5px; background: rgba(255,255,255,.8); color: #00a994; }.search-mini input { width: 120px; border: 0; outline: 0; background: transparent; font-size: 12px; }.toolbar-tools select { height: 30px; padding: 0 7px; border: 1px solid #d6e4e2; border-radius: 5px; background: rgba(255,255,255,.8); color: #64727b; font-size: 11px; }.category-tabs { display: flex; gap: 4px; margin-bottom: 12px; }.category-tabs button { padding: 5px 14px; border: 1px solid #d9e6e4; border-radius: 5px; background: rgba(255,255,255,.72); color: #6d7a83; font-size: 11px; }.category-tabs button.active { background: #05b7a0; border-color: #05b7a0; color: #fff; }
.provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.provider-card { position: relative; min-height: 240px; padding: 17px; border: 1px solid #dce6e6; border-radius: 16px; background: rgba(255,255,255,.86); box-shadow: 0 2px 5px rgba(56,91,93,.04); cursor: pointer; overflow: hidden; transition: .2s; }.provider-card:hover { transform: translateY(-2px); border-color: #89d8cc; box-shadow: 0 7px 18px rgba(45,121,117,.12); }.provider-top { display: flex; align-items: center; gap: 10px; }.provider-logo { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: #e6f2f3; color: #00a991; overflow: hidden; }.provider-logo img { width: 100%; height: 100%; object-fit: cover; }.provider-name { min-width: 0; flex: 1; }.provider-name h3 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; }.provider-name h3 small { margin-left: 5px; padding: 2px 5px; border: 1px solid #dfeeea; border-radius: 4px; color: #00a68f; font-size: 10px; font-weight: 500; }.provider-name span { display: block; margin-top: 3px; color: #8a969d; font-size: 10px; }.open-provider { border: 0; background: transparent; color: #00ab98; font-size: 18px; cursor: pointer; }.provider-desc { height: 47px; padding: 16px 0 8px; overflow: hidden; color: #64727d; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }.provider-desc i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #75dcd0; }.provider-metrics { position: absolute; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #e4ecec; background: rgba(249,253,252,.8); }.provider-metrics div { min-width: 0; padding: 10px 8px; border-right: 1px solid #e4ecec; }.provider-metrics div:last-child { border-right: 0; }.provider-metrics strong, .provider-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.provider-metrics strong { color: #78858d; font-size: 10px; font-weight: 400; }.provider-metrics b { margin-top: 5px; color: #00aa95; font-family: var(--font-mono); font-size: 12px; }.provider-tag { position: absolute; top: 13px; right: 47px; padding: 3px 7px; border-radius: 4px; background: #fff2d5; color: #d78b00; font-size: 10px; }.category-heading { margin: 18px 0 10px; font-size: 16px; }.category-heading small { color: #9aa5aa; font-size: 11px; font-weight: 400; }.news-panel { overflow: hidden; }.news-box { min-height: 185px; border-bottom: 1px solid #e5eded; }.news-box button { width: 27px; height: 27px; border: 1px solid #63d4c8; border-radius: 6px; background: transparent; color: #00a893; }.demand-empty { display: grid; place-items: center; height: 135px; color: #a4afb5; font-size: 12px; }.notices { min-height: 0; padding-bottom: 8px; }.notices a { display: flex; align-items: center; gap: 7px; padding: 8px 13px; color: #52616c; text-decoration: none; font-size: 12px; }.notices a:hover { color: #00a18e; }.notices a b { padding: 2px 4px; border-radius: 3px; background: #d5faf3; color: #00a991; font-size: 9px; }.notices time { margin-left: auto; color: #a5afb5; font-size: 10px; }.notices p { padding: 0 13px; color: #89959b; font-size: 12px; }.codepk-footer { max-width: 1180px; margin: 0 auto; padding: 24px 20px; color: #89969a; text-align: center; font-size: 11px; }.codepk-footer a { color: #00a490; text-decoration: none; }.risk-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; min-height: 28px; padding: 6px 12px; background: #fb5a0b; color: white; text-align: center; font-size: 12px; font-weight: 600; }
@media (max-width: 1100px) { .codepk-shell { grid-template-columns: 190px minmax(0, 1fr); padding: 0 14px; }.news-panel { display: none; }.brand { width: 180px; } }
@media (max-width: 700px) { .codepk-header { height: 54px; }.header-inner { padding: 0 12px; }.brand { width: auto; flex: 1; }.brand strong { font-size: 16px; }.codepk-header nav { display: none; }.header-link { display: none; }.codepk-shell { display: block; padding: 0 10px 18px; }.ranking-panel { min-height: 0; margin: 10px 0; }.rank-list { display: grid; grid-template-columns: repeat(2, 1fr); }.rank-row { height: 36px; padding: 0 8px; font-size: 11px; }.rank-tabs { padding: 7px 9px; }.provider-area { padding-top: 8px; }.provider-toolbar { align-items: flex-start; flex-direction: column; }.toolbar-tools { width: 100%; }.search-mini { flex: 1; }.search-mini input { width: 100%; }.category-tabs { overflow-x: auto; padding-bottom: 3px; }.provider-grid { grid-template-columns: 1fr; gap: 10px; }.provider-card { min-height: 218px; border-radius: 10px; }.risk-bar { font-size: 10px; } }

/* Readable provider cards */
.provider-card { min-height: 252px; }
.provider-top { padding-right: 8px; }
.provider-name h3 { padding-right: 4px; line-height: 1.35; }
.provider-name h3 small { display: inline-block; vertical-align: 2px; white-space: nowrap; }
.provider-name h3 .featured-label { margin-left: 4px; color: #d78b00; background: #fff4d9; border-color: #f5d28c; }
.provider-ops { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 154px; margin-left: auto; position: relative; top: -3px; }.provider-ops small { display: inline-block; padding: 6px 10px; border: 1px solid; border-radius: 5px; font-size: 16px; font-weight: 600; line-height: 1.2; white-space: nowrap; }.provider-ops .featured-label { color: #d78b00; background: #fff4d9; border-color: #f5d28c; }.provider-ops .recommended-label { color: #168b57; background: #e9f8ef; border-color: #b7e7c9; }
.provider-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; min-height: 18px; margin-top: 9px; }.provider-badges small { display: inline-block; padding: 2px 6px; border: 1px solid #dfeeea; border-radius: 4px; color: #5d7778; background: #f7fbfa; font-size: 10px; font-weight: 500; line-height: 1.3; }.provider-badges .featured-label { color: #d78b00; background: #fff4d9; border-color: #f5d28c; }.provider-badges .recommended-label { color: #168b57; background: #e9f8ef; border-color: #b7e7c9; }.provider-badges .site-tag { color: var(--tag-color, #4d78c9); background: #f3f7ff; border-color: #d9e3f7; }.provider-badges .payment-badge { color: #61717b; background: #f4f7f8; border-color: #dce5e8; }
.provider-desc { height: auto; min-height: 58px; padding: 18px 0 12px; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.55; padding-right: 4px; }
.provider-metrics { min-height: 57px; }
@media (max-width: 700px) { .provider-card { min-height: 230px; }.provider-desc { -webkit-line-clamp: 3; }.provider-badges { justify-content: flex-start; } }
