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

:root {
    --page-bg: #eef2f0;
    --surface: #fdfefd;
    --surface-soft: #f6f8f7;
    --border: rgba(63, 96, 90, 0.15);
    --muted: #5f6d6a;
    --text: #0f1e1f;
    --accent-primary: #4f8e8f;
    --accent-secondary: #f2c791;
}

body {
    font-family: "LXGW WenKai Screen", "LXGW WenKai", "LXGW WenKai TC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
    padding: 2.5rem;
    display: flex;
    justify-content: center;
}

main {
    width: 100%;
    max-width: 1100px;
    background: var(--surface);
    border-radius: 40px;
    border: 1px solid var(--border);
    padding: 3rem;
    box-shadow: 0 40px 90px rgba(61, 89, 84, 0.12);
}

.nav-hero {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.nav-hero__text {
    flex: 1 1 360px;
}

.eyebrow {
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.nav-hero__text h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 0.75rem;
}

.nav-hero__text p {
    color: var(--muted);
    line-height: 1.6;
    max-width: 520px;
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pill {
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill.primary {
    background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 16px 35px rgba(79, 93, 255, 0.25);
}

.pill.ghost {
    color: var(--muted);
    border-color: rgba(63, 96, 90, 0.2);
    background: transparent;
}

.pill:hover {
    transform: translateY(-2px);
}

.nav-hero__stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.nav-hero__stats .stat {
    min-width: 150px;
    padding: 1rem 1.2rem;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    text-align: center;
}

.nav-hero__stats .stat span {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-hero__stats .stat p {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#filter-input {
    flex: 1 1 260px;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #f9f9fb;
    font-size: 0.95rem;
}

#filter-clear {
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
}

.category-card {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 32px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.category-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.category-kicker {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.category-header p {
    color: var(--muted);
}

.category-chip {
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.site-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.2rem;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.12);
}

.site-item.is-hidden {
    display: none;
}

.site-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-icon img {
    width: 22px;
    height: 22px;
}

.site-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.site-title-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.site-title-row h3 {
    font-size: 1.05rem;
}

.site-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.site-tags span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--surface-soft);
}

.site-body p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.site-link {
    margin-top: auto;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.empty-state {
    display: none;
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--muted);
    background: #fbfbfd;
    margin-bottom: 1.5rem;
}

.empty-state.visible {
    display: block;
}

.nav-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        padding: 1.5rem;
    }

    main {
        padding: 2rem;
        border-radius: 28px;
    }

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