:root{--bg:#FAFAF8;--bg-subtle:#F5F3F0;--text:#1A1A1A;--text2:#666;-text3:#999;--border:#E8E6E3;--borderL:#F0EEEB;--accent:#2563EB;--accentBg:#EFF6FF;--tagBg:#F0EEEB;--tagOn:#1A1A1A;--tagOnTxt:#FFF;--font:'Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}

*{box-sizing:border-box;margin:0;padding:0}

html,body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased;min-height:100dvh}

a{color:inherit;text-decoration:none}

button{font-family:inherit;cursor:pointer;border:none;background:none}

img{max-width:100%;height:auto}

/* Header */

.header{position:sticky;top:0;z-index:100;background:var(--bg);border-bottom:1px solid var(--border);padding:12px 0}

.header-inner{max-width:1328px;margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between}

.logo{font-size:17px;font-weight:600;letter-spacing:-0.02em}

.nav{display:flex;gap:20px}

.nav a{font-size:13px;color:var(--text2)}

.nav a:hover{color:var(--text)}

.nav a.active{color:var(--text);font-weight:500}

.search-box{display:flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--border);border-radius:6px;min-width:180px}

.search-box span{font-size:12px;color:var(--text3)}

.search-box input{border:none;background:none;outline:none;font-size:13px;font-family:var(--font);color:var(--text);width:100%}

.search-box input::placeholder{color:var(--text3)}

/* Main layout */

.main-wrap{max-width:1328px;margin:0 auto;padding:0 24px;display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:56px;align-items:start}

.main-col{min-width:0}

/* Sidebar */

.sidebar{position:sticky;top:72px;display:flex;flex-direction:column;gap:32px}

.side-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);margin-bottom:14px;display:flex;align-items:center;gap:8px}

.side-title::after{content:'';flex:1;height:1px;background:var(--border)}

.hot-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--borderL)}

.hot-item:last-child{border-bottom:none}

.hot-rank{font-size:11px;font-weight:600;color:var(--text3);min-width:18px;text-align:right}

.hot-name{flex:1;font-size:13px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.hot-stars{font-size:11px;font-weight:600;color:var(--accent);background:var(--accentBg);padding:2px 8px;border-radius:5px;flex-shrink:0}

.side-note{font-size:12px;color:var(--text3);line-height:1.7;padding:16px;background:var(--bg-subtle);border-radius:8px}

/* Filter bar */

.filter-bar{padding:20px 0 0;display:flex;flex-wrap:wrap;gap:6px;align-items:center}

.filter-group{display:flex;gap:5px;flex-wrap:wrap;align-items:center}

.filter-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text3);margin-right:2px}

.filter-tag{padding:5px 12px;font-size:12px;background:var(--tagBg);color:var(--text2);border-radius:14px;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);white-space:nowrap}

.filter-tag:hover{background:var(--border);color:var(--text);transform:translateY(-1px)}

.filter-tag.active{background:var(--tagOn);color:var(--tagOnTxt);font-weight:500;box-shadow:0 2px 6px rgba(0,0,0,.12)}

.filter-tag .num{font-size:10px;opacity:.6;margin-left:1px}

.filter-divider{width:1px;height:20px;background:var(--border);margin:0 8px}

/* Results header */

.results-header{margin:16px 0 0;padding:0 0 10px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border)}

.results-count{font-size:12px;color:var(--text3)}

.results-count strong{color:var(--text);font-weight:600}

.sort-btn{font-size:12px;color:var(--text2)}

/* List entries */

.list-area{padding:0 0 80px}

.entry{display:flex;align-items:flex-start;gap:18px;padding:20px 0;border-bottom:1px solid var(--borderL);transition:background .15s,margin .15s,padding .15s}

.entry:hover{background:var(--bg-subtle);margin:0 -14px;padding:20px 14px;border-radius:8px}

.entry:last-child{border-bottom:none}

.entry-rank{font-size:12px;font-weight:600;color:var(--text3);min-width:24px;padding-top:2px;text-align:right}

.entry-body{flex:1;min-width:0}

.entry-name{font-size:15px;font-weight:500;line-height:1.4;letter-spacing:-0.01em}

.entry-name a:hover{color:var(--text2)}

.entry-desc{font-size:13px;color:var(--text2);line-height:1.65;margin-top:5px}

.entry-meta{display:flex;gap:5px;margin-top:8px;flex-wrap:wrap}

