/* =========================================================
   小王的小站 · 首页
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body.xw-home {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(900px 500px at 8% -6%, rgba(255, 224, 205, .55), transparent 65%),
        radial-gradient(800px 480px at 100% 8%, rgba(228, 233, 255, .6), transparent 62%),
        var(--xw-paper);
    color: var(--xw-ink);
    font-family: var(--xw-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.xw-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 8px;
}

/* ---------- 首屏 ---------- */
.xw-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr);
    gap: 46px;
    align-items: center;
    margin: 28px 0 0;
    padding: 58px 54px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 32px;
    background: linear-gradient(135deg, #fff3e9 0%, #ffe8ee 48%, #ecefff 100%);
    box-shadow: 0 30px 80px rgba(97, 63, 47, .1);
}

.xw-hero::before {
    content: "";
    position: absolute;
    top: -130px;
    right: -70px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 146, 112, .38), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
}

.xw-hero::after {
    content: "";
    position: absolute;
    bottom: -160px;
    left: 18%;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 148, 255, .24), transparent 68%);
    filter: blur(10px);
    pointer-events: none;
}

.xw-hero-copy,
.xw-hero-side {
    position: relative;
    z-index: 1;
}

.xw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid rgba(31, 35, 45, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    color: #7a5a4b;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.xw-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--xw-brand);
    box-shadow: 0 0 0 3px rgba(255, 107, 87, .16);
}

.xw-hero h1 {
    margin: 22px 0 0;
    color: var(--xw-ink);
    font-size: clamp(42px, 5.6vw, 64px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 2px;
}

.xw-hero h1 .xw-hero-dot {
    color: var(--xw-brand);
}

.xw-hero-lead {
    max-width: 520px;
    margin: 18px 0 0;
    color: #5c5a63;
    font-size: 15.5px;
    line-height: 1.9;
}

.xw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 30px;
}

.xw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.xw-btn-primary {
    background: var(--xw-ink);
    color: #fff;
    box-shadow: 0 14px 30px rgba(31, 35, 45, .18);
}

.xw-btn-primary:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(31, 35, 45, .24);
}

.xw-btn-primary span {
    transition: transform .2s ease;
}

.xw-btn-primary:hover span {
    transform: translateX(3px);
}

.xw-btn-ghost {
    border-color: rgba(31, 35, 45, .14);
    background: rgba(255, 255, 255, .5);
    color: var(--xw-ink);
}

.xw-btn-ghost:hover {
    background: #fff;
    color: var(--xw-ink);
    transform: translateY(-2px);
}

.xw-hero-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    color: #7b7f8b;
    font-size: 12.5px;
}

.xw-hero-stats b {
    margin-right: 2px;
    color: var(--xw-ink);
    font-size: 16px;
    font-weight: 800;
}

.xw-hero-stats i {
    width: 4px;
    height: 4px;
    margin: 0 4px;
    border-radius: 50%;
    background: #c9c4bd;
}

/* 首屏右侧推荐卡 */
.xw-hero-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    transform: translateY(6px);
}

.xw-hero-note {
    position: relative;
    padding: 26px 24px 24px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 22px 50px rgba(103, 61, 78, .16);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transform: rotate(1.6deg);
}

.xw-hero-note-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--xw-brand);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.xw-hero-note-kicker::before {
    content: "";
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--xw-brand);
}

.xw-hero-note-icon {
    width: 54px;
    height: 54px;
    margin: 15px 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: linear-gradient(135deg, #ff9a62, #ff5d8f);
    box-shadow: 0 10px 22px rgba(255, 93, 143, .3);
    color: #fff;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
}

.xw-hero-note h2 {
    margin: 0 0 8px;
    color: var(--xw-ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
}

.xw-hero-note p {
    margin: 0 0 16px;
    color: #6c6a74;
    font-size: 12.5px;
    line-height: 1.75;
}

.xw-hero-note a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--xw-ink);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(31, 35, 45, .25);
    padding-bottom: 2px;
}

