:root {
    --bg: #f5efe4;
    --bg-strong: #efe2c5;
    --ink: #1f2937;
    --muted: #6b7280;
    --panel: rgba(255, 252, 246, 0.92);
    --line: rgba(148, 163, 184, 0.26);
    --brand: #0f766e;
    --brand-2: #c2410c;
    --shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 0% 0%, rgba(15, 118, 110, 0.16), transparent 26%),
        radial-gradient(circle at 100% 0%, rgba(194, 65, 12, 0.18), transparent 24%),
        linear-gradient(180deg, #fffaf1 0%, var(--bg) 58%, var(--bg-strong) 100%);
}

.directory-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 40px;
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    align-items: stretch;
}

.hero-copy,
.meta-card,
.panel,
.site-card {
    backdrop-filter: blur(12px);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-copy {
    border-radius: 30px;
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -40px;
    top: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194, 65, 12, 0.2), transparent 70%);
}

.hero-kicker {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-subtitle {
    margin: 0;
    max-width: 700px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.hero-meta {
    display: grid;
    gap: 18px;
}

.meta-card {
    border-radius: 26px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 146px;
}

.meta-label {
    color: var(--muted);
    font-size: 13px;
}

.meta-card strong {
    margin-top: 10px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.panel {
    margin-top: 20px;
    border-radius: 28px;
    padding: 24px;
}

.toolbar-row {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 16px;
}

.search-box,
.filter-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box span,
.filter-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 18px;
    padding: 14px 16px;
    font: inherit;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.state-box {
    padding: 24px;
    border-radius: 22px;
    font-size: 15px;
    border: 1px dashed rgba(148, 163, 184, 0.48);
}

.state-loading {
    background: rgba(255, 255, 255, 0.7);
}

.state-error {
    background: #fff1f2;
    color: #9f1239;
}

.state-warning {
    background: #fff7ed;
    color: #9a3412;
}

.state-empty {
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
}

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

.site-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-height: 224px;
    padding: 22px;
    border-radius: 24px;
}

.site-card-disabled {
    opacity: 0.72;
}

.site-card-head {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 14px;
    align-items: flex-start;
}

.site-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(194, 65, 12, 0.12));
    font-size: 28px;
    font-weight: 800;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.site-copy h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.site-copy p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.site-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.site-badge,
.site-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.site-badge {
    background: rgba(194, 65, 12, 0.12);
    color: var(--brand-2);
}

.site-category {
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand);
}

.site-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #0ea5a4);
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
    border: 0;
    cursor: pointer;
}

.disabled-link {
    color: var(--muted);
    background: rgba(226, 232, 240, 0.9);
    box-shadow: none;
}

@media (max-width: 900px) {
    .hero,
    .toolbar-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .directory-shell {
        width: min(100% - 20px, 100%);
        margin-top: 12px;
    }

    .hero-copy,
    .meta-card,
    .panel {
        border-radius: 22px;
        padding: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .site-card {
        padding: 18px;
        border-radius: 20px;
    }
}
