:root {
    --canvas: #f6f4fb;
    --paper: #ffffff;
    --ink: #171326;
    --muted: #6f6a7c;
    --line: #e7e2ef;
    --brand: #6d28d9;
    --brand-deep: #4c1d95;
    --pink: #db2777;
    --orange: #f59e0b;
    --cyan: #0891b2;
    --green: #059669;
    --shadow: 0 16px 42px rgba(54, 32, 94, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1320px, calc(100% - 36px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.preview-notice { position: relative; z-index: 80; background: #172554; padding: 8px 18px; color: #fff; text-align: center; font-size: 12px; }
.preview-notice a { margin-left: 10px; color: #bfdbfe; font-weight: 800; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(231, 226, 239, .92); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.header-row { display: flex; min-height: 62px; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; min-width: 0; align-items: center; gap: 9px; color: var(--ink); font-size: 19px; font-weight: 900; letter-spacing: -.5px; text-decoration: none; white-space: nowrap; }
.wordmark-mark { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--pink)); color: #fff; font: 900 10px/1 Arial, sans-serif; box-shadow: 0 7px 16px rgba(109,40,217,.25); }
.desktop-navigation { display: flex; align-self: stretch; align-items: center; gap: 21px; }
.desktop-navigation a { color: #514b5e; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.desktop-navigation a:hover { color: var(--brand); }
.apply-link { margin-left: auto; border: 1px solid #d8d0e6; border-radius: 9px; padding: 7px 11px; color: #4f465f; font-size: 11px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.apply-link:hover { border-color: var(--brand); background: var(--brand); color: #fff; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 7px 0; cursor: pointer; }
.menu-toggle span { display: block; width: 21px; height: 2px; margin: 4px 0; background: var(--ink); }
.mobile-navigation { border-top: 1px solid var(--line); background: #fff; padding: 7px 18px 12px; }
.mobile-navigation a { display: block; border-bottom: 1px solid #f0edf5; padding: 10px 0; font-weight: 800; text-decoration: none; }

.hero-section { position: relative; overflow: hidden; background: linear-gradient(125deg, #4c1d95 0%, #7c3aed 48%, #db2777 100%); color: #fff; }
.hero-section::before, .hero-section::after { position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); content: ""; }
.hero-section::before { top: -120px; right: 8%; width: 330px; height: 330px; }
.hero-section::after { bottom: -150px; left: 7%; width: 280px; height: 280px; }
.hero-content { position: relative; z-index: 1; padding: 43px 0 39px; text-align: center; }
.hero-kicker { margin: 0 0 8px; color: #fef3c7; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.hero-content h1 { margin: 0; font-size: clamp(31px, 4.1vw, 52px); letter-spacing: -.055em; line-height: 1.08; }
.hero-description { max-width: 720px; margin: 10px auto 21px; color: rgba(255,255,255,.82); font-size: 14px; }
.directory-search { display: flex; width: min(760px, 100%); min-height: 52px; margin: 0 auto; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.32); border-radius: 15px; background: rgba(38,14,74,.72); box-shadow: 0 18px 40px rgba(35,10,70,.22); }
.search-icon { position: relative; width: 42px; flex: 0 0 42px; }
.search-icon::before { position: absolute; top: -7px; left: 16px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; content: ""; }
.search-icon::after { position: absolute; top: 5px; left: 28px; width: 7px; height: 2px; background: #fff; content: ""; transform: rotate(45deg); }
.directory-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; padding: 12px 7px; color: #fff; font-size: 14px; }
.directory-search input::placeholder { color: rgba(255,255,255,.6); }
.directory-search button { align-self: stretch; border: 0; background: #fff; padding: 0 24px; color: var(--brand-deep); font-weight: 900; cursor: pointer; }
.directory-search button:hover { background: #fef3c7; }
.hero-stats { display: flex; margin-top: 18px; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-stats span { border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.1); padding: 5px 10px; color: rgba(255,255,255,.84); font-size: 11px; }
.hero-stats strong { color: #fff; }

.ad-zone:empty, .grid-ad:empty { display: none; }
.ad-zone { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ad-zone-top, .ad-zone-category { padding-top: 10px; }
.nav-ad-group { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.nav-ad-slot { max-width: 100%; overflow: hidden; text-align: center; }
.nav-ad-slot img, .nav-ad-slot iframe, .nav-ad-slot ins { max-width: 100%; margin-inline: auto; }
.nav-ad-frame { display: block; width: 100%; height: 110px; border: 0; }

.discovery-section { padding-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 13px; }
.section-heading p { margin: 0 0 3px; color: var(--pink); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.section-heading h2 { margin: 0; font-size: clamp(23px, 2.5vw, 32px); letter-spacing: -.04em; line-height: 1.1; }
.section-heading > span { max-width: 430px; color: var(--muted); font-size: 12px; text-align: right; }
.signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signal-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); }
.signal-panel > header { display: flex; min-height: 66px; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 11px 14px; }
.signal-panel-hot > header { background: linear-gradient(90deg, #fff7ed, #fff); }
.signal-panel-recent > header { background: linear-gradient(90deg, #ecfeff, #fff); }
.signal-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 11px; color: #fff; font-size: 18px; font-weight: 900; }
.signal-panel-hot .signal-icon { background: linear-gradient(135deg, #f97316, #db2777); }
.signal-panel-recent .signal-icon { background: linear-gradient(135deg, #0891b2, #6d28d9); }
.signal-panel header p { margin: 0 0 1px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.signal-panel header h3 { margin: 0; font-size: 17px; }
.signal-list { margin: 0; padding: 0; list-style: none; }
.signal-list li { display: flex; min-width: 0; align-items: center; border-bottom: 1px solid #f0edf5; padding: 7px 11px; }
.signal-list li:last-child { border-bottom: 0; }
.signal-list li:hover { background: #faf8fd; }
.signal-list .signal-empty { min-height: 62px; justify-content: center; color: var(--muted); font-size: 11px; text-align: center; }
.signal-list a { display: flex; min-width: 0; min-height: 48px; flex: 1; align-items: center; gap: 9px; text-decoration: none; }
.rank-number { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 8px; background: #eeeaf4; color: #766e83; font-size: 10px; font-weight: 900; }
.rank-1 { background: #ef4444; color: #fff; }
.rank-2 { background: #f97316; color: #fff; }
.rank-3 { background: #eab308; color: #fff; }
.recent-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px #cffafe; }
.signal-thumbnail { position: relative; display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; overflow: hidden; border-radius: 11px; background: #ede9fe; color: var(--brand); font-size: 13px; font-weight: 900; }
.signal-thumbnail img, .recommendation-thumbnail img, .site-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.signal-copy { min-width: 0; flex: 1; }
.signal-copy strong, .signal-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-copy strong { font-size: 13px; }
.signal-copy small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.signal-meta { flex: 0 0 auto; color: #8b8498; font-size: 9px; white-space: nowrap; }

.recommendation-section { padding-top: 26px; }
.compact-heading h2 { font-size: 26px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.recommendation-empty { grid-column: 1 / -1; border: 1px dashed #c4b5fd; border-radius: 14px; background: #f5f3ff; padding: 24px; color: var(--muted); text-align: center; }
.recommendation-card { display: flex; min-width: 0; min-height: 112px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; text-decoration: none; box-shadow: 0 8px 25px rgba(54,32,94,.06); transition: transform .16s, border-color .16s, box-shadow .16s; }
.recommendation-card:hover { border-color: #c4b5fd; box-shadow: 0 15px 35px rgba(91,33,182,.13); transform: translateY(-2px); }
.recommendation-thumbnail { position: relative; display: grid; width: 76px; height: 76px; flex: 0 0 76px; place-items: center; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #ede9fe, #fce7f3); color: var(--brand); font-size: 24px; font-weight: 900; }
.recommendation-copy { min-width: 0; flex: 1; }
.recommendation-label { display: block; margin-bottom: 3px; color: var(--pink); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.recommendation-copy strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-copy small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.recommendation-arrow { flex: 0 0 auto; color: #a78bfa; font-size: 18px; }

.category-navigation { margin-top: 30px; border-block: 1px solid var(--line); background: #fff; }
.category-navigation-row { display: flex; min-height: 58px; align-items: center; gap: 16px; padding-block: 8px; }
.category-navigation-row > strong { flex: 0 0 auto; font-size: 11px; }
.category-chips { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; }
.category-chips a { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e3ddec; border-radius: 999px; padding: 6px 10px; color: #5e566b; font-size: 11px; font-weight: 800; text-decoration: none; }
.category-chips a:hover, .category-chips a.is-current { border-color: #c4b5fd; background: #f5f3ff; color: var(--brand); }
.category-chips span { color: #9b93a7; font-size: 9px; }
.category-select-wrap { display: none; }
.category-select-wrap select { width: 100%; min-height: 42px; border: 1px solid #d8d0e6; border-radius: 9px; background: #fff; padding: 7px 9px; color: var(--ink); }

.directory-section { padding: 30px 0 52px; }
.directory-heading { margin-bottom: 15px; }
.directory-categories { display: grid; gap: 18px; }
.directory-category { min-width: 0; scroll-margin-top: 82px; }
.directory-category-header { display: flex; min-height: 54px; align-items: end; justify-content: space-between; gap: 16px; border-left: 5px solid var(--brand); border-radius: 10px 10px 0 0; background: linear-gradient(90deg, #ede9fe, rgba(237,233,254,0)); padding: 8px 12px; }
.directory-category:nth-child(4n+2) .directory-category-header { border-left-color: var(--pink); background: linear-gradient(90deg, #fce7f3, rgba(252,231,243,0)); }
.directory-category:nth-child(4n+3) .directory-category-header { border-left-color: var(--cyan); background: linear-gradient(90deg, #cffafe, rgba(207,250,254,0)); }
.directory-category:nth-child(4n+4) .directory-category-header { border-left-color: var(--orange); background: linear-gradient(90deg, #fef3c7, rgba(254,243,199,0)); }
.directory-category-header span { display: block; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.directory-category-header h3 { margin: 1px 0 0; font-size: 19px; }
.directory-category-header > strong { color: var(--muted); font-size: 10px; white-space: nowrap; }
.directory-category-header b { color: var(--ink); }
.site-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.directory-site-card { min-width: 0; }
.directory-site-link { display: flex; min-width: 0; min-height: 112px; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; text-decoration: none; box-shadow: 0 7px 22px rgba(54,32,94,.05); transition: border-color .16s, box-shadow .16s, transform .16s; }
.directory-site-link:hover { border-color: #c4b5fd; box-shadow: 0 13px 30px rgba(91,33,182,.12); transform: translateY(-2px); }
.site-thumbnail { position: relative; display: grid; width: 68px; height: 68px; flex: 0 0 68px; place-items: center; overflow: hidden; border-radius: 15px; background: linear-gradient(135deg, #ede9fe, #fce7f3); color: var(--brand); font-size: 22px; font-weight: 900; }
.site-card-copy { min-width: 0; flex: 1; }
.site-card-heading { display: flex; min-width: 0; align-items: center; gap: 6px; }
.site-card-heading > strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.private-badge { flex: 0 0 auto; border: 1px solid #f59e0b; border-radius: 999px; padding: 1px 5px; color: #b45309; font-size: 8px; font-weight: 900; }
.site-card-copy > small { display: -webkit-box; min-height: 34px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.site-card-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 9px; }
.site-card-meta span { overflow: hidden; color: #9b93a7; text-overflow: ellipsis; white-space: nowrap; }
.site-card-meta b { flex: 0 0 auto; color: var(--brand); }
.search-empty { border: 1px dashed #c4b5fd; border-radius: 14px; background: #f5f3ff; padding: 28px; text-align: center; }
.search-empty strong, .search-empty span { display: block; }
.search-empty strong { font-size: 18px; }
.search-empty span { margin-top: 4px; color: var(--muted); }
.grid-ad { margin-top: 14px; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-row { display: flex; min-height: 72px; align-items: center; gap: 20px; }
.footer-wordmark { font-size: 15px; }
.footer-wordmark .wordmark-mark { width: 23px; height: 23px; flex-basis: 23px; font-size: 8px; }
.site-footer p { margin: 0 auto 0 0; color: var(--muted); font-size: 11px; }
.site-footer > .footer-row > a:last-child { color: var(--brand); font-size: 11px; font-weight: 800; }
.back-to-top { position: fixed; right: 17px; bottom: 18px; z-index: 45; width: 40px; height: 40px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--pink)); color: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 12px 26px rgba(109,40,217,.25); }

@media (max-width: 1100px) {
    .recommendation-grid, .site-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .desktop-navigation { display: none; }
    .menu-toggle { display: block; }
    .header-row { gap: 14px; }
    .signal-grid { grid-template-columns: 1fr; }
    .hero-content { padding-block: 35px 32px; }
}

@media (max-width: 680px) {
    .shell { width: min(100% - 24px, 1320px); }
    html { scroll-padding-top: 70px; }
    .header-row { min-height: 56px; gap: 10px; }
    .wordmark { max-width: 49vw; overflow: hidden; font-size: 16px; text-overflow: ellipsis; }
    .wordmark-mark { width: 25px; height: 25px; flex-basis: 25px; border-radius: 8px; font-size: 8px; }
    .apply-link { padding: 5px 7px; font-size: 10px; }
    .hero-content { padding-block: 28px 26px; text-align: left; }
    .hero-content h1 { font-size: 30px; }
    .hero-description { margin: 8px 0 17px; font-size: 12px; }
    .directory-search { min-height: 49px; border-radius: 12px; }
    .directory-search button { padding-inline: 16px; }
    .hero-stats { justify-content: flex-start; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .section-heading > span { text-align: left; }
    .discovery-section { padding-top: 21px; }
    .signal-list li { padding-inline: 8px; }
    .signal-list a { min-height: 52px; }
    .signal-meta { max-width: 58px; overflow: hidden; text-overflow: ellipsis; }
    .recommendation-section { padding-top: 22px; }
    .recommendation-grid, .site-card-grid { grid-template-columns: 1fr; }
    .recommendation-card { min-height: 108px; }
    .recommendation-thumbnail { width: 70px; height: 70px; flex-basis: 70px; }
    .category-navigation-row { align-items: stretch; flex-direction: column; gap: 5px; }
    .category-chips { display: none; }
    .category-select-wrap { display: block; }
    .directory-section { padding-top: 23px; }
    .directory-category-header { min-height: 51px; }
    .directory-site-link { min-height: 108px; }
    .site-thumbnail { width: 64px; height: 64px; flex-basis: 64px; }
    .footer-row { min-height: 0; align-items: flex-start; flex-direction: column; gap: 6px; padding: 15px 0; }
    .site-footer p { margin: 0; }
    .preview-notice { padding-inline: 12px; text-align: left; }
    .preview-notice a { display: block; margin: 3px 0 0; }
}

@media (max-width: 390px) {
    .apply-link { font-size: 0; }
    .apply-link::after { content: "申请"; font-size: 10px; }
    .search-icon { width: 36px; flex-basis: 36px; }
    .search-icon::before { left: 12px; }
    .search-icon::after { left: 24px; }
    .directory-search input { font-size: 12px; }
    .directory-search button { padding-inline: 13px; font-size: 12px; }
    .signal-thumbnail { width: 36px; height: 36px; flex-basis: 36px; }
    .signal-copy strong { font-size: 12px; }
    .recommendation-card, .directory-site-link { gap: 10px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