.xw-hero-note a:hover {
    color: var(--xw-brand);
    border-color: var(--xw-brand);
}

.xw-hero-sticker {
    align-self: flex-end;
    margin-right: 6px;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(31, 35, 45, .9);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    transform: rotate(-2deg);
    box-shadow: 0 10px 24px rgba(31, 35, 45, .16);
}

/* ---------- 测评列表 ---------- */
.xw-section {
    margin-top: 68px;
    scroll-margin-top: 90px;
}

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

.xw-kicker {
    margin: 0 0 8px;
    color: var(--xw-brand);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.xw-section-title {
    margin: 0;
    color: var(--xw-ink);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: .5px;
}

.xw-section-sub {
    margin: 0 0 3px;
    color: var(--xw-faint);
    font-size: 12.5px;
    white-space: nowrap;
}

.xw-filters {
    display: flex;
    gap: 8px;
    margin: 0 0 28px;
    padding: 3px 0 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.xw-filters::-webkit-scrollbar {
    display: none;
}

.xw-filter {
    flex: none;
    padding: 9px 16px;
    border: 1px solid var(--xw-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #5b6272;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.xw-filter:hover {
    border-color: rgba(31, 35, 45, .2);
    color: var(--xw-ink);
}

.xw-filter[aria-pressed="true"] {
    border-color: var(--xw-ink);
    background: var(--xw-ink);
    color: #fff;
    box-shadow: 0 9px 20px rgba(31, 35, 45, .16);
}

.xw-filter .xw-filter-count {
    margin-left: 3px;
    opacity: .55;
    font-weight: 500;
}

.xw-cat {
    scroll-margin-top: 90px;
}

.xw-cat + .xw-cat {
    margin-top: 44px;
}

.xw-cat[hidden] {
    display: none !important;
}

.xw-cat-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.xw-cat-title {
    margin: 0;
    color: var(--xw-ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .3px;
    white-space: nowrap;
}

.xw-cat-count {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(31, 35, 45, .06);
    color: #7c8291;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.xw-cat-line {
    flex: 1;
    height: 1px;
    background: var(--xw-line);
}

.xw-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
    gap: 15px;
}

/* 测评卡片 */
.xw-test-card {
    --tint: #eef2f8;
    --accent: #5f6b84;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 214px;
    padding: 22px 22px 18px;
    border: 1px solid rgba(31, 35, 45, .07);
    border-radius: 21px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 3px 12px rgba(50, 42, 35, .035);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.xw-test-card::after {
    content: "";
    position: absolute;
    top: -46px;
    right: -46px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: var(--tint);
    opacity: .9;
    pointer-events: none;
    transition: transform .3s ease;
}

.xw-test-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 87, .3);
    box-shadow: 0 20px 44px rgba(55, 42, 34, .1);
    color: inherit;
}

.xw-test-card:hover::after {
    transform: scale(1.12);
}

.xw-test-card:focus-visible {
    outline: 3px solid rgba(255, 107, 87, .4);
    outline-offset: 2px;
}

.xw-test-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
}

.xw-test-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--tint);
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1;
}

.xw-test-no {
    color: #b3b7c2;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1px;
}

.xw-test-name {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: var(--xw-ink);
    font-size: 17.5px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .2px;
}

.xw-test-desc {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 45px;
    margin: 0 0 16px;
    color: var(--xw-muted);
    font-size: 13px;
    line-height: 1.72;
}

.xw-test-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--xw-line);
}

.xw-test-meta {
    color: #9aa0ae;
    font-size: 11.5px;
}