.meta-tag{padding:2px 8px;font-size:11px;background:var(--tagBg);color:var(--text2);border-radius:10px}

.entry-stars{text-align:right;flex-shrink:0;min-width:56px}

.stars-badge{display:inline-block;padding:3px 10px;background:var(--accentBg);color:var(--accent);border-radius:6px;font-size:13px;font-weight:600;letter-spacing:-0.01em}

.stars-label{font-size:10px;color:var(--text3);display:block;margin-top:3px}

/* Detail Page - Desktop-first Redesign v2
   Stronger shadows + brand color + typography hierarchy
   Inspired by HelloGitHub + M-Team aesthetics
   No em-dashes, no scroll cues, no decorative dots */

/* === Page === */
.page-detail { background: var(--bg); }

/* === Layout === */
.detail-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px 96px;
}

/* === Two-column Layout (PT站 style) === */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.detail-main { min-width: 0; }
.detail-side {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === Breadcrumb === */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all .15s;
}
.detail-back:hover {
  color: var(--accent);
  background: var(--accentBg);
}

/* === Hero === */
.detail-hero {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-left: 4px solid #2563EB;
  border-radius: 16px;
  padding: 40px 44px 36px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.02);
}
.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.cat-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.cat-ai       { background: #DBEAFE; color: #1E40AF; }
.cat-both     { background: #D1FAE5; color: #065F46; }
.cat-alternative { background: #FEF3C7; color: #92400E; }
.cat-         { background: #F3F4F6; color: #6B7280; }
.use-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.detail-name {
  font-size: 36px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.detail-fullname {
  font-size: 14px;
  color: #9CA3AF;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  margin-bottom: 20px;
}
.detail-desc {
  font-size: 17px;
  line-height: 1.75;
  color: #4B5563;
  margin: 0 0 28px;
  max-width: 720px;
}
.detail-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37,99,235,.25);
}
.btn-primary:hover {
  background: #1D4ED8;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
  transform: translateY(-1px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accentBg);
}

/* === Stats Strip === */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.02);
}
.stat-cell {
  padding: 24px 20px;
  text-align: center;
  position: relative;
}
.stat-cell + .stat-cell {
  border-left: 1px solid #F3F4F6;
}
.stat-cell:nth-child(2) {
  background: #FFFBEB;
}
.stat-cell:nth-child(2) .stat-val {
  color: #D97706;
}
.stat-cell:nth-child(4) .stat-val {
  color: var(--accent);
}
.stat-val {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* === Section Header === */
.section-hd {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #2563EB;
  display: inline-block;
  letter-spacing: -0.01em;
}

/* === Info Grid === */
.info-section {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03), 0 1px 2px rgba(0,0,0,.015);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.info-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 18px 22px;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.info-card:hover {
  border-color: #93C5FD;
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
  transform: translateY(-1px);
}
.info-lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #2563EB;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.info-val {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* === Sidebar Panels (PT站 spec-sheet) === */
.side-panel {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.02);
}
.side-hd {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F3F4F6;
  letter-spacing: -0.01em;
}

/* spec-sheet key-value rows */
.side-info { margin: 0; }
.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #F3F4F6;
}
.side-row:last-child { border-bottom: none; }
.side-row dt {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 500;
}
.side-row dd {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
  margin: 0;
}

/* related compact list */
.side-related { list-style: none; margin: 0; padding: 0; }
.rel-item {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  transition: all .15s;
}
.rel-item:hover { background: var(--accentBg); }
.rel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.rel-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rel-stars {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accentBg);
  padding: 2px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}
.rel-desc {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
}

