:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #fff8e8;
    --text: #202124;
    --muted: #667085;
    --line: #e5e7ef;
    --accent: #ff4f6d;
    --accent-2: #ffb000;
    --blue: #3f7cff;
    --green: #16a66a;
    --shadow: 0 12px 30px rgba(33, 45, 70, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background:
        linear-gradient(135deg, rgba(255, 79, 109, .12), transparent 28rem),
        linear-gradient(220deg, rgba(63, 124, 255, .14), transparent 26rem),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar,
.category-nav,
main,
.footer {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 900;
    box-shadow: var(--shadow);
}

.brand strong,
.brand em {
    display: block;
}

.brand strong {
    font-size: 24px;
}

.brand em {
    font-style: normal;
    color: var(--muted);
    font-size: 13px;
}

.search {
    display: flex;
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 13px 14px;
    font-size: 15px;
}

.search button,
.button {
    border: 0;
    background: linear-gradient(135deg, var(--accent), #ff7a3d);
    color: #fff;
    padding: 12px 16px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.search button {
    border-radius: 0;
}

.button-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
}

.category-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 18px;
}

.category-nav a {
    white-space: nowrap;
    padding: 10px 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #364152;
    box-shadow: 0 6px 18px rgba(33, 45, 70, .06);
}

.category-nav a:nth-child(3n+1) {
    border-top: 3px solid var(--accent);
}

.category-nav a:nth-child(3n+2) {
    border-top: 3px solid var(--blue);
}

.category-nav a:nth-child(3n) {
    border-top: 3px solid var(--accent-2);
}

.category-nav a[aria-current="page"],
.category-nav a:hover {
    color: #fff;
    background: #222b45;
}

main {
    padding-bottom: 48px;
}

.hero {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
    gap: 28px;
    align-items: center;
    border-radius: 8px;
    padding: 42px;
    background:
        linear-gradient(135deg, rgba(255, 79, 109, .92), rgba(255, 176, 0, .86)),
        #ff6a88;
    color: #fff;
    box-shadow: var(--shadow);
}

.hero h1,
.page-header h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: 0;
}

.hero p {
    color: rgba(255, 255, 255, .92);
}

.page-header p,
.section-head p {
    color: var(--muted);
}

.eyebrow {
    color: #fff !important;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 10px;
}

.page-header .eyebrow {
    color: var(--accent) !important;
}

.hero-actions,
.card-actions,
.age-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero .button {
    background: #222b45;
}

.hero .button-secondary {
    background: rgba(255, 255, 255, .94);
    color: #222b45;
    border: 0;
}

.hero-panel,
.site-card,
.category-card,
.content-block,
.facts,
.empty {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 24px;
    color: var(--text);
}

.hero-panel ul {
    margin: 12px 0 0;
    padding-left: 19px;
    color: var(--muted);
}

.section {
    margin-top: 42px;
}

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

.section-head h2,
.content-block h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.section-head p {
    max-width: 680px;
    margin: 0;
}

.category-grid,
.site-grid,
.stats-grid,
.guide-grid {
    display: grid;
    gap: 14px;
}

.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.all-sites {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stats-grid strong {
    display: block;
    font-size: 32px;
    line-height: 1;
    color: var(--accent);
}

.stats-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

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

.category-card,
.site-card,
.content-block,
.facts,
.empty {
    padding: 18px;
}

.category-card {
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--blue));
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.category-card span,
.site-card p,
.content-block p,
.facts dt {
    color: var(--muted);
}

.site-card {
    display: flex;
    flex-direction: column;
    min-height: 268px;
    border-top: 4px solid var(--accent);
}

.site-card:nth-child(4n+2) {
    border-top-color: var(--blue);
}

.site-card:nth-child(4n+3) {
    border-top-color: var(--accent-2);
}

.site-card:nth-child(4n) {
    border-top-color: var(--green);
}

.site-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.site-card h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
}

.rating {
    color: #111;
    background: #ffe08a;
    border-radius: 8px;
    padding: 2px 8px;
    font-weight: 900;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.tags span {
    border: 1px solid #ffd6df;
    background: #fff5f7;
    color: #9f1239;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 13px;
}

.meta-grid,
.facts dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.meta-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: auto;
}

.meta-grid div,
.facts dl div {
    background: #f7f8fc;
    border-radius: 8px;
    padding: 8px;
}

dt,
dd {
    margin: 0;
}

.meta-grid dt,
.facts dt {
    font-size: 12px;
}

.meta-grid dd,
.facts dd {
    font-weight: 800;
}

.page-header {
    padding: 42px 0 28px;
    max-width: 860px;
}

.breadcrumbs {
    padding-top: 24px;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--blue);
}

.detail-header {
    padding: 34px 0;
    max-width: 900px;
}

.detail-header h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    margin: 0;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr);
    gap: 18px;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 42px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer p {
    max-width: 760px;
}

.footer nav {
    display: flex;
    gap: 12px;
}

.faq-list h2 {
    margin: 0 0 14px;
}

.faq-list details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 800;
}

.faq-list p {
    color: var(--muted);
}

.age-gate {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    background: rgba(25, 31, 48, .72);
    padding: 20px;
}

.age-gate[hidden] {
    display: none;
}

.age-box {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.age-box h2 {
    margin-top: 0;
}

.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;
}

code {
    background: #eef2ff;
    padding: 2px 6px;
    border-radius: 6px;
}

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

@media (max-width: 920px) {
    .topbar,
    .hero,
    .section-head,
    .detail-grid,
    .footer {
        display: block;
    }

    .search {
        margin-top: 16px;
        width: 100%;
    }

    .hero {
        padding: 28px;
    }

    .hero-panel,
    .facts {
        margin-top: 18px;
    }

    .category-grid,
    .site-grid,
    .all-sites,
    .stats-grid,
    .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .topbar,
    .category-nav,
    main,
    .footer {
        width: min(100% - 22px, 1220px);
    }

    .category-grid,
    .site-grid,
    .all-sites,
    .stats-grid,
    .guide-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 22px;
    }

    .hero h1,
    .page-header h1 {
        font-size: 36px;
    }
}