.xw-test-go {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f6f4f1;
    color: var(--xw-ink);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.xw-test-go i {
    font-style: normal;
    transition: transform .2s ease;
}

.xw-test-card:hover .xw-test-go {
    background: var(--xw-ink);
    color: #fff;
}

.xw-test-card:hover .xw-test-go i {
    transform: translateX(2px);
}

/* 分类主题色 */
.xw-cat[data-cat="mind"] .xw-test-card {
    --tint: #eaf1ff;
    --accent: #4f7dff;
}

.xw-cat[data-cat="love"] .xw-test-card {
    --tint: #ffe9f0;
    --accent: #ff5d8f;
}

.xw-cat[data-cat="intimate"] .xw-test-card {
    --tint: #f1e9ff;
    --accent: #8b5cf6;
}

.xw-cat[data-cat="persona"] .xw-test-card {
    --tint: #e6f8f1;
    --accent: #10b981;
}

/* ---------- 关于本站 ---------- */
.xw-about {
    margin-top: 72px;
    scroll-margin-top: 90px;
}

.xw-about-card {
    position: relative;
    padding: 48px 52px 42px;
    overflow: hidden;
    border-radius: 32px;
    background: #1f232d;
    color: #f6f3ee;
    box-shadow: 0 28px 70px rgba(31, 35, 45, .18);
}

.xw-about-card::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 87, .3), transparent 66%);
    pointer-events: none;
}

.xw-about-card::after {
    content: "小";
    position: absolute;
    right: -8px;
    bottom: -88px;
    color: rgba(255, 255, 255, .045);
    font-size: 260px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.xw-about-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.xw-about .xw-kicker {
    color: #ff9d8b;
}

.xw-about-title {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 900;
    letter-spacing: 1px;
}

.xw-about-lead {
    margin: 0;
    color: rgba(255, 255, 255, .7);
    font-size: 14.5px;
    line-height: 2;
}

.xw-about-lead + .xw-about-lead {
    margin-top: 10px;
}

.xw-about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 30px;
}

.xw-about-item {
    padding: 19px 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .055);
}

.xw-about-item strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
}

.xw-about-item span {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
    line-height: 1.75;
}

.xw-about-filing {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, .42);
    font-size: 12px;
}

.xw-about-filing a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.xw-about-filing a:hover {
    color: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .xw-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        padding: 48px 42px;
    }

    .xw-hero-side {
        display: none;
    }

    .xw-hero-lead {
        max-width: 600px;
    }
}

@media (max-width: 760px) {
    .xw-main {
        padding: 0 16px 4px;
    }

    .xw-hero {
        margin-top: 16px;
        padding: 38px 26px 34px;
        border-radius: 26px;
    }

    .xw-hero h1 {
        margin-top: 18px;
        font-size: clamp(38px, 11vw, 50px);
        letter-spacing: 1px;
    }

    .xw-hero-lead {
        margin-top: 14px;
        font-size: 14px;
        line-height: 1.85;
    }

    .xw-hero-actions {
        margin-top: 24px;
    }

    .xw-btn {
        padding: 12px 21px;
        font-size: 13.5px;
    }

    .xw-hero-stats {
        margin-top: 24px;
        gap: 7px;
        font-size: 11.5px;
    }

    .xw-hero-stats b {
        font-size: 14px;
    }

    .xw-section {
        margin-top: 50px;
    }

    .xw-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 18px;
    }

    .xw-section-title {
        font-size: 23px;
    }

    .xw-filters {
        flex-wrap: wrap;
        overflow: visible;
        margin-bottom: 24px;
    }

    .xw-filter {
        padding: 8px 13px;
        font-size: 12.5px;
    }

    .xw-cat + .xw-cat {
        margin-top: 34px;
    }

    .xw-test-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .xw-test-card {
        min-height: 0;
        padding: 20px 19px 16px;
        border-radius: 19px;
    }

    .xw-test-name {
        font-size: 16.5px;
    }

    .xw-about {
        margin-top: 52px;
    }

    .xw-about-card {
        padding: 34px 24px 30px;
        border-radius: 26px;
    }

    .xw-about-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 24px;
    }

    .xw-about-lead {
        font-size: 13.5px;
        line-height: 1.9;
    }

    .xw-about-card::after {
        font-size: 190px;
        bottom: -62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .xw-test-card,
    .xw-test-card::after,
    .xw-btn,
    .xw-test-go,
    .xw-test-go i {
        transition: none !important;
    }
}
