/* =========================================================
 * style.css - 前台主题样式
 * 主题色：紫蓝渐变 #667eea → #764ba2
 * 设计风格：现代卡片式 / 圆角 / 柔和阴影
 * ========================================================= */

/* =========================================================
 * 1. Reset
 * ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body,
div,
span,
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
a, abbr, acronym, address, cite, code,
em, img, small, strong, sub, sup,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote::before, blockquote::after,
q::before, q::after {
    content: "";
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

/* =========================================================
 * 2. 全局变量与基础排版
 * ========================================================= */
:root {
    --c-primary: #667eea;
    --c-primary-2: #764ba2;
    --c-primary-light: #818cf8;
    --c-primary-dark: #4f46e5;
    --c-text: #1f2937;
    --c-text-muted: #6b7280;
    --c-text-light: #9ca3af;
    --c-bg: #f8fafc;
    --c-bg-alt: #f1f5f9;
    --c-white: #ffffff;
    --c-border: #e5e7eb;
    --c-border-strong: #d1d5db;

    --grad-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --grad-primary-soft: linear-gradient(135deg, rgba(102,126,234,.15), rgba(118,75,162,.15));

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow: 0 4px 10px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-lg: 0 12px 30px rgba(15, 23, 42, .08), 0 4px 10px rgba(15, 23, 42, .05);
    --shadow-hover: 0 16px 40px rgba(102, 126, 234, .18), 0 6px 16px rgba(15, 23, 42, .08);

    --header-h: 72px;
    --container: 1280px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* =========================================================
 * 3. 布局容器 / Grid
 * ========================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Grid 网格系统 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* 区块 */
.section {
    padding: 48px 0;
}

.section-alt {
    background: var(--c-bg-alt);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--c-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: var(--grad-primary);
}

.section-more {
    font-size: 14px;
    color: var(--c-primary);
    font-weight: 500;
}

.section-more:hover {
    color: var(--c-primary-2);
}

/* =========================================================
 * 4. Header / 顶部导航
 * ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, .6);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--c-text);
    flex-shrink: 0;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--grad-primary);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(102, 126, 234, .35);
}

.logo-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 顶部搜索 */
.search-form {
    flex: 1;
    max-width: 460px;
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    padding: 2px;
    border-radius: 999px;
    background: var(--grad-primary);
}

.search-form input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 16px 0 20px;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
}

.search-form input::placeholder {
    color: var(--c-text-light);
}

.search-form button {
    height: 38px;
    padding: 0 22px;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.search-form button:hover {
    opacity: .92;
}

/* 主导航 */
.top-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-nav a {
    position: relative;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    border-radius: 8px;
}

.top-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.top-nav a:hover,
.top-nav a.active {
    color: var(--c-primary);
}

.top-nav a:hover::after,
.top-nav a.active::after {
    transform: scaleX(1);
}

/* 子导航 */
.sub-nav {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
}

.sub-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 0;
}

.sub-nav-inner a {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--c-text-muted);
    border-radius: 999px;
    transition: all .2s;
}

.sub-nav-inner a:hover,
.sub-nav-inner a.active {
    color: #fff;
    background: var(--grad-primary);
}

/* 汉堡菜单（移动端） */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--c-text);
    position: relative;
}

.mobile-toggle span::before,
.mobile-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--c-text);
}

.mobile-toggle span::before { top: -6px; }
.mobile-toggle span::after { top: 6px; }

/* =========================================================
 * 5. Hero 首屏
 * ========================================================= */
.hero {
    position: relative;
    min-height: 320px;
    padding: 72px 0 88px;
    background: var(--grad-primary);
    color: #fff;
    overflow: hidden;
}

/* 背景装饰点 - 径向渐变 */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 520px;
    height: 520px;
    top: -220px;
    right: -180px;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 60%);
}

.hero::after {
    width: 420px;
    height: 420px;
    bottom: -200px;
    left: -120px;
    background: radial-gradient(circle, rgba(255,255,255,.15), transparent 60%);
}

.hero-inner {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(14px, 1.5vw, 17px);
    line-height: 1.7;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 32px;
}

.hero-search {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 4px;
    margin: 0 auto 36px;
    max-width: 620px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero-search input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 22px;
    background: #fff;
    border-radius: 999px;
    font-size: 15px;
    color: var(--c-text);
}

.hero-search input::placeholder {
    color: var(--c-text-light);
}

.hero-search button {
    height: 48px;
    padding: 0 28px;
    margin-left: 4px;
    background: #fff;
    color: var(--c-primary);
    font-weight: 700;
    font-size: 15px;
    border-radius: 999px;
    transition: transform .2s, box-shadow .2s;
}

.hero-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .15);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin-top: 8px;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.stat-item span {
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    letter-spacing: .5px;
}

/* =========================================================
 * 6. 分类卡片
 * ========================================================= */
.category-card {
    position: relative;
    padding: 22px 22px 20px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 24px;
    background: var(--grad-primary-soft);
    margin-bottom: 14px;
}

.category-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
}

.category-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--c-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.category-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px dashed var(--c-border);
    font-size: 13px;
    color: var(--c-text-muted);
}

.category-enter {
    color: var(--c-primary);
    font-weight: 600;
}

.category-enter:hover {
    color: var(--c-primary-2);
}

/* =========================================================
 * 7. 网站卡片
 * ========================================================= */
.site-card {
    position: relative;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
    display: flex;
    flex-direction: column;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.site-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.site-favicon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, .25);
}

