* { box-sizing: border-box; }

:root {
  --blue: #075de8;
  --blue-deep: #0648b5;
  --blue-light: #edf5ff;
  --gold: #e3ad2f;
  --text: #111827;
  --muted: #667085;
  --line: #e2e7ef;
  --surface: #fff;
  --bg: #f8fafc;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body { min-width: 1120px; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.75; }
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 .page { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.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; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: min(1440px, calc(100% - 64px)); height: 68px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 15px; color: #0b1733; line-height: 1; white-space: nowrap; }
.brand span { color: var(--blue); font-size: 35px; font-weight: 950; letter-spacing: 4px; }
.brand strong { font-size: 27px; font-weight: 900; letter-spacing: 2px; }
.main-nav { min-width: 0; flex: 1; height: 100%; display: flex; align-items: center; justify-content: space-evenly; gap: 0; }
.main-nav > a { position: relative; display: grid; place-items: center; height: 100%; padding: 0 1px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.main-nav > a:hover, .main-nav > a.active { color: var(--blue); }
.main-nav > a::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 4px 4px 0 0; background: transparent; }
.main-nav > a.active::after { background: var(--blue); }
.search { flex: 0 0 220px; width: 220px; height: 42px; display: flex; overflow: hidden; border: 1px solid #cfd7e5; border-radius: 7px; background: #fff; }
.search input { min-width: 0; flex: 1; padding: 0 16px; border: 0; outline: 0; color: var(--text); font-size: 14px; }
.search button { width: 96px; border: 0; background: var(--blue); color: #fff; cursor: pointer; font-weight: 700; }
.search button:hover { background: var(--blue-deep); }

.page { width: min(1440px, calc(100% - 64px)); margin: 0 auto; padding: 12px 0 58px; }
.breadcrumb { min-height: 34px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.breadcrumb a:hover { color: var(--blue); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.resource-card, .ranking-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.resource-card, .hot-tags-panel { grid-column: 1; }
.sidebar { grid-column: 2; grid-row: 1 / span 2; }

.page-grid-404 { grid-template-columns: minmax(0, 1fr); align-items: start; }
.error-panel { min-height: 620px; padding: 52px 54px 42px; border: 1px solid var(--line); border-radius: 13px; background:
  radial-gradient(circle at top right, rgba(17, 104, 239, .18), transparent 30%),
  linear-gradient(135deg, #ffffff 0%, #f7fbff 100%); }
.error-code { color: #dbe8ff; font-size: 118px; font-weight: 900; line-height: .9; letter-spacing: -4px; }
.error-kicker { margin: 12px 0 0; color: var(--blue); font-size: 14px; font-weight: 700; letter-spacing: 2px; }
.error-panel h1 { margin: 14px 0 0; color: #0f2f66; font-size: 44px; line-height: 1.15; white-space: normal; }
.error-desc { max-width: 720px; margin: 18px 0 0; color: #475467; font-size: 18px; line-height: 1.9; }
.error-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.error-primary { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.error-primary { background: var(--blue); color: #fff; }
.error-primary:hover { background: var(--blue-deep); }

.tag-page-grid { align-items: start; }
.tag-main { display: grid; gap: 22px; }
.tag-hero-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(135deg, #0d57d6 0%, #1666ef 62%, #0f58cf 100%); color: #fff; }
.tag-hero-copy { padding: 28px 30px 20px; }
.tag-hero-panel h1 { margin: 0; font-size: 42px; line-height: 1.15; white-space: normal; }
.tag-hero-desc { max-width: 760px; margin: 14px 0 0; color: rgba(255,255,255,.9); font-size: 16px; line-height: 1.85; }
.tag-related-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.tag-subnav { padding: 18px 28px 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-subnav a { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 38px; padding: 0 14px; border: 1px solid #d9e5ff; border-radius: 999px; background: #f5f8ff; color: var(--blue); font-size: 14px; }
.tag-subnav a.active { border-color: #0f5ee8; background: #0f5ee8; color: #fff; box-shadow: 0 10px 22px rgba(15, 94, 232, .22); }
.tag-subnav a:hover { background: #eaf2ff; }

.tag-list-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.tag-list-header { padding: 22px 28px 16px; border-bottom: 1px solid var(--line); }
.tag-list-header h2 { margin: 0; color: #0f2f66; font-size: 26px; line-height: 1.25; }
.tag-ranking-list { margin: 0; padding: 0; list-style: none; }
.tag-ranking-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px 28px; border-top: 1px solid var(--line); }
.tag-ranking-list li:first-child { border-top: 0; }
.tag-item-thumb { display: block; width: 96px; height: 96px; }
.tag-item-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; background: #f4f7fb; }
.tag-item-body { min-width: 0; display: grid; gap: 12px; }
.tag-item-top { display: block; }
.tag-item-top h3 { min-width: 0; margin: 0; font-size: 28px; line-height: 1.2; }
.tag-item-top h3 a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-item-top h3 a:hover { color: var(--blue); }
.tag-item-body p { margin: 0; color: #475467; font-size: 16px; line-height: 1.85; }
.tag-item-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item-tags a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid #d9e5ff; border-radius: 999px; background: #f5f8ff; color: var(--blue); font-size: 13px; white-space: nowrap; }
.tag-item-tags a:hover { border-color: #b7cdfd; background: #e9f1ff; color: #0b52d0; }
.tag-pagination { padding: 22px 28px 28px; display: flex; gap: 10px; align-items: center; justify-content: center; border-top: 1px solid var(--line); }
.tag-pagination a, .tag-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.tag-pagination a { border: 1px solid var(--line); background: #fff; color: #0f2f66; }
.tag-pagination a.current, .tag-pagination a:hover { border-color: #cdddff; background: #edf4ff; color: var(--blue); }
.tag-pagination span { color: var(--muted); }

.rank-hero { min-height: 318px; display: grid; grid-template-columns: 225px minmax(0, 1fr); color: #fff; background: linear-gradient(125deg, #064bbf 0%, #075fe9 58%, #064aad 100%); }
.rank-seal { position: relative; padding: 32px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,.44); text-align: center; }
.rank-seal span { font-size: 14px; font-weight: 750; letter-spacing: 2px; }
.rank-seal strong { margin: 6px 0 -2px; font-size: 92px; line-height: 1; font-weight: 800; letter-spacing: -5px; }
.rank-seal b { margin-top: 7px; color: #ffd45e; font-size: 14px; letter-spacing: 2px; }
.rank-seal small { margin-top: 18px; color: rgba(255,255,255,.78); font-size: 12px; }

.profile { position: relative; padding: 28px 30px 24px; overflow: hidden; }
.profile::after { content: "79fy"; position: absolute; right: 18px; top: 2px; color: rgba(255,255,255,.06); font-size: 145px; font-weight: 900; line-height: 1; letter-spacing: -12px; pointer-events: none; }
.profile-main { position: relative; z-index: 1; display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 24px; align-items: center; }
.cover { width: 156px; height: 156px; object-fit: cover; border: 1px solid rgba(255,255,255,.45); border-radius: 18px; background: #fff; }
.profile-copy { min-width: 0; }
h1 { overflow: hidden; margin: 0 0 8px; font-size: 36px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy p { max-width: 650px; margin: 0 0 16px; color: rgba(255,255,255,.92); font-size: 15px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: nowrap; gap: 10px; overflow: hidden; }
.tags a { max-width: 128px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 14px; border: 1px solid rgba(255,255,255,.82); border-radius: 6px; color: #fff; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tags a:hover { background: rgba(255,255,255,.14); }
.profile-bottom { position: relative; z-index: 1; margin-top: 18px; padding-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: end; border-top: 1px solid rgba(255,255,255,.4); }
.profile-bottom dl { margin: 0; display: grid; grid-template-columns: minmax(60px,.65fr) minmax(82px,.85fr) minmax(122px,1.3fr) minmax(94px,1fr); }
.profile-bottom dl div { padding: 0 17px; border-left: 1px solid rgba(255,255,255,.32); }
.profile-bottom dl div:first-child { padding-left: 0; border-left: 0; }
.profile-bottom dt { color: rgba(255,255,255,.8); font-size: 13px; }
.profile-bottom dd { margin: 4px 0 0; font-size: 16px; font-weight: 700; white-space: nowrap; }
.download-button { height: 52px; display: grid; place-items: center; border-radius: 6px; background: #fff; color: var(--blue); font-size: 16px; font-weight: 800; }
.download-button:hover { background: var(--blue-light); }

.resource-content { padding: 4px 28px 10px; }
.resource-content h2 { margin: 0; padding: 25px 0 10px; border-top: 1px solid var(--line); font-size: 22px; line-height: 1.35; }
.resource-content h2:first-child { border-top: 0; }
.resource-content p { margin: 0 0 22px; color: #475467; font-size: 16px; line-height: 1.95; }
.resource-content ul { margin: 0 0 22px; padding-left: 0; display: block; color: #475467; list-style: none; font-size: 16px; line-height: 1.9; }
.resource-content ul li { overflow: visible; text-overflow: clip; white-space: normal; }
.resource-content ul li::marker { color: #526a91; }

.hot-tags-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.hot-tags-header { padding: 18px 28px 12px; border-bottom: 1px solid var(--line); }
.hot-tags-header h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.hot-tags-header p { margin: 8px 0 0; color: #667085; font-size: 14px; line-height: 1.6; }
.hot-tags-list { padding: 24px 28px 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.hot-tags-list a { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; max-width: 100%; height: 38px; padding: 0 14px; border: 1px solid #d9e5ff; border-radius: 999px; background: #f5f8ff; color: var(--blue); font-size: 14px; font-weight: 600; white-space: nowrap; }
.hot-tags-list a:hover { background: #eaf2ff; }

.sidebar { display: grid; gap: 16px; }
.ranking-panel { padding: 0 18px 10px; }
.ranking-panel header { height: 58px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.ranking-panel h2 { margin: 0; font-size: 22px; }
.ranking-list { margin: 0; padding: 0; list-style: none; }
.ranking-list li + li { border-top: 1px solid var(--line); }
.ranking-item { min-height: 64px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 0; }
.rank-thumb { display: block; width: 72px; height: 72px; }
.ranking-list i { color: #637083; font-size: 15px; font-style: normal; }
.ranking-list span { min-width: 0; display: grid; }
.ranking-list b { overflow: hidden; font-size: 15px; }
.ranking-list b a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list b a:hover { color: var(--blue); }
.sidebar-tags { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 6px; overflow: hidden; font-style: normal; }
.sidebar-tags a { min-width: 0; max-width: 74px; display: inline-flex; align-items: center; height: 24px; overflow: hidden; padding: 0 8px; border: 1px solid #d9e5ff; border-radius: 999px; background: #f4f8ff; color: var(--blue); font-size: 12px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-tags a:hover { background: #eaf2ff; }
.ranking-list .featured .ranking-item { min-height: 100px; grid-template-columns: 42px 72px minmax(0, 1fr); }
.ranking-list .featured img { width: 72px; height: 72px; object-fit: cover; border-radius: 7px; background: #f4f7fb; }
.ranking-list li:first-child i { align-self: start; margin-top: -9px; padding: 4px 8px; background: var(--gold); color: #fff; }

.site-footer { width: min(1440px, calc(100% - 64px)); margin: 0 auto; padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a:hover { color: var(--blue); }
.site-footer p { margin: 0; }

@media (max-width: 1260px) {
  .header-inner, .page, .site-footer { width: calc(100% - 40px); }
  .header-inner { gap: 20px; }
  .main-nav { gap: 0; }
  .main-nav > a { padding: 0 1px; font-size: 14px; }
  .search { flex-basis: 200px; width: 200px; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .error-panel { padding: 42px 36px 34px; }
  .error-code { font-size: 96px; }
  .error-panel h1 { font-size: 38px; }
  .error-desc { font-size: 16px; }
  .tag-hero-panel h1 { font-size: 36px; }
  .tag-ranking-list li { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 22px 22px; }
  .tag-item-thumb, .tag-item-thumb img { width: 88px; height: 88px; }
  .tag-item-top h3 { font-size: 24px; }
  .rank-hero { grid-template-columns: 190px minmax(0, 1fr); }
  .profile-bottom { grid-template-columns: minmax(0, 1fr) 170px; gap: 14px; }
  .profile-bottom dl div { padding: 0 10px; }
}
