/* =========================================================
   小王的小站 · 全站公共外观
   仅使用 .xw- 前缀，避免与各测评页原有样式冲突
   ========================================================= */

:root {
    --xw-ink: #1f232d;
    --xw-ink-soft: #3c4352;
    --xw-muted: #697083;
    --xw-faint: #9aa0ae;
    --xw-line: rgba(31, 35, 45, .09);
    --xw-paper: #f7f5f2;
    --xw-brand: #ff6b57;
    --xw-pink: #ff5d8f;
    --xw-header-h: 66px;
    --xw-font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- 站点抬头 ---------- */
.xw-header {
    position: relative;
    z-index: 80;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--xw-line);
    font-family: var(--xw-font);
}

body.xw-home .xw-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
}

.xw-header-inner {
    max-width: 1120px;
    height: var(--xw-header-h);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.xw-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--xw-ink);
    text-decoration: none;
}

.xw-brand:hover {
    color: var(--xw-ink);
}

.xw-logo {
    width: 38px;
    height: 38px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9a62 0%, #ff5d8f 100%);
    box-shadow: 0 7px 18px rgba(255, 93, 143, .28);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.xw-brand-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.1;
}

.xw-brand-name strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .6px;
    white-space: nowrap;
}

.xw-brand-name em {
    font-style: normal;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.7px;
    color: #a2a7b3;
    text-transform: uppercase;
    white-space: nowrap;
}

.xw-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.xw-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border-radius: 999px;
    color: #4e5565;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.xw-nav a:hover {
    background: #f3efe9;
    color: var(--xw-ink);
}

.xw-nav a.xw-nav-cta {
    background: var(--xw-ink);
    color: #fff;
    padding: 9px 16px;
    box-shadow: 0 8px 18px rgba(31, 35, 45, .14);
}

.xw-nav a.xw-nav-cta:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- 站点页脚 ---------- */
.xw-footer {
    margin-top: 60px;
    border-top: 1px solid var(--xw-line);
    background: rgba(255, 255, 255, .74);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-family: var(--xw-font);
}

.xw-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 24px 28px;
    text-align: center;
    color: var(--xw-muted);
}

.xw-footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.xw-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--xw-ink);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    text-decoration: none;
}

.xw-footer-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a62, #ff5d8f);
    box-shadow: 0 0 0 4px rgba(255, 107, 87, .12);
}

.xw-footer-tag {
    color: var(--xw-faint);
    font-size: 12.5px;
}

.xw-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 14px;
}

.xw-footer-links a {
    color: #626a7b;
    font-size: 12.5px;
    text-decoration: none;
    transition: color .2s ease;
}

.xw-footer-links a:hover {
    color: var(--xw-brand);
}

.xw-footer-note {
    margin: 0 0 8px;
    color: var(--xw-faint);
    font-size: 12px;
    line-height: 1.7;
}

.xw-footer-copy {
    margin: 0;
    color: #b1b5bf;
    font-size: 11.5px;
    letter-spacing: .3px;
}

/* ---------- 欢迎弹窗 ---------- */
.xw-welcome {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(25, 22, 28, .46);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    font-family: var(--xw-font);
}

.xw-welcome.is-open {
    opacity: 1;
    visibility: visible;
}

.xw-welcome[hidden] {
    display: none;
}

.xw-welcome-card {
    position: relative;
    width: min(420px, 100%);
    padding: 36px 30px 26px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(35, 20, 30, .32);
    text-align: center;
    transform: translateY(16px) scale(.97);
    transition: transform .32s cubic-bezier(.2, .8, .25, 1);
}

.xw-welcome.is-open .xw-welcome-card {
    transform: translateY(0) scale(1);
}

.xw-welcome-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f5f3f0;
    color: #8b90a0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.xw-welcome-close:hover {
    background: #efeae4;
    color: var(--xw-ink);
}

.xw-welcome-logo {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 21px;
    background: linear-gradient(135deg, #ff9a62 0%, #ff5d8f 100%);
    box-shadow: 0 14px 30px rgba(255, 93, 143, .3);
    color: #fff;
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
}

.xw-welcome h2 {
    margin: 0 0 12px;
    color: var(--xw-ink);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .5px;
}

.xw-welcome p {
    margin: 0 0 24px;
    color: var(--xw-muted);
    font-size: 14px;
    line-height: 1.85;
}

.xw-welcome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 170px;
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--xw-ink);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(31, 35, 45, .2);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.xw-welcome-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(31, 35, 45, .26);
}

.xw-welcome-note {
    margin: 18px 0 0;
    color: #a5aab6;
    font-size: 11.5px;
    line-height: 1.7;
}

/* ---------- 手机端 ---------- */
@media (max-width: 640px) {
    .xw-header-inner {
        height: 60px;
        padding: 0 16px;
        gap: 10px;
    }

    .xw-logo {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 17px;
    }

    .xw-brand {
        gap: 9px;
    }

    .xw-brand-name strong {
        font-size: 16px;
    }

    .xw-brand-name em {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .xw-nav {
        gap: 2px;
    }

    .xw-nav a {
        padding: 7px 9px;
        font-size: 12px;
    }

    .xw-nav a.xw-nav-cta {
        padding: 8px 11px;
    }

    .xw-footer {
        margin-top: 44px;
    }

    .xw-footer-inner {
        padding: 24px 18px 22px;
    }

    .xw-footer-links {
        gap: 6px 13px;
    }

    .xw-welcome-card {
        padding: 32px 22px 22px;
        border-radius: 22px;
    }

    .xw-welcome h2 {
        font-size: 21px;
    }

    .xw-welcome p {
        font-size: 13.5px;
    }

    .xw-welcome-logo {
        width: 58px;
        height: 58px;
        font-size: 27px;
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .xw-nav a[href="index.html"] {
        display: none;
    }

    .xw-brand-name em {
        display: none;
    }

    .xw-header-inner {
        padding: 0 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xw-welcome,
    .xw-welcome-card,
    .xw-nav a,
    .xw-welcome-btn {
        transition: none !important;
    }
}