.site-favicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.site-favicon-text {
    line-height: 1;
    text-transform: uppercase;
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-domain {
    font-size: 12px;
    color: var(--c-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-desc {
    font-size: 13px;
    line-height: 1.65;
    color: var(--c-text-muted);
    margin: 4px 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6em;
}

.site-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.site-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-muted);
    background: var(--c-bg-alt);
    border-radius: 999px;
    line-height: 1.6;
}

.badge-featured {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.badge-new {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-hot {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* 标签胶囊 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--c-primary);
    background: var(--grad-primary-soft);
    border-radius: 999px;
    transition: all .2s;
}

.tag:hover {
    background: var(--grad-primary);
    color: #fff;
}

/* 访问按钮 */
.visit-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-primary);
}

.visit-link:hover {
    color: var(--c-primary-2);
}

/* =========================================================
 * 8. 通用按钮
 * ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--c-text);
    transition: all .2s;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, .3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, .4);
}

.btn-outline {
    border-color: var(--c-border-strong);
    background: #fff;
    color: var(--c-text);
}

.btn-outline:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.btn-visit {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--grad-primary);
    color: #fff;
    border-radius: 8px;
}

.btn-visit:hover {
    opacity: .92;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* =========================================================
 * 9. 面包屑 / 分页
 * ========================================================= */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    margin: 20px 0 28px;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--c-text-muted);
}

.breadcrumb a:hover {
    color: var(--c-primary);
}

.breadcrumb .sep {
    color: var(--c-text-light);
}

/* 分页 */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 40px 0 20px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    transition: all .2s;
}

.page-link:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.page-current {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, .35);
}

.page-current:hover {
    color: #fff;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--c-text-light);
}

.page-disabled {
    opacity: .45;
    pointer-events: none;
}

/* =========================================================
 * 10. 网站详情页
 * ========================================================= */
.detail-hero {
    background: var(--grad-primary);
    color: #fff;
    padding: 48px 0 40px;
    position: relative;
    overflow: hidden;
}

.detail-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    top: -240px;
    right: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%);
    pointer-events: none;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
}

.detail-head {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-favicon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--grad-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(102, 126, 234, .3);
}

.detail-favicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.detail-info p {
    color: var(--c-text-muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.detail-summary {
    font-size: 14px;
    line-height: 1.8;
    color: var(--c-text);
    margin-top: 8px;
    padding: 18px;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin: 32px 0;
}

/* 面板 */
.panel {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-border);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--c-border);
}

.info-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-list li span:first-child {
    color: var(--c-text-muted);
    flex-shrink: 0;
}

.info-list li span:last-child {
    color: var(--c-text);
    text-align: right;
    word-break: break-all;
}

/* =========================================================
 * 11. 空状态 / 错误页 / 辅助类
 * ========================================================= */
.empty-block {
    padding: 60px 20px;
    text-align: center;
    color: var(--c-text-muted);
    background: #fff;
    border: 1px dashed var(--c-border);
    border-radius: var(--radius-lg);
}

.empty-block .emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.error-section {
    padding: 80px 20px;
    text-align: center;
}

.error-code {
    font-size: clamp(80px, 16vw, 160px);
    font-weight: 900;
    line-height: 1;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-desc {
    color: var(--c-text-muted);
    margin-bottom: 24px;
}

.text-muted { color: var(--c-text-muted); }
.text-center { text-align: center; }

/* =========================================================
 * 12. Footer 页脚
 * ========================================================= */
.site-footer {
    margin-top: 56px;
    background: #1e293b;
    color: #cbd5e1;
    font-size: 14px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0 32px;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.footer-logo .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
}

.footer-desc {
    line-height: 1.75;
    color: #94a3b8;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

.footer-bottom .stat-code {
    opacity: .7;
}

/* =========================================================
 * 13. 响应式断点
 * ========================================================= */

/* 大屏以下 / 平板 */
@media (max-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(4, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .search-form {
        max-width: 340px;
    }
}

/* 平板 / 大屏手机 */
@media (max-width: 768px) {
    :root {
        --header-h: 64px;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 36px 0;
    }

    .grid-5,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* 顶部导航折叠为汉堡 */
    .top-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .site-header.open .top-nav {
        display: flex;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 16px;
        background: #fff;
        border-bottom: 1px solid var(--c-border);
        box-shadow: var(--shadow);
    }

    .site-header.open .top-nav a {
        padding: 12px 14px;
    }

    .search-form {
        max-width: none;
    }

    .search-form input {
        font-size: 13px;
        padding: 0 12px;
    }

    .search-form button {
        padding: 0 16px;
        font-size: 13px;
    }

    .hero {
        padding: 56px 0 64px;
        min-height: 280px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-search {
        height: 50px;
    }

    .hero-search button {
        height: 42px;
        padding: 0 20px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-item strong {
        font-size: 22px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 36px 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .detail-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 手机小屏 */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .header-inner {
        gap: 10px;
    }

    .logo-text {
        display: none;
    }

    .grid-5,
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 48px 0 56px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-search {
        height: 46px;
        padding: 3px;
    }

    .hero-search button {
        height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-item strong {
        font-size: 20px;
    }

    .stat-item span {
        font-size: 12px;
    }

    .category-card,
    .site-card,
    .detail-card,
    .panel {
        padding: 18px;
    }

    .detail-favicon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .detail-title {
        font-size: 20px;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}