/* === Prev / Next Navigation === */
.prev-next {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.pn-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #fff;
  transition: all .2s;
  text-decoration: none;
  flex: 1;
  max-width: 48%;
}
.pn-link:hover {
  border-color: #93C5FD;
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
  transform: translateY(-1px);
}
.pn-prev { justify-content: flex-start; }
.pn-next { justify-content: flex-end; text-align: right; }
.pn-empty { visibility: hidden; }
.pn-arrow {
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.pn-text { min-width: 0; }
.pn-lbl {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}
.pn-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 768px) {
  .detail-wrap { padding: 24px 20px 64px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .detail-hero { padding: 24px; }
  .detail-name { font-size: 28px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-left: 1px solid #F3F4F6; }
  .stat-cell:nth-child(1),
  .stat-cell:nth-child(2) { border-bottom: 1px solid #F3F4F6; }
  .info-section { padding: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .prev-next { flex-direction: column; }
  .pn-link { max-width: 100%; }
}
@media (max-width: 480px) {
  .detail-name { font-size: 24px; }
  .detail-hero { padding: 20px 16px; }
  .stat-val { font-size: 22px; }
}


/* Explore page */

.explore-header{padding:20px 0 0}

.explore-title{font-size:22px;font-weight:600;letter-spacing:-0.02em}

.explore-sub{font-size:13px;color:var(--text2);margin-top:6px}

/* Surprise page */

.surprise-wrap{padding:60px 0;text-align:center}

.surprise-card{display:inline-block;text-align:left;max-width:700px;width:100%;padding:40px;background:var(--bg-subtle);border-radius:16px}

.surprise-card .entry-rank{display:none}

.surprise-card .entry{background:transparent;margin:0;padding:0;border:none}

.surprise-card .entry-name{font-size:24px}

.surprise-card .entry-desc{font-size:15px}

.surprise-card .stars-badge{font-size:16px;padding:4px 14px}

.surprise-actions{display:flex;gap:12px;justify-content:center;margin-top:28px}

.surprise-btn{display:inline-flex;align-items:center;gap:6px;padding:12px 28px;border-radius:8px;font-size:14px;font-weight:500;transition:all .2s}

.surprise-btn.primary{background:var(--accent);color:#fff}

.surprise-btn.primary:hover{opacity:.9;transform:translateY(-1px);box-shadow:0 4px 12px rgba(37,99,235,.3)}

.surprise-btn.outline{border:1px solid var(--border);color:var(--text2)}

.surprise-btn.outline:hover{background:var(--bg-subtle)}

.surprise-hint{font-size:13px;color:var(--text3);margin-top:20px}

/* Cookie bar */

.cookie-bar{position:fixed;bottom:0;left:0;right:0;background:#1a1a1a;color:#eee;padding:8px 24px;font-size:12px;display:flex;align-items:center;justify-content:center;gap:16px;z-index:9999;flex-wrap:wrap}

.cookie-bar a{color:#fff;text-decoration:underline;font-weight:500}

.cookie-bar button{background:#fff;color:#1a1a1a;border:none;border-radius:4px;padding:4px 12px;font-size:12px;cursor:pointer;font-weight:500}

/* Footer */

.footer{text-align:center;padding:28px 0;border-top:1px solid var(--border);font-size:13px;color:var(--text2);font-weight:500}

.footer a{color:var(--text2);font-weight:600}

.footer a:hover{color:var(--text)}

/* Print */

@media print {

  body{font-size:11px;color:#000;background:#fff}

  .header{position:static;border-bottom:1px solid #ccc}

  .search-box,.sidebar,.filter-bar,.entry-stars,.nav,.cookie-bar{display:none!important}

  .main-wrap{display:block;max-width:100%;padding:0}

  .entry{padding:10px 0;page-break-inside:avoid}

  .footer{border-top:1px solid #ccc;font-size:10px}

}

/* Responsive */

@media(max-width:1024px){

  .main-wrap{grid-template-columns:1fr;gap:0}

  .sidebar{display:none}

  .info-grid{grid-template-columns:repeat(2,1fr)}

}

@media(max-width:768px){

  .header-inner,.main-wrap{padding-left:16px;padding-right:16px}

  .nav{display:none}

  .search-box{min-width:140px}

  .entry{flex-wrap:wrap}

  .entry-stars{text-align:left;width:100%;margin-top:4px}

  .detail-title{font-size:22px}

  .info-grid{grid-template-columns:1fr}

  .surprise-card{padding:24px}

  .cookie-bar{font-size:11px;padding:6px 12px}

}
/* === Hero two-column: image left + info right (PT-style) === */
.detail-hero{display:flex;gap:28px;align-items:flex-start}
.hero-media{flex:0 0 320px;max-width:320px}
.hero-img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:12px;background:#eef1f5;box-shadow:0 6px 18px rgba(15,23,42,.12);display:block}
.hero-body{flex:1 1 0;min-width:0}
@media (max-width:768px){
  .detail-hero{flex-direction:column;gap:20px}
  .hero-media{flex:0 0 auto;width:100%;max-width:100%}
  .hero-img{aspect-ratio:16/9}
}

/* ===== Visual rhythm: section-hd icon+divider (20260729b) ===== */
.detail-main .section-hd{margin:0 0 18px 0;padding:0 0 12px 0;font-size:18px;font-weight:700;color:#111827;border-bottom:1px solid #ececf1}
