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

:root {
    --deep-blue: #0a1628;
    --star-purple: #7c5cff;
    --ocean-blue: #2d9cff;
    --light-silver: #b2bec3;
    --gold: #ffd166;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* B4: 统一配色 token */
    --primary: #7c5cff;
    --primary-2: #00e0d3;
    --secondary: #e84393;
    --secondary-2: #fd79a8;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #74b9ff;
    --bg-dark: #070b1a;
    --bg-darker: #120a2e;
    --bg-mid: #0a1f4a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-faint: rgba(255, 255, 255, 0.4);
    --gradient-primary: linear-gradient(135deg, #7c5cff 0%, #00e0d3 100%);
    --gradient-secondary: linear-gradient(135deg, #e84393 0%, #fd79a8 100%);
    --gradient-warning: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    --gradient-success: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    --gradient-danger: linear-gradient(135deg, #d63031 0%, #e84393 100%);
    --gradient-bg: linear-gradient(-45deg, #070b1a, #120a2e, #0a1f4a, #1a0a3e, #0d1b3a);

    /* ===== 深色星空精致升级：阴影 / 圆角 / 光晕 / 强调色 ===== */
    --accent-pink: #ff5fa2;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    --glow-primary: 0 0 40px rgba(124, 92, 255, 0.35);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* 答题页静态背景色（亮色可覆盖） */
    --bg-quiz-1: #0d1430;
    --bg-quiz-2: #12182f;

    /* 玻璃表面交互色调 */
    --surface-1: rgba(255, 255, 255, 0.08);
    --surface-2: rgba(255, 255, 255, 0.15);
    --surface-border: rgba(255, 255, 255, 0.2);

    /* 模态遮罩 */
    --modal-overlay-bg: rgba(0, 0, 0, 0.7);

    /* loading 屏背景 */
    --loading-bg: linear-gradient(-45deg, #0a1628, #1a0a3e, #0a1628);

    /* ===== P2-10: z-index 体系（从低到高，跨组件统一） =====
       - base:        普通内容流（卡片内/同级元素）
       - raised:      卡片浮起 / 视差前景
       - dropdown:    下拉菜单 / popover
       - sticky:      吸顶栏 / 固定按钮
       - particles:   装饰粒子 / 星空 / 烟花（pointer-events:none）
       - loading:     全屏 loading 屏
       - modal:       模态遮罩（gModal / .modal-overlay）
       - flash:       全屏闪白等短暂覆盖
       - toast:       toast 提示（永远最上层，确保可见）
    */
    --z-base: 1;
    --z-raised: 5;
    --z-dropdown: 50;
    --z-sticky: 100;
    --z-particles: 9000;
    --z-loading: 9500;
    --z-modal: 100000;
    --z-flash: 100100;
    --z-toast: 100200;
}

/* ===== H3: 亮色主题覆盖 ===== */
[data-theme="light"] {
    --deep-blue: #f4f6fb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);

    --bg-dark: #f4f6fb;
    --bg-darker: #e8ecf5;
    --bg-mid: #dde3ef;
    --text-primary: #1a1f36;
    --text-secondary: rgba(26, 31, 54, 0.85);
    --text-muted: rgba(26, 31, 54, 0.7);
    --text-faint: rgba(26, 31, 54, 0.5);

    --gradient-bg: linear-gradient(-45deg, #e0e7ff, #f3e8ff, #ffe4f0, #dbeafe, #fef3c7);

    /* 答题页静态背景色（亮色） */
    --bg-quiz-1: #e8ecf5;
    --bg-quiz-2: #f4f6fb;

    /* 玻璃表面交互色调（亮色加深，保证对比度） */
    --surface-1: rgba(0, 0, 0, 0.05);
    --surface-2: rgba(0, 0, 0, 0.1);
    --surface-border: rgba(0, 0, 0, 0.15);

    /* 模态遮罩（亮色稍浅） */
    --modal-overlay-bg: rgba(60, 70, 100, 0.55);

    /* loading 屏背景（亮色） */
    --loading-bg: linear-gradient(-45deg, #e0e7ff, #f3e8ff, #dbeafe);
}
[data-theme="light"] body { color: rgba(26, 31, 54, 0.9); }
[data-theme="light"] .glass-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .glass-card * { color: inherit; }
[data-theme="light"] .intro-text,
[data-theme="light"] .section-content,
[data-theme="light"] .home-subtitle { color: var(--text-secondary) !important; }
[data-theme="light"] .home-title,
[data-theme="light"] .result-type,
[data-theme="light"] .section-title,
[data-theme="light"] .result-name { color: var(--text-primary) !important; }
[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
}
[data-theme="light"] .scale-btn {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
}
[data-theme="light"] .scale-btn.selected {
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(0,210,211,0.15)) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .lang-toggle,
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
}
[data-theme="light"] .heart-quote-text { color: rgba(255, 215, 0, 0.95) !important; }
[data-theme="light"] .dim-bar { background: rgba(0, 0, 0, 0.08) !important; }
[data-theme="light"] .anchor-chip {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--text-primary) !important;
}

/* 主题切换按钮 */
.theme-toggle {
    position: absolute;
    top: 16px;
    right: 64px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1em;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.1); }
body.theme-transition,
body.theme-transition * {
    transition: background-color 0.4s, color 0.3s, border-color 0.3s, box-shadow 0.3s !important;
}

/* 1. 动态渐变背景 */
html, body {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: auto;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--gradient-bg);
    background-size: 400% 400%;
    animation: gradientShift 60s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: rgba(255, 255, 255, 0.9);
}

/* 第三批-1：低端设备性能降级 —— 静态背景，关闭动画 */
body.low-perf {
    animation: none !important;
    background-size: 100% 100% !important;
}
body.low-perf .noise-overlay::after {
    animation: none !important;
    display: none;
}
body.low-perf .screen {
    animation: none !important;
}

/* 答题时锁死静态背景，不再晃眼 */
body.is-in-quiz {
    background: linear-gradient(135deg, var(--bg-quiz-1) 0%, var(--bg-quiz-2) 100%) !important;
    background-size: 100% 100% !important;
    animation: none !important;
}

/* P6-E: 切后台时暂停动画，节省资源 */
body.page-hidden * {
    animation-play-state: paused !important;
    transition: none !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* 2. 浮动粒子 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 92, 255, 0.20) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(45, 156, 255, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(0, 224, 211, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 50% 95%, rgba(255, 95, 162, 0.06) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
    animation: bgOrbFloat 20s ease-in-out infinite alternate;
}

@keyframes bgOrbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2%, 3%) scale(1.05); }
    100% { transform: translate(2%, -2%) scale(1.02); }
}

/* P6-A: 背景视差层 —— 随滚动/倾斜微动的光晕 */
.bg-parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.bg-parallax-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
    transition: transform 0.3s ease-out;
}
.bg-parallax-orb.orb1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108,92,231,0.25) 0%, transparent 70%);
    top: -150px;
    left: -100px;
}
.bg-parallax-orb.orb2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,210,211,0.15) 0%, transparent 70%);
    bottom: -200px;
    right: -150px;
}
.bg-parallax-orb.orb3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(253,203,110,0.08) 0%, transparent 70%);
    top: 40%;
    left: 50%;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    will-change: opacity;
}

.noise-overlay::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    box-shadow:
        5vw 85vh 0 1px rgba(255,255,255,0.5),
        15vw 72vh 0 0 rgba(108,92,231,0.5),
        25vw 55vh 0 1px rgba(9,132,227,0.5),
        35vw 40vh 0 0 rgba(255,255,255,0.4),
        45vw 88vh 0 1px rgba(108,92,231,0.4),
        55vw 65vh 0 0 rgba(255,255,255,0.5),
        65vw 42vh 0 1px rgba(9,132,227,0.4),
        75vw 73vh 0 0 rgba(255,255,255,0.3),
        85vw 85vh 0 1px rgba(108,92,231,0.5),
        95vw 30vh 0 0 rgba(255,255,255,0.4),
        10vw 15vh 0 1px rgba(255,255,255,0.4),
        30vw 10vh 0 0 rgba(9,132,227,0.4),
        50vw 8vh 0 1px rgba(255,255,255,0.5),
        70vw 12vh 0 0 rgba(108,92,231,0.5),
        90vw 5vh 0 1px rgba(255,255,255,0.3);
    animation: particleFloat 25s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100vh); }
}

/* 17. 自定义滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(10, 22, 40, 0.5); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--star-purple), var(--ocean-blue)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #7d6ff0, #1e9fff); }
* { scrollbar-width: thin; scrollbar-color: var(--star-purple) rgba(10, 22, 40, 0.5); }

/* P7-B: 尊重用户动画偏好 —— 全局 prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* P7-A: 焦点状态规范 —— 使用 :focus-visible，提供清晰的焦点反馈 */
*:focus-visible {
    outline: 2px solid var(--star-purple);
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--star-purple);
    outline-offset: 2px;
}

/* P7-C: 触摸优化 —— 防止双击缩放延迟 */
.btn-primary,
.btn-secondary,
.scale-btn,
.option-btn,
.test-tab,
.theme-toggle,
.lang-toggle {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(108, 92, 231, 0.3);
}

/* P7-A: 语义化点击元素 —— 确保 div 可点击元素有正确的 ARIA */
[role="button"] {
    cursor: pointer;
    user-select: none;
}
[role="button"]:hover {
    opacity: 0.9;
}
[role="button"]:active {
    transform: scale(0.98);
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* 手机端:让容器占满,去除多余留白造成的"框中框"感 */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        padding: 16px 12px 24px;
    }
}

.screen {
    display: none;
    animation: screenTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    contain: layout style;
}

.screen.active {
    display: block;
}

@keyframes screenTransition {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s;
    will-change: transform;
    position: relative;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(108, 92, 231, 0) 0%,
        rgba(9, 132, 227, 0) 25%,
        rgba(0, 210, 211, 0) 50%,
        rgba(108, 92, 231, 0) 75%,
        rgba(255, 107, 107, 0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.glass-card:hover::after {
    opacity: 1;
    background: linear-gradient(
        135deg,
        rgba(108, 92, 231, 0.6) 0%,
        rgba(9, 132, 227, 0.6) 25%,
        rgba(0, 210, 211, 0.6) 50%,
        rgba(108, 92, 231, 0.6) 75%,
        rgba(255, 107, 107, 0.6) 100%
    );
    animation: rainbowBorderRotate 3s linear infinite;
}

@keyframes rainbowBorderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 16px 48px rgba(124, 92, 255, 0.14),
        0 8px 32px rgba(45, 156, 255, 0.10),
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.home-screen {
    text-align: center;
    padding: 40px 32px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.28) 0%, transparent 55%),
        linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: float 3s ease-in-out infinite, logoGlowPulse 2s ease-in-out infinite;
    box-shadow:
        0 20px 60px rgba(124, 92, 255, 0.42),
        0 0 40px rgba(124, 92, 255, 0.32),
        0 0 80px rgba(45, 156, 255, 0.16);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

@keyframes logoGlowPulse {
    0%, 100% {
        box-shadow:
            0 20px 60px rgba(108, 92, 231, 0.4),
            0 0 40px rgba(108, 92, 231, 0.3),
            0 0 80px rgba(9, 132, 227, 0.15);
    }
    50% {
        box-shadow:
            0 20px 80px rgba(108, 92, 231, 0.6),
            0 0 60px rgba(108, 92, 231, 0.5),
            0 0 120px rgba(9, 132, 227, 0.3),
            0 0 160px rgba(0, 210, 211, 0.1);
    }
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 34px;
    border: 2px solid rgba(108, 92, 231, 0.4);
    animation: logoPulseRing 2.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 42px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    animation: logoPulseRing 2.5s ease-in-out infinite 0.5s;
    box-shadow: 0 0 25px rgba(9, 132, 227, 0.15);
}

@keyframes logoPulseRing {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
}

.logo-icon:hover {
    transform: rotate(360deg) scale(1.05);
    box-shadow:
        0 20px 80px rgba(108, 92, 231, 0.6),
        0 0 80px rgba(108, 92, 231, 0.5),
        0 0 120px rgba(9, 132, 227, 0.3),
        0 0 200px rgba(0, 210, 211, 0.15);
}

.home-title {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 800;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #7c5cff 0%,
        #2d9cff 25%,
        #00e0d3 50%,
        #2d9cff 75%,
        #7c5cff 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleFlowGradient 5s ease-in-out infinite;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 0 22px rgba(124, 92, 255, 0.35));
    text-wrap: balance;
}

@keyframes titleFlowGradient {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.home-subtitle {
    font-size: clamp(0.9em, 2vw + 0.3em, 1.1em);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    font-weight: 300;
}

/* ===== G2: 语言切换按钮 ===== */
.lang-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82em;
    padding: 5px 12px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}
.glass-card.home-screen {
    position: relative;
}

.intro-text {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: clamp(0.85em, 1.5vw + 0.3em, 0.98em);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.info-item {
    padding: 25px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0;
    background: radial-gradient(circle at 50% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.info-item:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(124, 92, 255, 0.4);
    box-shadow:
        0 0 30px rgba(124, 92, 255, 0.22),
        0 0 60px rgba(45, 156, 255, 0.12);
}

.info-item:hover::before {
    opacity: 1;
}

.info-item:hover .info-number {
    transform: scale(1.1);
}

.info-number {
    font-size: 2em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* P5-S4: 首页信息卡片呼吸光晕 */
.info-item {
    position: relative;
    overflow: hidden;
}
.info-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(108,92,231,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}
.info-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* P5-S4: 按钮彩虹流光增强 */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6c5ce7, #00d2d3, #fdcb6e, #fd79a8, #6c5ce7);
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: btnRainbowFlow 3s ease infinite;
    filter: blur(8px);
}
.btn-primary:hover::after {
    opacity: 0.7;
}
@keyframes btnRainbowFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.info-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85em;
}

.btn-primary {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.15em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        var(--glow-primary),
        0 10px 40px rgba(124, 92, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    animation: btnBreathPulse 2.5s ease-in-out infinite;
}

@keyframes btnBreathPulse {
    0%, 100% {
        box-shadow:
            var(--glow-primary),
            0 10px 40px rgba(124, 92, 255, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            0 0 0 0 rgba(124, 92, 255, 0.3);
    }
    50% {
        box-shadow:
            var(--glow-primary),
            0 10px 40px rgba(124, 92, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 0 0 12px rgba(124, 92, 255, 0);
    }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
        var(--glow-primary),
        0 16px 48px rgba(124, 92, 255, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.95);
}

.question-screen {
    padding: 40px 32px;
    max-width: 680px;
    margin: 0 auto;
}

.progress-header {
    margin-bottom: 36px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-count {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
}

.progress-percent {
    font-size: 1.3em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(124, 92, 255, 0.5), 0 0 6px rgba(0, 224, 211, 0.25);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressBarShimmer 2s ease-in-out infinite;
}

@keyframes progressBarShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px rgba(124, 92, 255, 0.65), 0 0 4px rgba(0, 224, 211, 0.4);
    animation: progressDot 1.5s ease-in-out infinite;
}

@keyframes progressDot {
    0%, 100% { box-shadow: 0 0 12px rgba(124, 92, 255, 0.65), 0 0 4px rgba(0, 224, 211, 0.4); }
    50% { box-shadow: 0 0 22px rgba(124, 92, 255, 0.95), 0 0 10px rgba(0, 224, 211, 0.6); }
}

/* 维度步骤指示器 */
.dimension-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0 2px;
    position: relative;
}

.dimension-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-50%);
    z-index: 0;
}

.dim-step {
    font-size: 0.7em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    padding: 3px 8px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.dim-step::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.dim-step.active {
    color: white;
    background: rgba(108, 92, 231, 0.3);
}

.dim-step.active::before {
    background: var(--star-purple);
    box-shadow: 0 0 8px rgba(108, 92, 231, 0.6);
}

.dim-step.completed {
    color: rgba(108, 92, 231, 0.7);
}

.dim-step.completed::before {
    background: var(--star-purple);
    opacity: 0.6;
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.6em;
    color: white;
    line-height: 1.7;
    font-weight: 500;
    min-height: 60px;
}

/* ===== G3: 题目反馈按钮 ===== */
.q-feedback {
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
    font-size: 0.78em;
    padding: 5px 12px;
    border-radius: 100px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}
.q-feedback:hover {
    color: rgba(255,107,107,0.9);
    border-color: rgba(255,107,107,0.4);
    background: rgba(255,107,107,0.06);
}
.q-feedback.flagged {
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.5);
    background: rgba(255,107,107,0.1);
}

/* ===== J2: 徽章系统 ===== */
.badge-modal {
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px 18px 18px;
}
.badge-summary {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(253,203,110,0.1));
    border-radius: 10px;
    margin-bottom: 16px;
}
[data-theme="light"] .badge-summary {
    background: linear-gradient(135deg, rgba(108,92,231,0.08), rgba(253,203,110,0.08));
}
.badge-summary-num {
    font-size: 1.6em;
    font-weight: 700;
    color: #fdcb6e;
}
[data-theme="light"] .badge-summary-num { color: #6c5ce7; }
.badge-summary-text {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 2px;
}
.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.badge-cell {
    aspect-ratio: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}
[data-theme="light"] .badge-cell {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.06);
}
.badge-cell.unlocked {
    background: linear-gradient(135deg, rgba(108,92,231,0.18), rgba(253,203,110,0.12));
    border-color: rgba(253,203,110,0.4);
}
.badge-cell-emoji {
    font-size: 1.6em;
    margin-bottom: 4px;
    filter: grayscale(0.6) opacity(0.4);
}
.badge-cell.unlocked .badge-cell-emoji {
    filter: none;
    animation: badgeShine 2s ease-in-out infinite;
}
@keyframes badgeShine {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.badge-cell-name {
    font-size: 0.72em;
    color: var(--text-secondary);
    line-height: 1.2;
    max-width: 100%;
}
.badge-cell.unlocked .badge-cell-name {
    color: #fff;
    font-weight: 600;
}
[data-theme="light"] .badge-cell.unlocked .badge-cell-name { color: #2d3436; }
.badge-cell-desc {
    font-size: 0.62em;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
    line-height: 1.2;
}
.badge-tip {
    text-align: center;
    font-size: 0.82em;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 14px;
}
/* 徽章解锁 Toast */
.badge-unlock-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #6c5ce7, #fdcb6e);
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: var(--z-toast);
    box-shadow: 0 8px 32px rgba(108,92,231,0.4);
    animation: badgeToastIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, badgeToastOut 0.5s ease 2.5s forwards;
}
@keyframes badgeToastIn {
    to { transform: translateX(-50%) translateY(0); }
}
@keyframes badgeToastOut {
    to { opacity: 0; transform: translateX(-50%) translateY(-30px); }
}
.badge-unlock-emoji { font-size: 1.6em; }
.badge-unlock-text { line-height: 1.3; }
.badge-unlock-title { font-size: 0.75em; opacity: 0.85; }
.badge-unlock-name { font-size: 1em; font-weight: 700; }

/* ===== J3: PWA 安装提示条 ===== */
.pwa-install-bar {
    position: fixed;
    bottom: 16px;
    left: 12px;
    right: 12px;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(20, 18, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(108, 92, 231, 0.4);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: var(--z-sticky);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: pwaBarIn 0.4s ease-out;
}
@keyframes pwaBarIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
[data-theme="light"] .pwa-install-bar {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(108, 92, 231, 0.3);
}
.pwa-install-icon { font-size: 1.6em; flex-shrink: 0; }
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-title {
    font-size: 0.92em;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
[data-theme="light"] .pwa-install-title { color: #2d3436; }
.pwa-install-sub {
    font-size: 0.72em;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}
[data-theme="light"] .pwa-install-sub { color: #636e72; }
.pwa-install-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 100px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.pwa-install-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.3em;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
[data-theme="light"] .pwa-install-close { color: rgba(0,0,0,0.4); }

/* ===== J3: iOS 安装引导 ===== */
.ios-install-modal {
    max-width: 420px;
    padding: 24px 22px;
}
.ios-install-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}
[data-theme="light"] .ios-install-step { background: rgba(0,0,0,0.04); }
.ios-install-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.ios-install-text { font-size: 0.9em; line-height: 1.5; }
.ios-install-icon {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(108, 92, 231, 0.3);
    border-radius: 4px;
    font-size: 0.9em;
}
.ios-install-tip {
    text-align: center;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 14px 0 4px;
}

/* ===== J4: 微信遮罩 ===== */
.wechat-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px 20px;
    color: #fff;
    text-align: center;
}
.wechat-mask-arrow {
    font-size: 4em;
    margin-bottom: 4px;
    animation: wcBounce 1.5s ease-in-out infinite;
}
@keyframes wcBounce {
    0%, 100% { transform: translateY(0) rotate(-15deg); }
    50% { transform: translateY(-10px) rotate(-15deg); }
}
.wechat-mask-tip {
    margin-bottom: 20px;
}
.wechat-mask-title {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 6px;
}
.wechat-mask-sub {
    font-size: 0.88em;
    color: rgba(255,255,255,0.7);
}
.wechat-mask-qr {
    margin-top: 16px;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    max-width: 220px;
}
.wechat-mask-qr canvas, .wechat-mask-qr img {
    width: 200px;
    height: 200px;
    display: block;
}
.wechat-mask-qr-tip {
    color: #2d3436;
    font-size: 0.78em;
    margin-top: 6px;
}
.wechat-mask-close {
    margin-top: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9em;
}
.wechat-mask-copy {
    margin-top: 14px;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    color: #fff;
    padding: 11px 26px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(108,92,231,0.4);
}
.wechat-mask-copy:active { transform: scale(0.97); }

/* ===== K1: 每日签到 + 知识卡 ===== */
.checkin-modal { max-width: 480px; }
.checkin-summary {
    text-align: center;
    font-size: 0.95em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}
.checkin-streak {
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #fbc2eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
.checkin-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 12px 0;
}
.checkin-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    position: relative;
}
.checkin-day.checked {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    border-color: #ff9a9e;
    color: #fff;
}
.checkin-day.checked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.8em;
}
.checkin-day.today {
    border-color: #ffd93d;
    box-shadow: 0 0 0 2px rgba(255,217,61,0.3);
}
.checkin-day .checkin-day-label { font-weight: 600; }
.checkin-action {
    text-align: center;
    margin: 10px 0 14px;
}
.checkin-action button {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    border: none;
    color: #fff;
    padding: 10px 28px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255,154,158,0.4);
}
.checkin-action button.done {
    background: rgba(255,255,255,0.1);
    cursor: default;
    box-shadow: none;
}
.checkin-card {
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(9,132,227,0.15));
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 16px;
    padding: 18px 16px;
    margin: 8px 0 12px;
    text-align: center;
}
.checkin-card-emoji {
    font-size: 2.4em;
    margin-bottom: 6px;
}
.checkin-card-cat {
    display: inline-block;
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    padding: 2px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
}
.checkin-card-text {
    color: rgba(255,255,255,0.92);
    font-size: 0.95em;
    line-height: 1.55;
}
.checkin-tip {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    margin-top: 6px;
}

/* ===== K2: 成长路线图 ===== */
.growth-modal { max-width: 540px; max-height: 88vh; overflow-y: auto; }
.growth-type {
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--star-purple), var(--ocean-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.growth-section { margin-bottom: 16px; }
.growth-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.growth-list { display: flex; flex-direction: column; gap: 6px; }
.growth-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.86em;
    color: rgba(255,255,255,0.85);
    display: flex;
    gap: 8px;
}
.growth-item-emoji { font-size: 1.3em; flex-shrink: 0; }
.growth-item-body { flex: 1; }
.growth-item-title { font-weight: 600; }
.growth-item-desc { font-size: 0.85em; color: rgba(255,255,255,0.55); margin-top: 2px; }
.growth-tip {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    margin-top: 10px;
}

/* ===== K3: 16×16 关系匹配 ===== */
.match-modal { max-width: 520px; }
.match-selectors {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0 16px;
}
.match-sel { flex: 1; }
.match-sel-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin-bottom: 4px;
}
.match-type-select {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}
.match-type-select option {
    background: #1a1a2e;
    color: #fff;
}
.match-sel-vs { font-size: 1.4em; }
.match-result {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px;
}
.match-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.match-score-label { font-size: 0.85em; color: rgba(255,255,255,0.6); }
.match-score-value {
    font-size: 1.6em;
    font-weight: 800;
}
.match-score-bar {
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
}
.match-score-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease;
}
.match-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.match-tag {
    font-size: 0.78em;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(108,92,231,0.18);
    color: rgba(255,255,255,0.85);
}
.match-summary {
    font-size: 0.9em;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
}
.match-advice {
    font-size: 0.84em;
    color: rgba(255,255,255,0.65);
    line-height: 1.55;
    padding: 8px 12px;
    background: rgba(255,217,61,0.08);
    border-left: 3px solid #ffd93d;
    border-radius: 4px;
}
.match-tip {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    margin-top: 10px;
}

/* ===== L1: 同型朋友圈 ===== */
.circle-modal { max-width: 520px; max-height: 88vh; overflow-y: auto; }
.circle-type {
    text-align: center;
    font-size: 0.95em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}
.circle-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.circle-tab {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}
.circle-tab.active {
    background: rgba(108,92,231,0.3);
    border-color: #6c5ce7;
    color: #fff;
}
.circle-feed { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.circle-post {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 12px;
}
.circle-post-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
}
.circle-post-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
}
.circle-post-mood { font-size: 1.1em; }
.circle-post-text {
    font-size: 0.9em;
    line-height: 1.55;
    color: rgba(255,255,255,0.92);
    white-space: pre-wrap;
    word-break: break-word;
}
.circle-post-actions {
    display: flex;
    gap: 14px;
    margin-top: 6px;
    font-size: 0.78em;
    color: rgba(255,255,255,0.5);
}
.circle-post-action {
    cursor: pointer;
    user-select: none;
}
.circle-post-action.liked { color: #ff6b6b; }
.circle-composer {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px;
}
.circle-input {
    width: 100%;
    min-height: 50px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
}
.circle-input:focus-visible { outline: 2px solid var(--star-purple); outline-offset: 2px; }
.circle-composer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}
.circle-mood-sel {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
}
.circle-mood-sel option { background: #1a1a2e; }
.circle-post-btn {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    color: #fff;
    padding: 6px 18px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
}
.circle-tip {
    text-align: center;
    font-size: 0.7em;
    color: rgba(255,255,255,0.4);
    margin-top: 10px;
}

/* ===== L2: 类型日记 ===== */
.diary-modal { max-width: 540px; max-height: 88vh; overflow-y: auto; }
.diary-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.diary-tab {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88em;
}
.diary-tab.active {
    background: rgba(108,92,231,0.25);
    border-color: #6c5ce7;
    color: #fff;
}
.diary-date {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.95em;
    margin-bottom: 8px;
}
.diary-mood-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.diary-mood-label {
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}
.diary-mood-picker {
    display: flex;
    gap: 4px;
}
.diary-mood-btn {
    font-size: 1.4em;
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 6px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.4;
}
.diary-mood-btn.active {
    opacity: 1;
    background: rgba(108,92,231,0.25);
    border-color: #6c5ce7;
}
.diary-input {
    width: 100%;
    min-height: 80px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
}
.diary-input:focus-visible { outline: 2px solid var(--star-purple); outline-offset: 2px; border-color: #6c5ce7; }
.diary-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.diary-tags-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
}
.diary-tag-btn {
    font-size: 0.75em;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}
.diary-tag-btn.active {
    background: rgba(108,92,231,0.25);
    border-color: #6c5ce7;
    color: #fff;
}
.diary-save-btn {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    color: #fff;
    padding: 9px 28px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    width: 100%;
    margin-top: 6px;
}
.diary-recent {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.diary-recent-title {
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
.diary-recent-item {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 0.85em;
}
.diary-recent-head {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.5);
    font-size: 0.85em;
    margin-bottom: 3px;
}
.diary-insight-summary {
    background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(9,132,227,0.12));
    border: 1px solid rgba(108,92,231,0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 0.9em;
}
.diary-insight-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}
.diary-insight-bar {
    flex: 1;
    background: linear-gradient(180deg, #6c5ce7, #0984e3);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.4s ease;
}
.diary-insight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.diary-insight-tag {
    font-size: 0.78em;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(108,92,231,0.2);
    color: rgba(255,255,255,0.85);
}
.diary-insight-tip {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    padding: 10px 12px;
    background: rgba(255,217,61,0.08);
    border-left: 3px solid #ffd93d;
    border-radius: 4px;
}

/* ===== L3: 30 天挑战 ===== */
.challenge-modal { max-width: 540px; max-height: 88vh; overflow-y: auto; }
.challenge-summary {
    text-align: center;
    font-size: 1.05em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
}
.challenge-progress {
    height: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 14px;
}
.challenge-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
    border-radius: 100px;
    transition: width 0.5s ease;
}
.challenge-today {
    background: linear-gradient(135deg, rgba(108,92,231,0.18), rgba(9,132,227,0.18));
    border: 1px solid rgba(108,92,231,0.35);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}
.challenge-today-title {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.challenge-today-task {
    font-size: 1em;
    color: #fff;
    line-height: 1.5;
}
.challenge-today-btn {
    margin-top: 8px;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    color: #fff;
    padding: 7px 22px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
}
.challenge-today-btn.done {
    background: rgba(255,255,255,0.1);
    cursor: default;
}
.challenge-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}
.challenge-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.78em;
    color: rgba(255,255,255,0.55);
    position: relative;
}
.challenge-day.done {
    background: linear-gradient(135deg, #6bcf7f, #00b894);
    border-color: #6bcf7f;
    color: #fff;
}
.challenge-day.today {
    border-color: #ffd93d;
    box-shadow: 0 0 0 2px rgba(255,217,61,0.3);
}
.challenge-day .day-num { font-weight: 700; font-size: 1.1em; }
.challenge-tip {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    margin-top: 8px;
}

/* ===== L4: AI 心理对话 ===== */
.ai-chat-modal { max-width: 540px; max-height: 88vh; display: flex; flex-direction: column; }
.ai-chat-type {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}
.ai-chat-msgs {
    flex: 1;
    min-height: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.88em;
    line-height: 1.5;
    word-break: break-word;
}
.ai-msg-bot {
    align-self: flex-start;
    background: rgba(108,92,231,0.18);
    border: 1px solid rgba(108,92,231,0.3);
    color: rgba(255,255,255,0.92);
    border-bottom-left-radius: 4px;
}
.ai-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-chat-quick {
    display: flex;
    gap: 6px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.ai-quick-btn {
    font-size: 0.78em;
    padding: 5px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
}
.ai-chat-input-row {
    display: flex;
    gap: 6px;
}
.ai-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 10px 12px;
    border-radius: 100px;
    font-size: 0.9em;
}
.ai-chat-input:focus-visible { outline: 2px solid var(--star-purple); outline-offset: 2px; border-color: #6c5ce7; }
.ai-chat-send {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    color: #fff;
    padding: 0 18px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.88em;
    font-weight: 600;
}
.ai-chat-tip {
    text-align: center;
    font-size: 0.7em;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
}

/* ===== M1: 数据仪表盘 ===== */
.dashboard-modal { max-width: 600px; max-height: 90vh; overflow-y: auto; }
.dashboard-type {
    text-align: center;
    font-size: 0.9em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.dashboard-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
}
.dashboard-stat-val {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dashboard-stat-lbl {
    font-size: 0.7em;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
}
.dashboard-section { margin-bottom: 14px; }
.dashboard-section-title {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    margin-bottom: 6px;
}
.dashboard-radar-wrap, .dashboard-trend-wrap, .dashboard-mood-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: center;
}
.dashboard-tip {
    text-align: center;
    font-size: 0.7em;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
}

/* ===== M2: 朋友 PK ===== */
.pk-modal { max-width: 520px; }
.pk-intro {
    background: rgba(255,217,61,0.08);
    border-left: 3px solid #ffd93d;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.88em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 14px;
}
.pk-players-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.pk-player-card { flex: 1; }
.pk-player-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.pk-player-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9em;
}
.pk-vs {
    font-size: 1.3em;
    font-weight: 800;
    color: #ff6b6b;
    padding: 0 4px;
}
.pk-mode-row { margin-bottom: 14px; }
.pk-mode-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.pk-mode-sel {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
}
.pk-mode-sel option { background: #1a1a2e; }
.pk-start-btn {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 700;
    width: 100%;
    box-shadow: 0 4px 14px rgba(255,107,107,0.4);
}
.pk-scores {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.pk-score-card {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}
.pk-score-card.active { border-color: #ffd93d; background: rgba(255,217,61,0.1); }
.pk-score-name { font-size: 0.8em; color: rgba(255,255,255,0.6); }
.pk-score-val { font-size: 1.6em; font-weight: 800; }
.pk-score-q { font-size: 0.8em; color: rgba(255,255,255,0.7); }
.pk-cur-player {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,217,61,0.9);
    margin-bottom: 8px;
    font-weight: 600;
}
.pk-question {
    background: rgba(108,92,231,0.15);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}
.pk-options { display: flex; flex-direction: column; gap: 6px; }
.pk-opt {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88em;
    text-align: left;
    transition: all 0.2s;
}
.pk-opt:hover { background: rgba(108,92,231,0.18); border-color: #6c5ce7; }
.pk-opt.selected { background: rgba(108,92,231,0.3); border-color: #6c5ce7; }
#pkResult { text-align: center; }
.pk-result-type {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 6px 0;
}
.pk-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0;
    background: rgba(255,255,255,0.04);
    padding: 8px 12px;
    border-radius: 8px;
}
.pk-result-name { font-weight: 600; }

/* ===== M3: MBTI 百科 ===== */
.wiki-modal { max-width: 560px; max-height: 88vh; overflow-y: auto; }
.wiki-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.wiki-tab {
    font-size: 0.78em;
    padding: 5px 10px;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}
.wiki-tab.active {
    background: rgba(108,92,231,0.3);
    border-color: #6c5ce7;
    color: #fff;
}
.wiki-pane { font-size: 0.9em; line-height: 1.7; }
.wiki-article {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}
.wiki-article h3 { margin: 0 0 6px; color: #6c5ce7; font-size: 1.05em; }
.wiki-article p { margin: 0; color: rgba(255,255,255,0.85); }
.wiki-quote {
    background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(9,132,227,0.12));
    border-left: 3px solid #6c5ce7;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-style: italic;
}
.wiki-quote-author {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.55);
    font-style: normal;
}
.wiki-quiz-q { margin-bottom: 8px; }
.wiki-quiz-q-text { font-weight: 600; margin-bottom: 6px; }
.wiki-quiz-opt {
    display: block;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 7px 10px;
    border-radius: 6px;
    margin: 4px 0;
    cursor: pointer;
    font-size: 0.88em;
}
.wiki-quiz-opt:hover { background: rgba(108,92,231,0.15); }
.wiki-quiz-opt.correct { background: rgba(0,184,148,0.25); border-color: #00b894; }
.wiki-quiz-opt.wrong { background: rgba(255,107,107,0.2); border-color: #ff6b6b; }
.wiki-quiz-score {
    background: rgba(255,217,61,0.1);
    border: 1px solid rgba(255,217,61,0.3);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: center;
}

/* ===== M4: 数据管理 ===== */
.data-modal { max-width: 540px; }
.data-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.data-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}
.data-stat-val { font-size: 1.4em; font-weight: 800; color: #6c5ce7; }
.data-stat-lbl { font-size: 0.72em; color: rgba(255,255,255,0.55); margin-top: 2px; }
.data-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}
.data-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 4px;
}
.data-section-desc {
    font-size: 0.78em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 10px;
}
.data-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px 18px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.88em;
    margin-right: 6px;
    margin-bottom: 6px;
}
.data-btn:hover { background: rgba(108,92,231,0.2); }
.data-btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}
.data-btn-danger {
    background: rgba(255,107,107,0.18);
    border: 1px solid rgba(255,107,107,0.4);
    color: #ff8888;
}
.data-qr-wrap {
    margin-top: 10px;
    text-align: center;
}
.data-qr {
    display: inline-block;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
}
.data-qr img { display: block; }
.data-qr-tip {
    font-size: 0.78em;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
}

/* ===== N1: 主题换肤中心 ===== */
.theme-modal { max-width: 580px; }
.theme-intro {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.theme-card {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: #6c5ce7; box-shadow: 0 0 0 2px rgba(108,92,231,0.3); }
.theme-card-preview {
    height: 60px;
    border-radius: 8px;
    margin-bottom: 6px;
}
.theme-card-name {
    font-size: 0.85em;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}
.theme-custom {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
}
.theme-section-title {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}
.theme-custom-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.theme-custom-row input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}
.theme-tip {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    margin-top: 8px;
}

/* ===== N2: 16×16 关系图谱 ===== */
.heatmap-modal { max-width: 720px; max-height: 88vh; overflow-y: auto; }
.heatmap-instructions {
    text-align: center;
    font-size: 0.82em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}
.heatmap-wrap {
    display: grid;
    grid-template-columns: 30px repeat(16, 1fr);
    gap: 1px;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: 8px;
    overflow-x: auto;
}
.heatmap-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55em;
    font-weight: 700;
    color: rgba(0,0,0,0.85);
    cursor: pointer;
    user-select: none;
    min-width: 18px;
}
.heatmap-cell.header {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    font-size: 0.5em;
    cursor: default;
}
.heatmap-cell.row-label {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    font-size: 0.5em;
    cursor: default;
}
.heatmap-legend {
    margin: 12px 0 8px;
}
.heatmap-legend-title {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}
.heatmap-legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.78em;
    color: rgba(255,255,255,0.7);
}
.heatmap-legend-cell {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: rgba(0,0,0,0.85);
    font-weight: 600;
}
.heatmap-detail {
    margin-top: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
}

/* ===== N3: 节日专题 ===== */
.holiday-modal { max-width: 540px; }
.holiday-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.holiday-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.holiday-card:hover {
    background: rgba(108,92,231,0.15);
    border-color: #6c5ce7;
    transform: translateX(4px);
}
.holiday-emoji {
    font-size: 2.2em;
    flex-shrink: 0;
}
.holiday-info { flex: 1; }
.holiday-name { font-weight: 700; color: rgba(255,255,255,0.9); }
.holiday-desc {
    font-size: 0.82em;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
}
.holiday-status {
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(108,92,231,0.3);
    color: #fff;
}
.holiday-status.upcoming { background: rgba(255,217,61,0.3); }
.holiday-status.finished { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

/* ===== N4: 类型音乐 ===== */
.music-modal { max-width: 540px; max-height: 88vh; overflow-y: auto; }
.music-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.music-tab {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88em;
}
.music-tab.active {
    background: rgba(108,92,231,0.25);
    border-color: #6c5ce7;
    color: #fff;
}
.music-pane { font-size: 0.9em; }
.music-type-card {
    background: linear-gradient(135deg, rgba(108,92,231,0.18), rgba(9,132,227,0.18));
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.music-type-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.music-type-emoji { font-size: 1.6em; }
.music-type-name { font-weight: 700; color: #fff; }
.music-type-desc {
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
}
.music-track {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.88em;
}
.music-track-num {
    width: 18px;
    color: rgba(255,255,255,0.4);
    font-size: 0.85em;
}
.music-track-info { flex: 1; }
.music-track-title { color: rgba(255,255,255,0.9); }
.music-track-artist { font-size: 0.78em; color: rgba(255,255,255,0.5); }
.music-play-btn {
    background: rgba(108,92,231,0.3);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85em;
}
.music-guess-q {
    background: linear-gradient(135deg, rgba(255,217,61,0.1), rgba(255,107,107,0.1));
    border: 1px solid rgba(255,217,61,0.3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.music-guess-title {
    font-size: 0.95em;
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
}
.music-guess-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.music-guess-opt {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
}
.music-guess-opt:hover { background: rgba(108,92,231,0.2); border-color: #6c5ce7; }
.music-guess-opt.correct { background: rgba(0,184,148,0.3); border-color: #00b894; }
.music-guess-opt.wrong { background: rgba(255,107,107,0.25); border-color: #ff6b6b; }
.music-guess-progress {
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
}

/* ===== O1: 性格树洞 ===== */
.treehole-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.treehole-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.treehole-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.treehole-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    color: #fff;
    transition: opacity 0.2s;
}
.treehole-btn:hover { opacity: 0.85; }
.treehole-btn-post { background: linear-gradient(135deg, #6c5ce7, #0984e3); flex: 1; }
.treehole-btn-help { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }
.treehole-btn-submit { background: linear-gradient(135deg, #00b894, #00d2d3); }
.treehole-btn-cancel { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.treehole-filter {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.85em;
}
.treehole-filter option { background: #1a1a2e; color: #fff; }
.treehole-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
}
.treehole-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.treehole-card:hover { background: rgba(255,255,255,0.08); border-color: #6c5ce7; }
.treehole-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
}
.treehole-card-emoji { font-size: 1.1em; }
.treehole-card-type { font-weight: 700; color: #a18cd1; }
.treehole-card-mood { font-size: 1.2em; }
.treehole-card-content {
    color: #fff;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}
.treehole-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: rgba(255,255,255,0.4);
}
.treehole-card-actions {
    display: flex;
    gap: 8px;
}
.treehole-card-action {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.85em;
    padding: 2px 4px;
}
.treehole-card-action:hover { color: #ff9a9e; }
.treehole-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 30px;
    font-size: 0.9em;
}
.treehole-post-modal,
.treehole-help-modal,
.treehole-detail-modal { max-width: 520px; max-height: 90vh; overflow-y: auto; }
.treehole-post-hint,
.treehole-help-hint {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.treehole-mood-row,
.treehole-type-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.treehole-mood,
.treehole-post-type {
    padding: 5px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    font-size: 0.8em;
    cursor: pointer;
    color: #fff;
}
.treehole-mood.active,
.treehole-post-type.active {
    background: rgba(108,92,231,0.4);
    border-color: #6c5ce7;
}
.treehole-textarea,
.treehole-reply-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.treehole-reply-textarea { min-height: 60px; }
.treehole-count {
    text-align: right;
    font-size: 0.75em;
    color: rgba(255,255,255,0.4);
    margin: 4px 0 10px;
}
.treehole-post-actions,
.treehole-reply-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.treehole-post-actions { justify-content: flex-end; }
.treehole-help-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.treehole-help-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.treehole-help-emoji { font-size: 1.8em; }
.treehole-help-title { font-weight: 700; color: #fff; font-size: 0.95em; }
.treehole-help-desc { color: #ffd93d; font-size: 0.95em; font-weight: 600; }
.treehole-help-sub { color: rgba(255,255,255,0.5); font-size: 0.75em; }
.treehole-detail {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}
.treehole-detail-content {
    color: #fff;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 8px 0;
}
.treehole-reply-section {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}
.treehole-reply-title {
    font-size: 0.9em;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 700;
}
.treehole-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.treehole-reply {
    background: rgba(108,92,231,0.1);
    border-left: 3px solid #6c5ce7;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #fff;
}
.treehole-reply-meta {
    font-size: 0.75em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

/* ===== O2: MBTI 真实认证 ===== */
.certify-modal { max-width: 520px; max-height: 90vh; overflow-y: auto; }
.certify-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.certify-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.certify-tab {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
}
.certify-tab.active {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border-color: transparent;
}
.certify-drop {
    border: 2px dashed rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.03);
}
.certify-drop:hover, .certify-drop.dragover {
    background: rgba(108,92,231,0.1);
    border-color: #6c5ce7;
}
.certify-drop-icon { font-size: 2.5em; margin-bottom: 8px; }
.certify-drop-text { color: #fff; font-size: 0.95em; margin-bottom: 4px; }
.certify-drop-sub { color: rgba(255,255,255,0.5); font-size: 0.8em; }
.certify-preview {
    position: relative;
    margin-top: 10px;
    text-align: center;
}
.certify-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}
.certify-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    color: #fff;
}
.certify-btn-clear { background: rgba(255,107,107,0.3); margin-top: 8px; }
.certify-btn-cancel { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.certify-btn-submit { background: linear-gradient(135deg, #00b894, #00d2d3); }
.certify-manual {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 8px 0;
}
.certify-letter {
    text-align: center;
}
.certify-letter-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.certify-letter-toggle {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}
.certify-letter-opt {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    font-weight: 800;
    font-size: 1.1em;
    cursor: pointer;
    color: #fff;
    border: none;
    background: transparent;
}
.certify-letter-opt.active {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
}
.certify-result {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
}
.certify-result-title {
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.certify-letters {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}
.certify-letter-box {
    width: 50px;
    height: 60px;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    font-weight: 800;
    color: #fff;
}
.certify-confirm {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9em;
    margin: 8px 0;
}
.certify-result-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}
.certify-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffd700, #ff9a00);
    border-radius: 16px;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.85em;
    margin: 4px;
}

/* ===== O3: 类型电影推荐 ===== */
.movie-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.movie-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.movie-type-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.movie-type-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    font-size: 0.8em;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.movie-type-tab.active {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border-color: transparent;
}
.movie-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
}
.movie-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s;
}
.movie-card:hover { border-color: #6c5ce7; }
.movie-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.movie-card-poster {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    flex-shrink: 0;
}
.movie-card-info { flex: 1; min-width: 0; }
.movie-card-title {
    font-weight: 700;
    color: #fff;
    font-size: 1em;
    margin-bottom: 2px;
}
.movie-card-meta {
    font-size: 0.78em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}
.movie-card-rating { color: #ffd93d; }
.movie-card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}
.movie-card-genre {
    font-size: 0.7em;
    padding: 2px 6px;
    background: rgba(108,92,231,0.2);
    border-radius: 8px;
    color: #a18cd1;
}
.movie-card-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.82em;
    line-height: 1.5;
    margin: 6px 0;
}
.movie-card-dim {
    display: flex;
    gap: 6px;
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    margin: 4px 0;
}
.movie-card-dim span {
    padding: 1px 6px;
    background: rgba(0,184,148,0.15);
    border-radius: 6px;
    color: #00b894;
}
.movie-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.movie-card-btn {
    flex: 1;
    padding: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8em;
    cursor: pointer;
}
.movie-card-btn:hover { background: rgba(108,92,231,0.3); }

/* ===== O4: 周报月报 ===== */
.report-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.report-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.report-period {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.report-period-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
}
.report-period-btn.active {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border-color: transparent;
}
.report-content {
    background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(9,132,227,0.1));
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 16px;
    max-height: 50vh;
    overflow-y: auto;
}
.report-header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    margin-bottom: 12px;
}
.report-title {
    font-size: 1.3em;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.report-subtitle {
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}
.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.report-stat {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.report-stat-num {
    font-size: 1.8em;
    font-weight: 800;
    color: #ffd93d;
}
.report-stat-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.report-section {
    margin: 12px 0;
    padding: 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
}
.report-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.report-section-body {
    font-size: 0.85em;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}
.report-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    font-size: 0.8em;
}
.report-bar-label { width: 50px; color: #a18cd1; font-weight: 700; }
.report-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.report-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #0984e3);
    border-radius: 4px;
}
.report-bar-val { color: rgba(255,255,255,0.6); min-width: 30px; }
.report-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.report-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
}
.report-btn-share { background: linear-gradient(135deg, #00b894, #00d2d3); }
.report-btn-image { background: linear-gradient(135deg, #6c5ce7, #0984e3); }

/* ===== P1: 类型对话模拟器 ===== */
.dialogue-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.dialogue-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.dialogue-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.dialogue-selector { flex: 1; }
.dialogue-selector-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.dialogue-select {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
}
.dialogue-select option { background: #1a1a2e; color: #fff; }
.dialogue-selector-vs {
    font-size: 1.4em;
    font-weight: 800;
    color: #ff6b6b;
    padding: 0 4px;
}
.dialogue-scene {
    margin-bottom: 12px;
}
.dialogue-scene-select {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
}
.dialogue-scene-select option { background: #1a1a2e; color: #fff; }
.dialogue-preview {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 12px;
    min-height: 200px;
    max-height: 55vh;
    overflow-y: auto;
}
.dialogue-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 60px 20px;
    font-size: 0.9em;
}
.dialogue-bubble {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}
.dialogue-bubble.b { flex-direction: row-reverse; }
.dialogue-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}
.dialogue-avatar.a { background: linear-gradient(135deg, #6c5ce7, #a18cd1); }
.dialogue-avatar.b { background: linear-gradient(135deg, #ff6b6b, #ffd93d); }
.dialogue-bubble-content {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    line-height: 1.5;
    color: #fff;
}
.dialogue-bubble.a .dialogue-bubble-content {
    background: rgba(108,92,231,0.3);
    border: 1px solid rgba(108,92,231,0.4);
}
.dialogue-bubble.b .dialogue-bubble-content {
    background: rgba(255,107,107,0.2);
    border: 1px solid rgba(255,107,107,0.4);
}
.dialogue-bubble-name {
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2px;
}
.dialogue-friction {
    background: rgba(255,107,107,0.15);
    border-left: 3px solid #ff6b6b;
    padding: 6px 10px;
    margin: 8px 0;
    border-radius: 6px;
    font-size: 0.78em;
    color: #fff;
}
.dialogue-tips {
    background: rgba(0,184,148,0.15);
    border-left: 3px solid #00b894;
    padding: 8px 12px;
    margin-top: 12px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #fff;
}
.dialogue-tips-title {
    font-weight: 700;
    color: #00b894;
    margin-bottom: 4px;
}

/* ===== P2: 同型名人案例库 ===== */
.celebrity-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.celebrity-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.celebrity-type-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.celebrity-type-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    font-size: 0.8em;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.celebrity-type-tab.active {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border-color: transparent;
}
.celebrity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
}
.celebrity-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    transition: all 0.2s;
}
.celebrity-card:hover { border-color: #6c5ce7; }
.celebrity-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    flex-shrink: 0;
}
.celebrity-info { flex: 1; min-width: 0; }
.celebrity-name {
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.celebrity-field {
    font-size: 0.78em;
    color: #a18cd1;
    margin-bottom: 4px;
}
.celebrity-dim {
    display: flex;
    gap: 4px;
    font-size: 0.7em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.celebrity-dim span {
    padding: 1px 6px;
    background: rgba(108,92,231,0.2);
    border-radius: 4px;
    color: #a18cd1;
}
.celebrity-desc {
    font-size: 0.82em;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
}
.celebrity-quote {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(255,215,0,0.1);
    border-left: 3px solid #ffd93d;
    border-radius: 4px;
    font-size: 0.8em;
    color: #ffd93d;
    font-style: italic;
}

/* ===== P3: 类型进化时间线 ===== */
.timeline-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.timeline-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.timeline-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.timeline-stat {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}
.timeline-stat-num {
    font-size: 1.4em;
    font-weight: 800;
    color: #ffd93d;
}
.timeline-stat-label {
    font-size: 0.7em;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.timeline-canvas-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}
.timeline-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 30vh;
    overflow-y: auto;
}
.timeline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 12px;
    border-left: 3px solid #6c5ce7;
}
.timeline-item.stable { border-color: #00b894; }
.timeline-item.wave { border-color: #ffd93d; }
.timeline-item.break { border-color: #ff6b6b; }
.timeline-item-time {
    font-size: 0.78em;
    color: rgba(255,255,255,0.5);
    min-width: 70px;
}
.timeline-item-emoji { font-size: 1.2em; }
.timeline-item-type {
    font-weight: 700;
    color: #fff;
}
.timeline-item-tag {
    margin-left: auto;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(108,92,231,0.3);
    color: #a18cd1;
}
.timeline-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 30px;
    font-size: 0.9em;
}

/* ===== P4: 个人成长树 ===== */
.tree-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.tree-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.tree-canvas-wrap {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
}
.tree-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}
.tree-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.tree-stat {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}
.tree-stat-num {
    font-size: 1.4em;
    font-weight: 800;
    color: #00b894;
}
.tree-stat-label {
    font-size: 0.7em;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.tree-actions {
    display: flex;
    gap: 6px;
}
.tree-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.8em;
    cursor: pointer;
}
.tree-btn-share { background: linear-gradient(135deg, #00b894, #00d2d3); }
.tree-btn-image { background: linear-gradient(135deg, #6c5ce7, #0984e3); }
.tree-btn-regen { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }

/* ===== Q1: 灵魂伴侣 ===== */
.soul-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.soul-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.soul-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.soul-sel { flex: 1; }
.soul-sel-label {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
    text-align: center;
}
.soul-select {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
}
.soul-select option { background: #1a1a2e; color: #fff; }
.soul-sel-vs {
    font-size: 1.4em;
    font-weight: 800;
    color: #ff6b9d;
    padding: 0 4px;
    align-self: flex-end;
    margin-bottom: 6px;
}
.soul-content {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px;
    max-height: 55vh;
    overflow-y: auto;
}
.soul-score {
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    margin-bottom: 10px;
}
.soul-score-num {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b9d, #ffd93d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.soul-score-label {
    font-size: 0.85em;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
.soul-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 8px 0;
}
.soul-tag {
    font-size: 0.75em;
    padding: 4px 10px;
    background: rgba(255,107,157,0.2);
    border: 1px solid #ff6b9d;
    border-radius: 12px;
    color: #ff6b9d;
}
.soul-section {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
}
.soul-section-title {
    font-weight: 700;
    color: #ffd93d;
    margin-bottom: 6px;
    font-size: 0.9em;
}
.soul-section-body {
    font-size: 0.82em;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}
.soul-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    font-size: 0.8em;
}
.soul-bar-label { width: 60px; color: rgba(255,255,255,0.7); }
.soul-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.soul-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #ffd93d);
    border-radius: 4px;
}
.soul-bar-val { color: rgba(255,255,255,0.6); min-width: 36px; text-align: right; }

/* ===== Q2: 类型脑图 ===== */
.brain-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.brain-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.brain-canvas-wrap {
    background: radial-gradient(circle, #1a1a2e 0%, #0f0f1e 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    cursor: crosshair;
}
.brain-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}
.brain-info {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px;
    min-height: 80px;
    font-size: 0.85em;
    color: #fff;
}
.brain-info-title {
    font-weight: 700;
    color: #ffd93d;
    margin-bottom: 4px;
}
.brain-info-desc {
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}

/* ===== Q3: 类型电台 ===== */
.radio-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.radio-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.radio-selectors {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.radio-select {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
}
.radio-select option { background: #1a1a2e; color: #fff; }
.radio-script {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px;
    min-height: 200px;
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 0.88em;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
}
.radio-script p { margin: 0 0 8px; }
.radio-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.radio-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
}
.radio-btn:hover { opacity: 0.85; }
.radio-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.radio-rate {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
}
.radio-rate option { background: #1a1a2e; color: #fff; }
.radio-tip {
    font-size: 0.78em;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* ===== Q4: 类型宇宙 ===== */
.universe-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.universe-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.universe-canvas-wrap {
    background: radial-gradient(circle at 30% 30%, #0f0f1e 0%, #000 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.universe-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: crosshair;
}
.universe-info {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px;
    min-height: 80px;
    font-size: 0.85em;
    color: #fff;
}
.universe-info-title {
    font-weight: 700;
    color: #ffd93d;
    margin-bottom: 4px;
}

/* ===== R1: 首次访问引导 ===== */
.onboard-modal { max-width: 460px; }
.onboard-content {
    min-height: 240px;
    text-align: center;
    padding: 16px 8px;
}
.onboard-step-icon {
    font-size: 3.5em;
    margin-bottom: 10px;
}
.onboard-step-title {
    font-size: 1.3em;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.onboard-step-desc {
    font-size: 0.92em;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
}
.onboard-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 12px 0;
}
.onboard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}
.onboard-dot.active {
    background: #ffd93d;
    width: 24px;
    border-radius: 4px;
}
.onboard-actions {
    display: flex;
    gap: 8px;
}
.onboard-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
}
.onboard-skip { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.onboard-next { background: linear-gradient(135deg, #6c5ce7, #0984e3); }

/* ===== R2: 数据中心 ===== */
.datacenter-modal { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.datacenter-sub {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.datacenter-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.datacenter-stat {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}
.datacenter-stat-num {
    font-size: 1.3em;
    font-weight: 800;
    color: #ffd93d;
}
.datacenter-stat-label {
    font-size: 0.7em;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.datacenter-list {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 8px;
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 12px;
}
.datacenter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.82em;
}
.datacenter-item:last-child { border-bottom: none; }
.datacenter-item-key {
    flex: 1;
    color: rgba(255,255,255,0.8);
    font-family: monospace;
    word-break: break-all;
}
.datacenter-item-size {
    color: rgba(255,255,255,0.5);
    font-size: 0.85em;
    min-width: 60px;
    text-align: right;
}
.datacenter-item-action {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}
.datacenter-actions {
    display: flex;
    gap: 6px;
}
.datacenter-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
}
.datacenter-btn-danger {
    background: rgba(255,107,107,0.2);
    border-color: #ff6b6b;
}

/* ===== I2.2: 题目解析按钮 ===== */
.q-why-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid rgba(108,92,231,0.25);
    color: #a29bfe;
    font-size: 0.78em;
    padding: 5px 12px;
    border-radius: 100px;
    cursor: pointer;
    margin-top: 10px;
    margin-right: 8px;
    transition: all 0.2s;
}
.q-why-btn:hover {
    color: #fff;
    border-color: var(--star-purple);
    background: rgba(108,92,231,0.18);
    transform: translateY(-1px);
}
[data-theme="light"] .q-why-btn {
    color: #6c5ce7;
    border-color: rgba(108,92,231,0.3);
}
[data-theme="light"] .q-why-btn:hover {
    background: rgba(108,92,231,0.1);
}
/* 解析弹窗 */
.why-modal {
    max-width: 480px;
    text-align: left;
}
.why-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.why-modal-side {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--star-purple), #a29bfe);
    color: #fff;
    border-radius: 100px;
    font-size: 0.85em;
    font-weight: 600;
}
.why-modal-section {
    margin-bottom: 12px;
    line-height: 1.6;
}
.why-modal-section-title {
    font-size: 0.85em;
    color: var(--star-purple);
    font-weight: 600;
    margin-bottom: 4px;
}
[data-theme="light"] .why-modal-section-title { color: #6c5ce7; }
.why-modal-section-body {
    font-size: 0.9em;
    color: var(--text-secondary);
}
[data-theme="light"] .why-modal-section-body { color: #2d3436; }
.why-modal-tip {
    background: rgba(253, 203, 110, 0.08);
    border-left: 3px solid #fdcb6e;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.5;
}
[data-theme="light"] .why-modal-tip { color: #636e72; }

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 量表标签行 */
.scale-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 10px;
}

.scale-label-left, .scale-label-right {
    font-size: 0.75em;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.65;
}

/* 水平量表布局 */
.scale-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 4px;
}

/* 选项按钮：统一色调、去五色干扰、放大文字 */
.scale-btn {
    flex: 1;
    max-width: 120px;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
    padding: 12px 6px;
    position: relative;
}
.scale-btn:hover {
    background: rgba(124, 92, 255, 0.14);
    border-color: rgba(124, 92, 255, 0.5);
}
.scale-btn:active {
    transform: scale(0.97);
}
.scale-btn.selected {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(0, 224, 211, 0.30));
    border-color: rgba(124, 92, 255, 0.9);
    box-shadow:
        inset 3px 0 0 0 var(--star-purple),
        inset 0 0 18px rgba(124, 92, 255, 0.25),
        0 4px 18px rgba(124, 92, 255, 0.35);
}
.scale-icon {
    font-size: 1.5em;
    line-height: 1;
}
.scale-text {
    font-size: 0.95em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    line-height: 1.25;
}
.scale-btn.selected .scale-text {
    color: #ffffff;
    font-weight: 600;
}

/* P4-S2: 涟漪效果启用 —— 答题爽感提升 */
.scale-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleExpand 0.6s ease-out;
    pointer-events: none;
}
@keyframes rippleExpand {
    to { transform: scale(4); opacity: 0; }
}

.result-screen {
    padding: 50px 40px;
    scroll-behavior: smooth;
}

.result-hero {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding: 20px;
}

/* A3: 结果页锚点目录 */
/* 结果页"进阶测评"强引导条 */
.next-step-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 6px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(0, 224, 211, 0.12));
    border: 1px solid rgba(124, 92, 255, 0.35);
}
.next-step-cta-text { flex: 1; min-width: 0; }
.next-step-cta-title { font-size: 0.95em; font-weight: 700; color: #fff; margin-bottom: 4px; }
.next-step-cta-sub { font-size: 0.76em; color: rgba(255, 255, 255, 0.6); line-height: 1.5; }
.next-step-cta-btn {
    flex-shrink: 0;
    padding: 11px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #7c5cff, #2d9cff);
    box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.next-step-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(124, 92, 255, 0.45); }
[data-theme="light"] .next-step-cta { background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(0, 200, 190, 0.08)); border-color: rgba(124, 92, 255, 0.28); }
[data-theme="light"] .next-step-cta-title { color: #2d1b6b; }
[data-theme="light"] .next-step-cta-sub { color: rgba(45, 27, 107, 0.62); }
@media (max-width: 420px) {
    .next-step-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .next-step-cta-btn { width: 100%; }
}

.result-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 30px;
    padding: 0 15px;
    max-width: 720px;
}
.anchor-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}
.anchor-chip:hover, .anchor-chip:active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-1px);
}
.result-section[id^="anchor-"] {
    scroll-margin-top: 80px;
}

/* 扎心金句样式 */
.heart-quote-section {
    text-align: center;
    margin: 0 auto 40px auto;
    max-width: 600px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(15px);
    animation: heartQuoteFadeIn 1.2s 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heartQuoteFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.heart-quote-line {
    width: 60px;
    height: 1px;
    margin: 16px auto;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
}

.heart-quote-text {
    font-size: 1.6em;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    background: linear-gradient(135deg, #ffd700, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.6;
    letter-spacing: 1px;
}

.result-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(124, 92, 255, 0.24) 0%, rgba(45, 156, 255, 0.08) 45%, transparent 72%);
    animation: heroGlow 3s ease-in-out infinite;
    pointer-events: none;
}

.result-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.15);
    animation: heroRing 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -55%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -55%) scale(1.1); }
}

@keyframes heroRing {
    0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -55%) scale(1.08); opacity: 0.6; }
}

.result-type {
    font-size: 5em;
    font-weight: 900;
    color: #6c5ce7; /* P5-fix 兜底色：旧 webview 不支持 background-clip:text 时仍可见 */
    background: linear-gradient(
        135deg,
        #6c5ce7 0%,
        #0984e3 30%,
        #00d2d3 50%,
        #0984e3 70%,
        #6c5ce7 100%
    );
    background-size: 300% 300%;
    margin-bottom: 10px;
    letter-spacing: 5px;
    animation: resultReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both, resultTypeFlow 4s ease-in-out infinite;
    cursor: default;
    transition: letter-spacing 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
    filter: drop-shadow(0 0 30px rgba(108, 92, 231, 0.4)) drop-shadow(0 0 60px rgba(0, 210, 211, 0.15));
}
/* P5-fix: 仅在支持 background-clip:text 时启用渐变文字，
   否则保持上方兜底色，避免 -webkit-text-fill-color:transparent 导致型号文字不可见 */
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .result-type {
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

@keyframes resultTypeFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.result-type:hover {
    letter-spacing: 12px;
    filter: brightness(1.2);
}

@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes particleFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

/* P4-S4: 中心爆发动画 */
@keyframes burstOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
        opacity: 0;
    }
}

/* P4-S4: combo 文字弹跳 */
@keyframes comboPop {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* P4-S3: 答题 +1 上浮 */
@keyframes floatUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -80%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}

/* P5-S1: 连击爆发粒子 */
@keyframes comboBurst {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.3); opacity: 0; }
}

/* P5-S1: 里程碑闪光 */
@keyframes milestoneFlash {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* P5-S1: 维度解锁光环 */
@keyframes dimUnlock {
    0% { transform: scale(0.5); opacity: 0; box-shadow: 0 0 0 rgba(255,215,0,0); }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 30px rgba(255,215,0,0.8); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 15px rgba(255,215,0,0.4); }
}

/* P5-S1: 屏幕轻微震动（爽感反馈） */
@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* P5-S1: combo 燃烧效果 */
.combo-burn {
    animation: comboBurnPulse 0.3s ease-in-out infinite;
}
@keyframes comboBurnPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255,107,107,0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(255,200,50,1)); }
}

/* P5-S1: 维度解锁 toast */
.dim-unlock-toast {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, rgba(255,215,0,0.95), rgba(255,159,67,0.95));
    color: #fff;
    padding: 16px 28px;
    border-radius: 16px;
    z-index: var(--z-toast);
    text-align: center;
    box-shadow: 0 8px 40px rgba(255,215,0,0.5);
    pointer-events: none;
    animation: dimUnlockToast 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes dimUnlockToast {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60%) scale(0.9); opacity: 0; }
}
.dim-unlock-emoji { font-size: 2em; margin-bottom: 4px; }
.dim-unlock-title { font-size: 1.1em; font-weight: 700; }
.dim-unlock-sub { font-size: 0.8em; opacity: 0.9; margin-top: 2px; }

/* P4-S4: 结果揭晓闪白 */
@keyframes flashFade {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* P5-S2: 字母逐个揭晓动画
   注意：采用"渐进增强"——字母默认是可见的（防止动画未触发时堆叠/隐形）。
   只有父容器加上 .type-animating 时，字母才先隐藏再由 .revealed 逐个点亮。 */
@keyframes letterReveal {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; filter: blur(10px); }
    60% { transform: scale(1.3) rotate(5deg); opacity: 1; filter: blur(0); }
    100% { transform: scale(1) rotate(0); opacity: 1; filter: blur(0); }
}
.result-type-letter {
    display: inline-block;
    /* 默认可见：即使 JS 动画/定时器未执行，字母也正常并排显示，不会堆叠或消失 */
    opacity: 1;
    transform: none;
}
/* 仅在明确进入动画流程时，才先隐藏等待逐个点亮 */
.type-animating .result-type-letter {
    opacity: 0;
    transform: scale(0);
}
.type-animating .result-type-letter.revealed {
    animation: letterReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-shadow: 0 0 30px rgba(108, 92, 231, 0.8), 0 0 60px rgba(0, 210, 211, 0.4);
}

/* P5-S2: 结果页呼吸光晕 */
@keyframes resultGlow {
    0%, 100% { filter: drop-shadow(0 0 22px rgba(124, 92, 255, 0.55)) drop-shadow(0 0 44px rgba(45, 156, 255, 0.18)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 224, 211, 0.7)) drop-shadow(0 0 70px rgba(255, 209, 102, 0.18)); }
}
.result-hero-glow {
    animation: resultGlow 3s ease-in-out infinite;
}

/* P5-S2: 心形飘动（治愈系） */
@keyframes heartFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 1; }
    100% { transform: translateY(-40px) rotate(-5deg); opacity: 0; }
}

/* P5-S3: 治愈气泡动画 */
@keyframes bubbleRise {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(-200px) scale(1.2); opacity: 0; }
}

/* P5-S3: 拥抱动画（长按反馈） */
@keyframes hugPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.hug-active {
    animation: hugPulse 0.5s ease-in-out infinite;
}

/* P5-S3: 治愈小提示浮层 */
.heal-tip-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: linear-gradient(135deg, rgba(255,182,193,0.95), rgba(255,218,185,0.95));
    color: #5a3e36;
    padding: 14px 24px;
    border-radius: 100px;
    z-index: var(--z-toast);
    text-align: center;
    box-shadow: 0 8px 32px rgba(255,182,193,0.5);
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.9em;
    font-weight: 500;
}
.heal-tip-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.heal-tip-emoji { font-size: 1.3em; margin-right: 6px; }

.result-name {
    font-size: 2em;
    color: white;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-tagline {
    font-size: 1.05em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.score-card {
    padding: 20px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-ring {
    position: relative;
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 8px rgba(108, 92, 231, 0.2));
}

.score-ring svg {
    transform: rotate(-90deg);
    width: 80px;
    height: 80px;
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.score-ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 0 6px rgba(108, 92, 231, 0.5));
}

.score-ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    line-height: 1.2;
}

.ring-letter {
    font-size: 1.3em;
    font-weight: 800;
}

.ring-percent {
    font-size: 0.55em;
    font-weight: 600;
    opacity: 0.7;
}

.score-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    letter-spacing: 1px;
}

.score-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-section {
    margin-bottom: 30px;
    padding: 30px;
    opacity: 0;
    animation: resultSectionSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes resultSectionSlide {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.4em;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-wrap: balance;
}

/* ===== F1: AI 性格评点 ===== */
.ai-evaluation {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(108,92,231,0.10) 0%, rgba(9,132,227,0.10) 50%, rgba(255,107,107,0.08) 100%);
    border: 1px solid rgba(108,92,231,0.25);
}
.ai-evaluation .ai-glow {
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(108,92,231,0.18) 0%, transparent 70%);
    pointer-events: none;
    animation: aiGlowPulse 4s ease-in-out infinite;
}
@keyframes aiGlowPulse {
    0%,100% { transform: scale(1); opacity: 0.7; }
    50%     { transform: scale(1.2); opacity: 1; }
}
.ai-title {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ai-title-icon { font-size: 1.1em; }
.ai-pulse {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 0 0 rgba(167,139,250,0.6);
    animation: aiDotPulse 1.8s ease-out infinite;
    margin-left: auto;
}
@keyframes aiDotPulse {
    0%   { box-shadow: 0 0 0 0 rgba(167,139,250,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(167,139,250,0); }
    100% { box-shadow: 0 0 0 0 rgba(167,139,250,0); }
}
.ai-content { position: relative; z-index: 1; }
.ai-tagline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.ai-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(167,139,250,0.18) 0%, rgba(96,165,250,0.18) 100%);
    border: 1px solid rgba(167,139,250,0.4);
    border-radius: 100px;
    font-size: 0.78em;
    color: #c4b5fd;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.ai-regen {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    font-size: 0.8em;
    padding: 6px 12px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-regen:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.ai-regen:active { transform: translateY(0); }
.ai-interpretations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.ai-dim {
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
.ai-dim-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ai-dim-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95em;
}
.ai-dim-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
.ai-dim-text {
    font-size: 0.88em;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}
.ai-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.ai-keyword {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(108,92,231,0.15) 0%, rgba(9,132,227,0.15) 100%);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 100px;
    font-size: 0.82em;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.ai-contradiction, .ai-monologue, .ai-talent {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border-left: 3px solid #a78bfa;
    border-radius: 0 10px 10px 0;
}
.ai-monologue { border-left-color: #f472b6; background: rgba(244,114,182,0.06); }
.ai-talent    { border-left-color: #60a5fa; background: rgba(96,165,250,0.06); }
.ai-section-label {
    font-size: 0.82em;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.ai-section-text {
    font-size: 0.92em;
    line-height: 1.75;
    color: rgba(255,255,255,0.9);
}
.ai-monologue-text {
    font-size: 1em;
    line-height: 1.85;
    color: rgba(255,255,255,0.95);
    font-style: italic;
    min-height: 1.85em;
}
.ai-monologue-text::after {
    content: '▍';
    color: #f472b6;
    animation: aiBlink 1s steps(2) infinite;
}
@keyframes aiBlink { 50% { opacity: 0; } }
.ai-signature {
    margin-top: 18px;
    padding: 14px;
    text-align: center;
    font-size: 1.05em;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    background: linear-gradient(135deg, rgba(167,139,250,0.10) 0%, rgba(244,114,182,0.10) 100%);
    border-radius: 12px;
    letter-spacing: 1px;
}
.ai-balanced-hint {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    font-size: 0.82em;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    text-align: center;
}
.ai-chip {
    background: linear-gradient(135deg, rgba(167,139,250,0.18) 0%, rgba(96,165,250,0.18) 100%) !important;
    border-color: rgba(167,139,250,0.4) !important;
    color: #c4b5fd !important;
}
@media (max-width: 600px) {
    .ai-interpretations { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-glow, .ai-pulse, .ai-monologue-text::after { animation: none !important; }
}
/* ===== /F1 ===== */

/* ===== G4: 关系矩阵 + Modal ===== */
.section-subtitle {
    font-size: 0.88em;
    color: rgba(255,255,255,0.55);
    margin: -8px 0 18px 0;
}
.matrix-me {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(108,92,231,0.25) 0%, rgba(9,132,227,0.25) 100%);
    border: 1px solid rgba(108,92,231,0.5);
    border-radius: 100px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.matrix-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.matrix-row {
    display: grid;
    grid-template-columns: 60px 1fr 50px 90px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.matrix-row:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}
.matrix-type {
    font-weight: 700;
    color: #fff;
    font-size: 0.95em;
}
.matrix-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.matrix-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #0984e3, #00d2d3);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.matrix-score {
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    font-size: 0.9em;
    text-align: right;
}
.matrix-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    text-align: right;
}
.match-best .matrix-fill      { background: linear-gradient(90deg, #00b894, #00d2d3); }
.match-good .matrix-fill      { background: linear-gradient(90deg, #0984e3, #6c5ce7); }
.match-normal .matrix-fill    { background: linear-gradient(90deg, #fdcb6e, #e17055); }
.match-challenge .matrix-fill { background: linear-gradient(90deg, #d63031, #ff6b6b); }

/* Modal */
.g-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    transition: opacity 0.25s;
    padding: 20px;
    overscroll-behavior: contain;
}
.g-modal-overlay.visible { opacity: 1; }
.g-modal {
    background: linear-gradient(135deg, #1a1a3a 0%, #2a1a4a 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s;
}
.g-modal-overlay.visible .g-modal { transform: scale(1) translateY(0); }
.g-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.g-modal-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #fff;
}
.g-modal-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.g-modal-body { padding: 18px 20px 22px; color: rgba(255,255,255,0.88); }

.match-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.match-detail-title {
    font-size: 1.4em;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.match-detail-score { text-align: right; }
.match-score-num {
    font-size: 2em;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.match-score-label {
    font-size: 0.78em;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}
.match-detail-section { margin-bottom: 14px; }
.match-section-title {
    font-size: 0.88em;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}
.match-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.match-section-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 0.9em;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}
.match-section-list li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: #a78bfa;
}
.match-section-list.warn li::before { color: #ff6b6b; }
.match-detail-diffs {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    font-size: 0.82em;
    color: rgba(255,255,255,0.6);
    text-align: center;
}
/* ===== /G4 ===== */


.section-title::before {
    content: '';
    width: 3px;
    height: 26px;
    background: linear-gradient(180deg, var(--star-purple) 0%, var(--primary-2) 100%);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(124, 92, 255, 0.55);
}

.section-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 2;
    font-size: 1.05em;
}

.traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.trait {
    padding: 10px 20px;
    background: rgba(108, 92, 231, 0.2);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 0.95em;
    opacity: 0;
    animation: traitBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.trait:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.35);
}

@keyframes traitBounce {
    0% {
        opacity: 0;
        transform: scale(0) translateY(10px) rotate(-10deg);
    }
    50% {
        transform: scale(1.2) translateY(-6px) rotate(3deg);
    }
    70% {
        transform: scale(0.95) translateY(2px) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-secondary {
    flex: 1;
    padding: 18px 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(124, 92, 255, 0.14);
    border-color: rgba(124, 92, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-secondary:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.2);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(5px);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    padding: 28px 20px;
    overflow-y: auto;
    animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-title {
    font-size: 2em;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

/* 赞赏弹窗专用 */
#discountCard .modal-title {
    font-size: 1.5em;
    margin-bottom: 16px;
}
.tip-note {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    text-align: center;
    margin-bottom: 16px;
}
.tip-qr-wrap {
    padding: 8px 0;
    text-align: center;
}
.tip-qr-wrap img {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
}
[data-theme="light"] .tip-note {
    color: rgba(26, 31, 54, 0.75) !important;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0 4px;
}

.share-btn {
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 14px;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.share-btn:active {
    transform: scale(0.96);
}

.share-icon {
    font-size: 1.6em;
}

.share-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

.modal-close {
    width: 100%;
    padding: 16px;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: white;
}

/* ===== H4: 16型档案弹窗 ===== */
.modal-close[onclick^="closeModal"] {
    position: absolute;
    top: 8px;
    right: 12px;
    width: auto;
    padding: 6px 12px;
    font-size: 1.5em;
    line-height: 1;
}
.profile-modal {
    max-width: 680px !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 26px;
    position: relative;
}
.profile-modal::-webkit-scrollbar { width: 6px; }
.profile-modal::-webkit-scrollbar-thumb { background: var(--star-purple); border-radius: 3px; }
.profile-header {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px dashed rgba(255,255,255,0.12);
}
[data-theme="light"] .profile-header { border-bottom-color: rgba(0,0,0,0.08); }
.profile-emoji { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.profile-type {
    font-size: 42px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}
.profile-nickname {
    font-size: 1.1em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}
[data-theme="light"] .profile-nickname { color: var(--text-secondary); }
.profile-nickname-en {
    font-size: 0.85em;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
}
[data-theme="light"] .profile-nickname-en { color: var(--text-muted); }
.profile-overview {
    font-size: 1.05em;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    padding: 12px 16px;
    background: rgba(108,92,231,0.08);
    border-left: 3px solid var(--star-purple);
    border-radius: 4px;
    margin: 16px 0;
}
[data-theme="light"] .profile-overview { color: var(--text-primary); background: rgba(108,92,231,0.06); }
.profile-section {
    margin: 18px 0;
}
.profile-section-title {
    font-size: 1em;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
[data-theme="light"] .profile-section-title { color: var(--text-primary); }
.profile-list { list-style: none; padding: 0; margin: 0; }
.profile-list li {
    padding: 6px 0 6px 18px;
    color: rgba(255,255,255,0.75);
    position: relative;
    line-height: 1.6;
}
[data-theme="light"] .profile-list li { color: var(--text-secondary); }
.profile-list li::before {
    content: '·';
    position: absolute;
    left: 4px;
    color: var(--star-purple);
    font-weight: 900;
    font-size: 1.4em;
    line-height: 1;
}
.profile-strengths li::before { content: '✓'; color: #00b894; font-size: 0.95em; top: 7px; }
.profile-blindspots li::before { content: '⚠'; color: #fdcb6e; font-size: 0.85em; top: 7px; }
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.profile-tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.82em;
    background: rgba(108,92,231,0.15);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(108,92,231,0.3);
}
[data-theme="light"] .profile-tag { color: var(--text-primary); }
.profile-matches {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-match-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
}
[data-theme="light"] .profile-match-row { background: rgba(0,0,0,0.04); }
.profile-match-label { font-size: 0.85em; color: rgba(255,255,255,0.6); min-width: 80px; }
[data-theme="light"] .profile-match-label { color: var(--text-muted); }
.profile-match-types { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-type-chip {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 700;
    background: rgba(108,92,231,0.2);
    color: rgba(255,255,255,0.95);
    cursor: pointer;
    transition: all 0.2s;
}
.profile-type-chip:hover { background: var(--star-purple); transform: scale(1.05); }
[data-theme="light"] .profile-type-chip { color: var(--text-primary); }
.profile-fame { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-fame-item {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,140,0,0.1));
    border: 1px solid rgba(255,215,0,0.25);
    border-radius: 100px;
    font-size: 0.88em;
    color: rgba(255,215,0,0.95);
}
[data-theme="light"] .profile-fame-item { color: #b8860b; }
.profile-detail-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    color: rgba(255,255,255,0.85);
    font-size: 0.88em;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-detail-btn:hover {
    background: rgba(108,92,231,0.2);
    border-color: var(--star-purple);
    transform: translateY(-1px);
}

/* ========== I1: 测试历史记录样式 ========== */
.history-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px auto 0;
    padding: 10px 18px;
    background: rgba(108,92,231,0.12);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 20px;
    color: #a29bfe;
    font-size: 0.92em;
    cursor: pointer;
    transition: all 0.2s;
}
.history-btn:hover {
    background: rgba(108,92,231,0.22);
    transform: translateY(-1px);
}
[data-theme="light"] .history-btn {
    color: #6c5ce7;
    background: rgba(108,92,231,0.08);
}
.history-badge {
    background: var(--star-purple);
    color: #fff;
    font-size: 0.75em;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.history-modal {
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px 18px 18px;
}
.history-subtitle {
    font-size: 0.82em;
    color: var(--text-secondary);
    text-align: center;
    margin: -8px 0 14px;
    opacity: 0.8;
}
[data-theme="light"] .history-subtitle { color: #636e72; }
.history-empty {
    text-align: center;
    padding: 30px 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}
.history-empty-icon { font-size: 2.4em; margin-bottom: 8px; }
.history-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.history-item:hover {
    background: rgba(108,92,231,0.1);
    border-color: rgba(108,92,231,0.3);
}
.history-item.selected {
    background: rgba(108,92,231,0.18);
    border-color: var(--star-purple);
}
[data-theme="light"] .history-item {
    background: rgba(255,255,255,0.7);
    border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .history-item:hover {
    background: rgba(108,92,231,0.08);
}
.history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.history-item-type {
    font-size: 1.15em;
    font-weight: 700;
    color: #a29bfe;
}
[data-theme="light"] .history-item-type { color: #6c5ce7; }
.history-item-time {
    font-size: 0.78em;
    color: var(--text-secondary);
    opacity: 0.85;
}
.history-item-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.history-item-tag {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
}
.history-item-tag.paid { background: rgba(253,203,110,0.18); color: #fdcb6e; }
.history-item-tag.free { background: rgba(116,185,255,0.16); color: #74b9ff; }
.history-dim-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.history-dim-bar {
    text-align: center;
    font-size: 0.72em;
    color: var(--text-secondary);
}
.history-dim-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
    position: relative;
}
[data-theme="light"] .history-dim-bar-track { background: rgba(0,0,0,0.06); }
.history-dim-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple), #a29bfe);
    border-radius: 3px;
}
.history-dim-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    margin-bottom: 2px;
}
.history-dim-bar-side {
    font-weight: 600;
    color: #a29bfe;
}
[data-theme="light"] .history-dim-bar-side { color: #6c5ce7; }
.history-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
[data-theme="light"] .history-actions { border-top-color: rgba(0,0,0,0.08); }
.history-actions button {
    flex: 1;
    min-width: 90px;
    padding: 8px 10px;
    font-size: 0.85em;
    border-radius: 14px;
}
.history-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn-danger-soft {
    background: rgba(214, 48, 49, 0.12);
    border: 1px solid rgba(214, 48, 49, 0.3);
    color: #ff7675;
}
.btn-danger-soft:hover {
    background: rgba(214, 48, 49, 0.2);
}
.history-compare-panel {
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.25);
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
}
.history-compare-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #a29bfe;
}
[data-theme="light"] .history-compare-title { color: #6c5ce7; }
.history-compare-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85em;
}
.history-compare-label { color: var(--text-secondary); }
.history-compare-val {
    padding: 4px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}
[data-theme="light"] .history-compare-val { background: rgba(0,0,0,0.04); }
.history-compare-delta {
    color: #fdcb6e;
    font-size: 0.78em;
    text-align: center;
    margin-top: 2px;
}
.history-compare-delta.match { color: #00b894; }
.history-compare-delta.diff { color: #ff7675; }
.modal-close-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    font-size: 0.92em;
}
.modal-close-btn:hover { background: rgba(255,255,255,0.1); }
[data-theme="light"] .modal-close-btn {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
.history-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(214,48,49,0.2);
    color: #ff7675;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}
.history-item:hover .history-item-delete { opacity: 1; }
.history-item-delete:hover { background: rgba(214,48,49,0.4); }

.blur-overlay {
    position: relative;
    overflow: hidden;
}

.blur-overlay > * {
    filter: blur(12px);
    user-select: none;
    pointer-events: none;
}

.blur-overlay::after {
    content: '';
    display: none;
    font-size: 1.2em;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(10, 22, 40, 0.7) 0%, rgba(10, 22, 40, 0.97) 40%);
    backdrop-filter: blur(6px);
    z-index: 1;
}

.unlock-btn-container {
    position: relative;
    z-index: 2;
    margin-top: -60px;
    margin-bottom: 30px;
    text-align: center;
}

.pre-unlock-hint {
    text-align: center;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.pre-unlock-hint.show {
    opacity: 1;
    transform: translateY(0);
}
.pre-unlock-hint .hint-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}
.pre-unlock-hint .hint-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.pre-unlock-hint .hint-desc {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* 第四批-1：免费/VIP 分界锚点样式 */
.vip-divide-anchor {
    text-align: center;
    margin: 24px auto 16px;
    max-width: 540px;
    padding: 0 16px;
}
.vip-divide-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--star-purple), var(--ocean-blue), transparent);
    margin-bottom: 16px;
    opacity: 0.6;
}
.vip-divide-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.95em;
    margin-bottom: 14px;
}
.vip-divide-free {
    color: var(--text-muted);
    font-weight: 600;
}
.vip-divide-arrow {
    color: var(--star-purple);
    font-size: 1.2em;
    animation: vipArrowBounce 1.6s ease-in-out infinite;
}
@keyframes vipArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}
.vip-divide-vip {
    color: var(--gold);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
.vip-divide-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.perk-chip {
    font-size: 0.8em;
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 999px;
    color: var(--text-secondary);
}
[data-theme="light"] .vip-divide-free { color: var(--text-muted); }
[data-theme="light"] .vip-divide-vip { color: #b8860b; text-shadow: none; }
[data-theme="light"] .perk-chip {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-secondary);
}

.btn-unlock {
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
    animation: unlockPulse 2s ease-in-out infinite;
}

@keyframes unlockPulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4), 0 0 0 0 rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5), 0 0 0 14px rgba(255, 107, 107, 0);
    }
}

.btn-unlock::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: unlockShimmer 2.5s ease-in-out infinite;
}

@keyframes unlockShimmer {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

.btn-unlock:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.5);
}

.btn-unlock:active {
    transform: translateY(-1px) scale(0.97);
}

.payment-modal {
    text-align: center;
    max-width: min(360px, calc(100vw - 32px)) !important;
    padding: 28px 22px !important;
    position: relative;
}

.payment-modal .modal-title {
    font-size: 1.4em;
    margin-bottom: 8px;
}

.payment-modal .price-display {
    font-size: 2.2em;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 6px 0 2px;
}

.payment-modal .price-anchor {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
}

.payment-modal .qrcode-container {
    margin: 6px auto 12px;
}

.payment-modal .qrcode-container img,
.payment-modal .qrcode-placeholder {
    width: min(240px, 70vw) !important;
    min-width: min(240px, 70vw) !important;
    height: min(240px, 70vw) !important;
    min-height: min(240px, 70vw) !important;
}

.payment-modal .payment-hint {
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.65);
    margin: 8px 0 14px;
}

.payment-modal .btn-paid {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.05em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #00b894 0%, #00d2d3 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.35);
    margin-bottom: 10px;
}

.payment-modal .btn-paid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 184, 148, 0.5);
}

.payment-modal .btn-paid:active {
    transform: scale(0.97);
}

.payment-modal .modal-close-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.4em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.payment-modal .modal-close-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88em;
    padding: 6px 12px;
    cursor: pointer;
}

.price-display {
    font-size: 2.8em;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0 5px;
}

.price-anchor {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.order-id-display {
    margin: 16px auto;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    text-align: center;
}

.order-id-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.order-id-code {
    font-size: 2em;
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: orderIdPulse 2s ease-in-out infinite;
}

@keyframes orderIdPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.order-id-hint {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
    line-height: 1.5;
}

.unlock-code-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 16px;
}

.unlock-code-title {
    font-size: 1em;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-align: center;
}

.unlock-input-row {
    display: flex;
    gap: 10px;
}

.unlock-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.unlock-input:focus-visible {
    border-color: var(--star-purple);
    outline: 2px solid var(--star-purple);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.unlock-input::placeholder {
    letter-spacing: 2px;
    font-weight: 400;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.3);
}

.btn-unlock-submit {
    padding: 14px 24px;
    font-size: 1em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--star-purple), var(--ocean-blue));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-unlock-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-unlock-submit:active {
    transform: scale(0.96);
}

.tip-btn {
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 25px;
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.tip-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.06);
}
.tip-btn:active {
    transform: scale(0.95);
}

.payment-steps {
    margin: 16px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-align: left;
}

.payment-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.payment-step:last-child {
    margin-bottom: 0;
}

.step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--star-purple), var(--ocean-blue));
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-container {
    background: white;
    padding: 24px;
    border-radius: 20px;
    margin: 20px auto;
    display: inline-block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 支付链接按钮样式 */
.pay-link-container {
    text-align: center;
    padding: 20px;
}

.pay-link-title {
    font-size: 16px;
    color: var(--text-primary, rgba(255, 255, 255, 0.9));
    margin-bottom: 20px;
}

.pay-link-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pay-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.pay-link-tip {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

.qrcode-placeholder {
    width: 240px;
    min-width: 240px;
    height: 240px;
    min-height: 240px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
    border-radius: 12px;
}

.qrcode-img {
    width: 240px;
    min-width: 240px;
    height: 240px;
    min-height: 240px;
    border-radius: 12px;
}

/* 第二批：首页"探索更多"折叠区样式 */
.explore-toggle {
    margin: 16px auto 8px;
    padding: 10px 20px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.95em;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.explore-toggle:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--star-purple);
    color: var(--text-primary);
}
.explore-toggle .explore-arrow {
    display: inline-block;
    transition: transform 0.2s;
    margin-left: 4px;
}
.explore-toggle.expanded .explore-arrow {
    transform: rotate(180deg);
}
.explore-more {
    animation: exploreExpand 0.3s ease;
}
@keyframes exploreExpand {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
[data-theme="light"] .explore-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
}
[data-theme="light"] .explore-toggle:hover {
    background: rgba(108, 92, 231, 0.1);
}

/* 首页功能分组样式 */
.feature-group {
    margin-bottom: 20px;
}
.feature-group:last-child {
    margin-bottom: 0;
}
.feature-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.6));
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px;
}
.feature-group-title .icon {
    font-size: 1.1em;
}
.feature-group-desc {
    font-size: 0.75em;
    font-weight: 400;
    color: var(--text-muted, rgba(255,255,255,0.4));
    margin-left: 4px;
}
.feature-group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}
.feature-group-buttons .btn-secondary {
    flex: 0 0 auto;
    min-width: 0;
}
/* 移动端适配 */
@media (max-width: 480px) {
    .feature-group-buttons {
        gap: 6px;
    }
    .feature-group-buttons .btn-secondary {
        padding: 8px 10px;
        font-size: 0.8em;
    }
}

.payment-tips {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    line-height: 1.8;
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.payment-tips .alipay-icon {
    color: #1677ff;
    font-weight: 700;
}

/* 支付弹窗信任标识样式 */
.payment-trust-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.payment-trust-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.payment-trust-badge .icon {
    font-size: 0.9em;
}
/* 支付流程说明 */
.payment-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
}
.payment-steps .step {
    display: flex;
    align-items: center;
    gap: 4px;
}
.payment-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: 600;
}
.payment-steps .arrow {
    color: rgba(255, 255, 255, 0.3);
}
/* 退款说明弹窗样式 */
.refund-info-modal {
    max-width: 340px !important;
    padding: 24px 20px !important;
}
.refund-info-modal .modal-title {
    font-size: 1.1em;
    margin-bottom: 12px;
}
.refund-info-content {
    font-size: 0.9em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}
.refund-info-content p {
    margin-bottom: 10px;
}
.refund-info-content .highlight {
    color: #ffd700;
    font-weight: 600;
}
.refund-info-content .warning {
    color: #ff6b6b;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 0.95em;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    pointer-events: auto;
    text-align: center;
    max-width: 90vw;
}

.toast.success {
    background: rgba(0, 184, 148, 0.9);
    border: 1px solid rgba(0, 184, 148, 0.5);
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.3);
}

.toast.info {
    background: rgba(108, 92, 231, 0.9);
    border: 1px solid rgba(108, 92, 231, 0.5);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.toast.warning {
    background: rgba(255, 165, 89, 0.9);
    border: 1px solid rgba(255, 165, 89, 0.5);
    box-shadow: 0 8px 24px rgba(255, 165, 89, 0.3);
}

.toast.error {
    background: rgba(232, 67, 80, 0.95);
    border: 1px solid rgba(214, 48, 49, 0.6);
    box-shadow: 0 8px 24px rgba(214, 48, 49, 0.35);
    color: #fff;
}

.toast.leaving {
    animation: toastOut 0.3s ease both;
}

@keyframes toastIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 答题导航按钮 */
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-nav {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.05em;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-nav-prev {
    background: var(--surface-1);
}

.btn-nav-prev:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: var(--surface-border);
}

.btn-nav-prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-nav-next {
    background: rgba(108, 92, 231, 0.3);
    border-color: rgba(108, 92, 231, 0.5);
}

.btn-nav-next:hover:not(:disabled) {
    background: rgba(108, 92, 231, 0.5);
}

.btn-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 恢复进度弹窗 */
.resume-modal-body {
    text-align: center;
}

.resume-modal-body p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

.resume-progress-text {
    font-size: 2em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.resume-buttons {
    display: flex;
    gap: 12px;
}

.btn-resume {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.05em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

/* 双题库选项卡 */
.test-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* 社会证明 + 隐私承诺 行 */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    align-items: center;
    margin-bottom: 26px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}
.trust-row .trust-item { white-space: nowrap; }
.trust-row strong { color: var(--star-purple, #a29bfe); font-weight: 700; }
[data-theme="light"] .trust-row { color: rgba(40, 30, 80, 0.6); }
[data-theme="light"] .trust-row strong { color: #6c5ce7; }

/* 隐私承诺 / 免责声明 */
.privacy-note, .disclaimer-note {
    font-size: 0.75em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.45);
    margin: 14px auto 0;
    max-width: 420px;
    text-align: center;
}
.disclaimer-note {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.32);
    margin-top: 6px;
}
[data-theme="light"] .privacy-note { color: rgba(40, 30, 80, 0.55); }
[data-theme="light"] .disclaimer-note { color: rgba(40, 30, 80, 0.42); }

.test-tab {
    flex: 1;
    padding: 18px 16px;
    font-size: 1em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.02);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.test-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--star-purple) 0%, var(--ocean-blue) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.test-tab.active::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00e0d3, #ffffff, #00e0d3, transparent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 224, 211, 0.6);
}

.test-tab.vip-tab {
    position: relative;
}

.test-tab.vip-tab.locked {
    cursor: pointer;
}

.test-tab.vip-tab.unlocked {
    cursor: pointer;
}

.vip-badge {
    display: inline-block;
    font-size: 0.65em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 700;
}

.vip-badge.locked {
    background: rgba(255, 215, 0, 0.2);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.vip-badge.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    animation: vipBadgeShimmer 3s ease-in-out infinite;
}

@keyframes vipBadgeShimmer {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

.vip-badge.unlocked {
    background: rgba(0, 210, 211, 0.2);
    color: #00d2d3;
    border: 1px solid rgba(0, 210, 211, 0.3);
}

/* 结果页亚型遮罩 */
.subtype-blur {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.subtype-lock-hint {
    text-align: center;
    padding: 12px;
    color: var(--gold);
    font-size: 0.9em;
    font-weight: 600;
}

.retake-card {
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(108, 92, 231, 0.08) 100%);
    animation: retakeSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes retakeSlide {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== I3: 准度评分卡 ========== */
.accuracy-card {
    margin-top: 30px;
    padding: 24px 22px;
    text-align: center;
}
.accuracy-header {
    margin-bottom: 18px;
}
.accuracy-title {
    font-size: 1.15em;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}
[data-theme="light"] .accuracy-title { color: #2d3436; }
.accuracy-subtitle {
    font-size: 0.85em;
    color: var(--text-secondary);
    opacity: 0.85;
}
.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}
.star-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.2);
    font-size: 2.2em;
    cursor: pointer;
    padding: 0 4px;
    transition: all 0.15s;
    line-height: 1;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.active,
.star-btn.hovered {
    color: #fdcb6e;
    text-shadow: 0 0 12px rgba(253, 203, 110, 0.6);
}
.star-btn.active {
    animation: starPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
[data-theme="light"] .star-btn { color: rgba(0,0,0,0.15); }
.star-rating-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 14px;
    min-height: 1.4em;
    opacity: 0.9;
}
.accuracy-comment-row {
    margin: 12px 0 14px;
}
.accuracy-comment-row textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 10px 12px;
    color: inherit;
    font-size: 0.88em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
[data-theme="light"] .accuracy-comment-row textarea {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}
.accuracy-submit-btn {
    background: linear-gradient(135deg, var(--star-purple), #a29bfe);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.92em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.accuracy-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.accuracy-submit-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}
.accuracy-thanks {
    margin-top: 14px;
    padding: 10px;
    background: rgba(0, 184, 148, 0.12);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: 8px;
    color: #00b894;
    font-size: 0.9em;
}
.accuracy-report {
    margin-top: 18px;
    padding: 16px 14px;
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.25);
    border-radius: 12px;
    text-align: left;
}
.accuracy-report-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #a29bfe;
    margin-bottom: 10px;
    text-align: center;
}
[data-theme="light"] .accuracy-report-title { color: #6c5ce7; }
.accuracy-report-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85em;
    color: var(--text-secondary);
}
.accuracy-report-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    margin: 0 10px;
    overflow: hidden;
}
[data-theme="light"] .accuracy-report-bar { background: rgba(0,0,0,0.06); }
.accuracy-report-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple), #a29bfe);
    border-radius: 3px;
}
.accuracy-report-avg {
    font-size: 1.4em;
    font-weight: 700;
    color: #fdcb6e;
    text-align: center;
    margin: 4px 0 6px;
}
.accuracy-report-meta {
    font-size: 0.78em;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.7;
    margin-top: 8px;
}

/* 测评版本标签 */
.version-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    margin-bottom: 15px;
}

.version-tag.free {
    background: rgba(108, 92, 231, 0.2);
    color: var(--star-purple);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.version-tag.vip {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: vipPulse 2s ease-in-out infinite;
}

@keyframes vipPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.15); }
}

@media (max-width: 768px) {
    .home-title {
        font-size: 2.2em;
        letter-spacing: 1px;
    }

    .home-subtitle {
        font-size: 1.2em;
    }

    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .info-item {
        padding: 16px 10px;
    }

    .info-number {
        font-size: 1.8em;
    }

    /* 第三批-2：移动端字号提升，避免眯眼 */
    .info-label {
        font-size: 0.95em;
    }

    .result-type {
        font-size: 3.5em;
        letter-spacing: 3px;
    }

    .result-name {
        font-size: 1.5em;
    }

    .scores-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .score-ring {
        width: 64px;
        height: 64px;
    }

    .score-ring svg {
        width: 64px;
        height: 64px;
    }

    .ring-letter {
        font-size: 1.1em;
    }

    .ring-percent {
        font-size: 0.5em;
    }

    .btn-group {
        flex-direction: column;
    }

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

    .question-text {
        font-size: 1.2em;
        line-height: 1.6;
    }

    .scale-row {
        gap: 6px;
    }

    .scale-btn {
        min-height: 60px;
        padding: 8px 2px;
        border-radius: 12px;
    }

    .scale-icon {
        font-size: 1.1em;
    }

    .scale-text {
        font-size: 0.55em;
    }

    .home-screen {
        padding: 30px 20px;
    }

    .result-screen {
        padding: 24px 16px;
    }

    .result-section {
        padding: 20px 16px;
    }

    .section-title {
        font-size: 1.2em;
    }

    .nav-buttons {
        gap: 8px;
    }

    .btn-nav {
        padding: 14px 16px;
        font-size: 0.95em;
    }

    .btn-primary {
        padding: 18px 30px;
        font-size: 1.15em;
        border-radius: 14px;
    }

    .btn-unlock {
        padding: 16px 30px;
        font-size: 1.05em;
    }

    .modal {
        padding: 28px 20px;
    }

    .modal-title {
        font-size: 1.6em;
    }

    .test-tabs {
        border-radius: 12px;
    }

    .test-tab {
        padding: 14px 10px;
        font-size: 0.9em;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
        border-radius: 24px;
        margin-bottom: 20px;
    }

    .logo-icon::before {
        border-radius: 28px;
    }

    .logo-icon::after {
        border-radius: 34px;
    }

    .intro-text {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .qrcode-container {
        padding: 16px;
    }

    .qrcode-placeholder, .qrcode-img {
        width: 240px;
        min-width: 240px;
        height: 240px;
        min-height: 240px;
    }

    .trait {
        padding: 8px 14px;
        font-size: 0.85em;
    }

    .dimension-steps {
        flex-wrap: wrap;
        gap: 4px;
    }

    .dimension-steps::before {
        display: none;
    }

    .dim-step {
        font-size: 0.6em;
        padding: 2px 6px;
    }

    .dim-step::before {
        display: none;
    }
}

@media (max-width: 400px) {
    .home-title {
        font-size: 1.8em;
    }

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

    .scale-btn {
        min-height: 54px;
        padding: 6px 2px;
    }

    .scale-text {
        font-size: 0.5em;
    }

    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .info-number {
        font-size: 1.5em;
    }

    .info-label {
        font-size: 0.7em;
    }
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(108, 92, 231, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    z-index: var(--z-sticky);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: rgba(108, 92, 231, 0.8);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.5);
}

.scroll-top-btn:active {
    transform: scale(0.95);
}

/* 无障碍：减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        animation-delay: 0ms !important;
    }
    body {
        background-size: 100% 100%;
        animation: none;
    }
    .home-title {
        -webkit-text-fill-color: var(--light-silver);
        background: none;
        animation: none;
        filter: none;
    }
    .screen {
        filter: none;
    }
    .result-type {
        filter: none;
    }
    .scroll-top-btn { display: none !important; }
}

/* A5: 性能模式：用户主动开启，关掉所有粒子/装饰动画 */
body.perf-mode * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}
body.perf-mode .bg-particles,
body.perf-mode .floating-particle,
body.perf-mode [class*="particle"] {
    display: none !important;
}
body.perf-mode .glass-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(20, 30, 50, 0.85) !important;
}
body.perf-mode .blur-overlay,
body.perf-mode .modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* A5: 性能模式开关 UI */
.perf-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    font-size: 0.9em;
}
.perf-label {
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.perf-hint {
    font-size: 0.85em;
    color: rgba(255,255,255,0.45);
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    transition: 0.3s;
}
.switch .slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.switch input:checked + .slider {
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    border-color: transparent;
}
.switch input:checked + .slider::before {
    transform: translateX(20px) translateY(-50%);
}

/* ===== B1: 开发者模式 ===== */
.logo-icon {
    cursor: default;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.2s;
}
.logo-icon.dev-pressing {
    transform: scale(0.85);
}
.dev-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(20,20,40,0.98), rgba(10,10,30,0.98));
    border: 1px solid rgba(108,92,231,0.4);
    border-radius: 16px;
    padding: 20px;
    color: #e0e0ff;
    z-index: var(--z-modal);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(108,92,231,0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    font-family: 'SF Mono', Consolas, Monaco, monospace;
}
.dev-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
.dev-panel-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #00d2d3;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(108,92,231,0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dev-panel-close {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
}
.dev-panel-close:hover {
    background: rgba(255,255,255,0.1);
}
.dev-section {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(108,92,231,0.08);
    border-radius: 8px;
    border-left: 3px solid #6c5ce7;
}
.dev-section-title {
    font-size: 0.8em;
    color: #6c5ce7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 700;
}
.dev-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    padding: 3px 0;
    color: rgba(224,224,255,0.85);
}
.dev-row-value {
    color: #00d2d3;
    font-weight: 600;
}
.dev-action {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 6px;
    transition: transform 0.15s;
}
.dev-action:hover { transform: translateY(-1px); }
.dev-action:active { transform: translateY(0); }
.dev-action.danger {
    background: linear-gradient(135deg, #e84393, #fd79a8);
}
.dev-action.warn {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: #1a1a2e;
}

/* ===== B2: 字体大小缩放 ===== */
html.font-small { font-size: 14px; }
html.font-normal { font-size: 16px; }
html.font-large { font-size: 18px; }
html.font-xlarge { font-size: 20px; }
/* P2-E: 新增 xxlarge 档,服务视障/老年用户 */
html.font-xxlarge { font-size: 22px; }
.font-scale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 4px 6px;
    margin-left: 8px;
}
.font-scale-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.font-scale-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.font-scale-btn.active {
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.35), 0 2px 8px rgba(108, 92, 231, 0.25);
}
.font-scale-divider {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.15);
    margin: 0 2px;
}

/* ===== B3: CSS 身份证模板（高保真版） ===== */
.idcard-css {
    width: 750px;
    height: 1000px;
    background: linear-gradient(180deg, #0a1628 0%, #1a0a3e 30%, #0c2461 70%, #0a1628 100%);
    color: #fff;
    font-family: 'Noto Sans SC', sans-serif;
    position: relative;
    overflow: hidden;
    padding: 60px 70px;
    box-sizing: border-box;
}
.idcard-css::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 25% 30%, rgba(108,92,231,0.18) 0%, transparent 35%),
        radial-gradient(circle at 75% 70%, rgba(9,132,227,0.12) 0%, transparent 30%);
    pointer-events: none;
}
.idcard-css::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
.idcard-css > * { position: relative; z-index: 2; }
.idcard-line-top {
    position: absolute;
    top: 60px;
    left: 100px;
    right: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.8), transparent);
    z-index: 3;
}
.idcard-line-bottom {
    position: absolute;
    bottom: 60px;
    left: 100px;
    right: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.8), transparent);
    z-index: 3;
}
.idcard-type {
    text-align: center;
    font-size: 100px;
    font-weight: 900;
    margin: 60px 0 0;
    letter-spacing: 8px;
    text-shadow: 0 4px 30px rgba(108,92,231,0.6);
}
.idcard-name {
    text-align: center;
    font-size: 38px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-top: 10px;
}
.idcard-tagline {
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    margin-top: 12px;
    line-height: 1.5;
}
.idcard-animal-emoji {
    text-align: center;
    font-size: 110px;
    margin-top: 40px;
    filter: drop-shadow(0 6px 20px rgba(0,210,211,0.4));
}
.idcard-animal-name {
    text-align: center;
    font-size: 26px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}
.idcard-quote {
    text-align: center;
    font-size: 26px;
    font-weight: 400;
    font-style: italic;
    color: rgba(255,215,0,0.9);
    margin-top: 30px;
    line-height: 1.6;
    padding: 0 30px;
}
.idcard-superpower {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: rgba(0,210,211,0.95);
    margin-top: 30px;
}
.idcard-traits {
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-top: 14px;
    line-height: 1.5;
}
.idcard-divider {
    margin: 40px auto 0;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.5), transparent);
}
.idcard-footer {
    position: absolute;
    bottom: 110px;
    left: 0;
    right: 0;
    text-align: center;
}
.idcard-brand {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}
.idcard-slogan {
    font-size: 22px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
}
.idcard-url {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
    letter-spacing: 0.5px;
}
.idcard-stamp {
    position: absolute;
    bottom: 90px;
    right: 80px;
    width: 90px;
    height: 90px;
    border: 3px solid rgba(232,67,147,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: rgba(232,67,147,0.85);
    transform: rotate(-15deg);
    line-height: 1.1;
    text-align: center;
    z-index: 4;
}
.idcard-render-zone {
    position: fixed;
    top: -10000px;
    left: -10000px;
    pointer-events: none;
}

/* ===== 匹配预览横幅 ===== */
.match-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-sticky);
    background: linear-gradient(135deg, #6c5ce7, #e84393, #0984e3);
    background-size: 200% 200%;
    animation: matchBannerGradient 4s ease infinite;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}
@keyframes matchBannerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.match-banner-text { flex: 1; text-align: center; }
.match-banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.match-banner-close:hover { background: rgba(255,255,255,0.35); }

/* ===== 匹配小卡片 ===== */
.match-card {
    margin-top: 20px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    text-align: center;
}
.match-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff6b9d, #c44dff, #0984e3, #ff6b9d);
    background-size: 300% 300%;
    animation: matchCardBorder 4s ease infinite;
    z-index: -1;
}
@keyframes matchCardBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.match-card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.match-card-percent {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b9d, #c44dff, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* ===== C1: 配对详情 ===== */
.match-detail-section {
    margin-top: 18px;
    text-align: left;
}
.match-tag {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    border-radius: 100px;
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}
.match-dim-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.9em;
}
.match-dim-label {
    width: 40px;
    color: rgba(255,255,255,0.6);
    font-weight: 700;
}
.match-dim-pair {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.match-dim-you {
    color: #00d2d3;
    font-weight: 700;
}
.match-dim-them {
    color: #e84393;
    font-weight: 700;
}
.match-dim-vs {
    color: rgba(255,255,255,0.4);
    font-size: 0.8em;
}
.match-dim-icon {
    margin-left: auto;
    font-size: 1.2em;
}
.match-strengths {
    margin-top: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(0,210,211,0.1), rgba(108,92,231,0.1));
    border-radius: 10px;
    border-left: 3px solid #00d2d3;
}
.match-strengths-title {
    font-size: 0.85em;
    font-weight: 700;
    color: #00d2d3;
    margin-bottom: 6px;
}
.match-strengths-text {
    font-size: 0.88em;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}
.match-warnings {
    margin-top: 10px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(253,203,110,0.1), rgba(225,112,85,0.1));
    border-radius: 10px;
    border-left: 3px solid #fdcb6e;
}
.match-warnings-title {
    font-size: 0.85em;
    font-weight: 700;
    color: #fdcb6e;
    margin-bottom: 6px;
}
.match-warnings-text {
    font-size: 0.88em;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

/* ===== D1: 赞赏支持弹窗 ===== */
.discount-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.discount-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.discount-card {
    background: linear-gradient(135deg, #1a0a3e 0%, #6c5ce7 50%, #e84393 100%);
    border-radius: 20px;
    padding: 30px 26px 26px;
    width: 100%;
    max-width: 360px;
    color: #fff;
    text-align: center;
    position: relative;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(232, 67, 147, 0.4);
    overflow: hidden;
}
.discount-modal.active .discount-card {
    transform: scale(1);
}
.discount-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: discountShine 4s linear infinite;
    pointer-events: none;
}
@keyframes discountShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.discount-burst {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffd700;
    color: #1a0a3e;
    padding: 6px 12px;
    border-radius: 0 0 0 20px;
    font-size: 0.75em;
    font-weight: 900;
    transform: rotate(8deg);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}
.discount-title {
    font-size: 1.6em;
    font-weight: 900;
    margin: 0 0 6px;
    position: relative;
}
.discount-subtitle {
    font-size: 0.95em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 18px;
    position: relative;
}
.discount-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
    position: relative;
}
.discount-price-old {
    font-size: 1.4em;
    color: rgba(255,255,255,0.5);
    text-decoration: line-through;
}
.discount-price-new {
    font-size: 2.6em;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 2px 12px rgba(255,215,0,0.5);
}
.discount-features {
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0 18px;
    text-align: left;
    position: relative;
}
.discount-features li {
    list-style: none;
    padding: 4px 0;
    font-size: 0.88em;
    color: rgba(255,255,255,0.9);
}
.discount-features li::before {
    content: '✓';
    color: #00d2d3;
    font-weight: 900;
    margin-right: 8px;
}
.discount-timer {
    display: inline-block;
    background: rgba(0,0,0,0.4);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85em;
    font-weight: 700;
    margin: 8px 0 16px;
    position: relative;
}
.discount-timer-num {
    color: #ffd700;
    font-variant-numeric: tabular-nums;
}
.discount-cta {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ff9f43 100%);
    color: #1a0a3e;
    font-weight: 900;
    font-size: 1.1em;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transition: transform 0.15s;
    position: relative;
}
.discount-cta:hover { transform: translateY(-2px); }
.discount-cta:active { transform: translateY(0); }
.discount-dismiss {
    margin-top: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.85em;
    cursor: pointer;
    text-decoration: underline;
    position: relative;
}

/* ===== D2: 推荐有礼 ===== */
.referral-card {
    margin-top: 20px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(0,210,211,0.12) 0%, rgba(108,92,231,0.12) 100%);
    border: 1.5px dashed rgba(0,210,211,0.4);
    border-radius: 16px;
    text-align: center;
}
.referral-title {
    font-size: 1.15em;
    font-weight: 700;
    color: #00d2d3;
    margin-bottom: 6px;
}
.referral-subtitle {
    font-size: 0.9em;
    color: rgba(255,255,255,0.75);
    margin-bottom: 14px;
}
.referral-stats {
    display: flex;
    justify-content: space-around;
    margin: 14px 0;
}
.referral-stat {
    text-align: center;
}
.referral-stat-num {
    font-size: 1.8em;
    font-weight: 900;
    color: #ffd700;
}
.referral-stat-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}
.referral-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,210,211,0.3);
    border-radius: 100px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 1.05em;
    font-weight: 700;
    color: #00d2d3;
    margin: 10px 0;
}
.referral-code-copy {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 1.1em;
    padding: 0;
}
.referral-code-copy:hover { color: #fff; }
.referral-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}
.referral-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 100px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s;
    color: #fff;
}
.referral-btn:hover { transform: translateY(-1px); }
.referral-btn-wechat { background: #07c160; }
.referral-btn-friend { background: linear-gradient(135deg, #6c5ce7, #e84393); }
.referral-btn-copy { background: rgba(255,255,255,0.15); }
.referral-progress {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.85);
}

/* ===== D3: 多卡牌结果海报 ===== */
.poster-stack {
    width: 750px;
    background: linear-gradient(180deg, #0a1628 0%, #1a0a3e 100%);
    font-family: 'Noto Sans SC', sans-serif;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.poster-stack::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(108,92,231,0.18) 0%, transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(232,67,147,0.15) 0%, transparent 40%);
    pointer-events: none;
}
.poster-card {
    position: relative;
    margin: 28px 40px;
    padding: 26px 30px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    z-index: 1;
}
.poster-card-1 {
    /* 第四批-2：配色随 MBTI 类型变化（通过 --poster-c1/c2 CSS 变量注入） */
    background: linear-gradient(135deg, var(--poster-bg-1, rgba(108,92,231,0.25)), var(--poster-bg-2, rgba(232,67,147,0.25)));
    border-color: var(--poster-border, rgba(108,92,231,0.4));
    text-align: center;
    padding: 36px 30px;
}
.poster-card-1-emoji {
    font-size: 100px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 20px rgba(0,210,211,0.5));
}
.poster-card-1-type {
    font-size: 90px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(90deg, var(--poster-c1, #6c5ce7), var(--poster-c2, #00d2d3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
}
.poster-card-1-name {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-top: 8px;
}
.poster-card-1-tagline {
    font-size: 18px;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
    font-weight: 400;
}
.poster-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #00d2d3;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.poster-dim-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.poster-dim {
    text-align: center;
}
.poster-dim-pct {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.poster-dim-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.poster-trait-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.poster-trait {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(108,92,231,0.2), rgba(0,210,211,0.2));
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 100px;
    font-size: 14px;
    color: #fff;
}
.poster-quote {
    font-size: 20px;
    font-style: italic;
    color: rgba(255,215,0,0.95);
    text-align: center;
    line-height: 1.6;
}
.poster-superpower {
    font-size: 16px;
    color: #00d2d3;
    text-align: center;
    font-weight: 600;
}
.poster-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 50px 40px;
    position: relative;
    z-index: 1;
}
.poster-footer-left {
    flex: 1;
}
.poster-footer-brand {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(90deg, #6c5ce7, #00d2d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.poster-footer-slogan {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
.poster-footer-url {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
    font-family: 'SF Mono', Consolas, monospace;
}
.poster-qr {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    flex-shrink: 0;
}

/* ===== J1.1: 极简海报模板 ===== */
.poster-minimal {
    width: 360px;
    min-height: 540px;
    background: #fdfdfb;
    color: #1a1a1a;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
}
.poster-minimal::before {
    content: '';
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(0,0,0,0.1);
    pointer-events: none;
}
.poster-minimal-type {
    font-size: 96px;
    font-weight: 900;
    letter-spacing: -3px;
    color: var(--poster-c1, #1a1a1a);
    margin-bottom: 12px;
    line-height: 1;
}
.poster-minimal-name {
    font-size: 28px;
    color: #4a4a4a;
    margin-bottom: 32px;
    font-weight: 500;
}
.poster-minimal-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--poster-c1, #1a1a1a), var(--poster-c2, #1a1a1a));
    margin: 0 auto 24px;
}
.poster-minimal-emoji {
    font-size: 56px;
    margin-bottom: 14px;
}
.poster-minimal-quote {
    font-size: 16px;
    line-height: 1.7;
    color: #2a2a2a;
    margin-bottom: 24px;
    font-style: italic;
}
.poster-minimal-footer {
    font-size: 11px;
    letter-spacing: 2px;
    color: #999;
    text-transform: uppercase;
    margin-top: auto;
}

/* ===== J1.1: 星空海报模板 ===== */
.poster-starry {
    width: 360px;
    min-height: 540px;
    background: radial-gradient(ellipse at top, #1a1a3e 0%, #0a0a1f 50%, #000 100%);
    color: #fff;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
}
.poster-starry::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 60% 20%, #fff, transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 30% 80%, #fff, transparent),
        radial-gradient(2px 2px at 70% 90%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 10% 60%, #fff, transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 50% 40%, #fff, transparent);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.poster-starry-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}
.poster-starry-zodiac {
    font-size: 14px;
    color: #fdcb6e;
    letter-spacing: 6px;
    margin-bottom: 18px;
}
.poster-starry-emoji {
    font-size: 80px;
    margin: 12px 0;
    filter: drop-shadow(0 0 20px rgba(253,203,110,0.5));
}
.poster-starry-type {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #fdcb6e 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
}
.poster-starry-name {
    font-size: 22px;
    color: #fff;
    margin-bottom: 6px;
    font-weight: 500;
}
.poster-starry-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 280px;
    margin: 16px 0 24px;
}
.poster-starry-constellation {
    display: flex;
    gap: 14px;
    margin: 18px 0 28px;
    font-size: 20px;
    opacity: 0.7;
}
.poster-starry-footer {
    margin-top: auto;
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.4);
}

/* ===== J1.1: 手绘海报模板 ===== */
.poster-handwritten {
    width: 360px;
    min-height: 540px;
    background: #f5ecd7;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(210,180,140,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(210,180,140,0.1) 0%, transparent 50%);
    color: #3a2a1a;
    padding: 40px 32px;
    position: relative;
    font-family: 'KaiTi', 'STKaiti', 'Noto Sans SC', serif;
}
.poster-handwritten::before {
    content: '';
    position: absolute;
    inset: 18px;
    border: 2px dashed rgba(180,80,40,0.3);
    border-radius: 4px;
    pointer-events: none;
}
.poster-handwritten::after {
    content: '人格档案';
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 16px;
    color: #b94530;
    border: 1.5px solid #b94530;
    padding: 4px 12px;
    border-radius: 4px;
    transform: rotate(8deg);
    font-family: 'KaiTi', 'STKaiti', serif;
}
.poster-hw-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(180,80,40,0.2);
}
.poster-hw-type {
    font-size: 56px;
    color: #b94530;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 6px;
}
.poster-hw-name {
    font-size: 22px;
    color: #3a2a1a;
    font-weight: 500;
}
.poster-hw-body {
    padding: 8px 0;
}
.poster-hw-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 14px;
    line-height: 1.7;
}
.poster-hw-label {
    font-size: 15px;
    color: #b94530;
    font-weight: 600;
    min-width: 70px;
    flex-shrink: 0;
}
.poster-hw-text {
    font-size: 14px;
    color: #3a2a1a;
    flex: 1;
}
.poster-hw-emoji {
    text-align: center;
    font-size: 48px;
    margin: 20px 0;
}
.poster-hw-quote {
    text-align: center;
    font-size: 15px;
    color: #3a2a1a;
    font-style: italic;
    line-height: 1.8;
    padding: 12px 0;
    border-top: 1px solid rgba(180,80,40,0.2);
    border-bottom: 1px solid rgba(180,80,40,0.2);
    margin: 16px 0;
}
.poster-hw-footer {
    text-align: center;
    font-size: 11px;
    color: #8a6a4a;
    letter-spacing: 2px;
    margin-top: 20px;
}
.poster-hw-stamp {
    position: absolute;
    bottom: 24px;
    right: 30px;
    width: 64px;
    height: 64px;
    border: 2px solid #b94530;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #b94530;
    font-weight: 600;
    transform: rotate(-12deg);
    line-height: 1.2;
    text-align: center;
}

/* ===== D4: 进度鼓励提示（不挡视线，放在进度条旁） ===== */
.progress-cheer {
    display: none;
    margin-left: 10px;
    padding: 3px 10px;
    font-size: 0.78em;
    font-weight: 500;
    color: rgba(255, 215, 0, 0.92);
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 100px;
    white-space: nowrap;
    vertical-align: middle;
    animation: cheerInOut 3.4s ease forwards;
}
.progress-cheer.active {
    display: inline-flex;
    align-items: center;
}
.progress-cheer-emoji {
    margin-right: 5px;
    font-size: 0.95em;
    line-height: 1;
}
.progress-cheer-title {
    margin-right: 6px;
    font-weight: 600;
}
.progress-cheer-msg {
    font-weight: 400;
    color: rgba(255, 215, 0, 0.65);
}
@keyframes cheerInOut {
    0% { opacity: 0; transform: translateY(-4px); }
    12% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-4px); }
}
.match-card-label {
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* ===== 分享图片预览 ===== */
.share-image-preview {
    margin: 12px 0 8px;
    text-align: center;
    max-height: 42vh;
    overflow-y: auto;
    padding: 4px;
}
.share-image-preview img {
    max-width: 100%;
    max-height: 42vh;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: inline-block;
}
.share-image-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.share-image-actions button {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 88px;
    max-width: 180px;
}
.share-image-actions button:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}
/* 分享按钮：底部固定一行，不被海报挤出屏 */
.share-image-actions-wrapper-fixed {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(10,22,40,0.95) 30%);
    padding: 10px 4px 2px;
    z-index: 5;
}
/* ===== J1: 海报模板选择 ===== */
.poster-template-tabs {
    display: flex;
    gap: 6px;
    margin: 6px 0 4px;
    padding: 3px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.poster-template-tab {
    flex: 1;
    padding: 6px 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78em;
    font-weight: 500;
    transition: all 0.2s;
}
.poster-template-tab:hover {
    background: rgba(108,92,231,0.12);
    color: #fff;
}
.poster-template-tab.active {
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(108,92,231,0.35);
}
[data-theme="light"] .poster-template-tab { color: #636e72; }
[data-theme="light"] .poster-template-tab:hover { background: rgba(108,92,231,0.08); color: #6c5ce7; }
.poster-custom-text-row {
    margin: 4px 0 6px;
}
.poster-custom-text-row input {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: inherit;
    font-size: 0.8em;
    font-family: inherit;
    box-sizing: border-box;
}
.poster-custom-text-row input:focus-visible {
    border-color: var(--star-purple);
    outline: 2px solid var(--star-purple);
    outline-offset: 2px;
    background: rgba(108,92,231,0.08);
}
[data-theme="light"] .poster-custom-text-row input {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}

/* P0-1: 全局按下态微反馈 —— 让每次点击都有"按到了"的体感 */
.btn-secondary.history-btn,
.btn-primary,
.btn-nav,
.btn-unlock,
.btn-paid,
.theme-toggle,
.lang-toggle,
.test-tab,
.font-scale-btn,
.tip-btn,
.referral-btn,
.star-btn,
.accuracy-submit-btn,
.challenge-today-btn,
.match-banner-close,
.modal-close,
.profile-detail-btn {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}
.btn-secondary.history-btn:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-nav:active:not(:disabled),
.btn-unlock:active:not(:disabled),
.btn-paid:active:not(:disabled),
.theme-toggle:active,
.lang-toggle:active,
.test-tab:active,
.font-scale-btn:active,
.tip-btn:active,
.referral-btn:active,
.star-btn:active,
.accuracy-submit-btn:active:not(:disabled),
.challenge-today-btn:active,
.match-banner-close:active,
.modal-close:active,
.profile-detail-btn:active {
    transform: scale(0.96);
    opacity: 0.85;
}
.btn-secondary.history-btn:disabled,
.btn-nav:disabled,
.btn-unlock:disabled,
.accuracy-submit-btn:disabled {
    transform: none !important;
    pointer-events: none;
}

/* P0-2: 答题选中确认反馈 —— 进度条脉冲 + 选中按钮二次弹跳 */
@keyframes answerPulse {
    0%   { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.55); }
    50%  { box-shadow: 0 0 0 8px rgba(108, 92, 231, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}
#progressBar.answer-pulse {
    animation: answerPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes answerConfirm {
    0%   { transform: translateY(-4px) scale(1.08); }
    40%  { transform: translateY(-8px) scale(1.16); box-shadow: 0 8px 24px rgba(108, 92, 231, 0.45); }
    100% { transform: translateY(-4px) scale(1.08); }
}
.scale-btn.selected.answer-confirm {
    animation: answerConfirm 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* P0-4: 辅助设置折叠 —— 与 explore-toggle 视觉一致,首屏减负 */
.pref-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 8px 0 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.92em;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, transform 0.12s ease;
}
.pref-toggle:hover { background: rgba(255,255,255,0.12); }
.pref-toggle:active { transform: scale(0.98); }
.pref-toggle-icon { font-size: 1.1em; }
.pref-toggle-text { flex: 1; }
.pref-toggle-hint { opacity: 0.55; font-size: 0.85em; margin-left: 4px; }
.pref-toggle-arrow { color: var(--text-muted); font-size: 0.8em; }
.pref-panel {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 6px 0 12px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.pref-panel .perf-label { flex: 1; min-width: 160px; }
.pref-panel .font-scale { display: flex; gap: 4px; flex-wrap: wrap; }

/* P1-B: 性能模式开启时,辅助面板显示 1px 紫色高亮边,提示"已生效" */
body.perf-mode .pref-panel {
    border-color: var(--star-purple);
    box-shadow: 0 0 0 1px var(--star-purple), 0 4px 12px rgba(108, 92, 231, 0.15);
}
body.perf-mode .perf-label {
    color: var(--star-purple);
    font-weight: 600;
}

/* P2-F: 首屏"恢复进度"卡片 */
.resume-card {
    margin: 16px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.18), rgba(0, 210, 211, 0.12));
    border: 1px solid rgba(108, 92, 231, 0.45);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
    overflow: hidden;
    animation: resumeSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes resumeSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.resume-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.resume-icon { font-size: 1.6em; flex-shrink: 0; }
.resume-text { flex: 1; min-width: 0; }
.resume-title { font-size: 1.05em; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.resume-sub { font-size: 0.82em; color: var(--text-secondary); margin-bottom: 6px; }
.resume-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.resume-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #00d2d3);
    transition: width 0.4s ease;
}
.resume-actions { display: flex; gap: 6px; flex-shrink: 0; }
.resume-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.88em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background 0.12s ease;
}
.resume-btn:active { transform: scale(0.96); }
.resume-btn.primary {
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    border: none;
    color: #fff;
    font-weight: 600;
}
.resume-btn.ghost {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8em;
}

/* ============================================================
   页脚：关于 / 隐私 / 免责（对标竞品合规实践）
   ============================================================ */
.site-footer {
    margin: 22px auto 6px;
    text-align: center;
    font-size: 0.74em;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.9;
    max-width: 460px;
}
.site-footer .footer-link {
    background: none;
    border: none;
    padding: 2px 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s, text-decoration-color 0.2s;
}
.site-footer .footer-link:hover,
.site-footer .footer-link:focus-visible {
    color: var(--star-purple, #a29bfe);
    text-decoration-color: var(--star-purple, #a29bfe);
    outline: none;
}
.site-footer .footer-dot { color: rgba(255, 255, 255, 0.22); margin: 0 2px; }
.site-footer .footer-copy { margin-top: 6px; font-size: 0.94em; color: rgba(255, 255, 255, 0.28); }
[data-theme="light"] .site-footer { color: rgba(40, 30, 80, 0.55); }
[data-theme="light"] .site-footer .footer-link { color: rgba(40, 30, 80, 0.68); text-decoration-color: rgba(40, 30, 80, 0.25); }
[data-theme="light"] .site-footer .footer-link:hover { color: #6c5ce7; text-decoration-color: #6c5ce7; }
[data-theme="light"] .site-footer .footer-dot { color: rgba(40, 30, 80, 0.28); }
[data-theme="light"] .site-footer .footer-copy { color: rgba(40, 30, 80, 0.42); }

/* 关于 / 隐私 / 免责 弹窗 */
.about-modal { max-width: 560px; max-height: 82vh; overflow-y: auto; }
.about-body { font-size: 0.86em; line-height: 1.85; color: rgba(255, 255, 255, 0.78); text-align: left; }
.about-body h4 {
    font-size: 0.96em;
    font-weight: 700;
    color: #fff;
    margin: 18px 0 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.about-body h4:first-child { margin-top: 2px; }
.about-body p { margin: 0 0 4px; color: rgba(255, 255, 255, 0.7); }
.about-body strong { color: var(--star-purple, #a29bfe); font-weight: 700; }
.about-foot {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.84em;
    color: rgba(255, 255, 255, 0.35);
}
[data-theme="light"] .about-body { color: rgba(30, 20, 60, 0.82); }
[data-theme="light"] .about-body h4 { color: #1e1440; border-bottom-color: rgba(30, 20, 60, 0.1); }
[data-theme="light"] .about-body p { color: rgba(30, 20, 60, 0.75); }
[data-theme="light"] .about-body strong { color: #6c5ce7; }
[data-theme="light"] .about-foot { color: rgba(30, 20, 60, 0.45); border-top-color: rgba(30, 20, 60, 0.1); }

@media (max-width: 420px) {
    .about-modal { max-height: 86vh; }
    .site-footer { font-size: 0.7em; }
}

/* ============================================================
   结果页"快速反馈"入口按钮（常驻，不自动弹窗）
   ============================================================ */
.nps-entry-btn {
    display: inline-block;
    padding: 11px 30px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c5cff, #2d9cff);
    color: #fff;
    font-size: 0.92em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.32);
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.nps-entry-btn:hover,
.nps-entry-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(124, 92, 255, 0.45);
    opacity: 0.96;
    outline: none;
}
.nps-entry-btn:active { transform: translateY(0); }

/* NPS 评分按钮在亮色主题下的对比度修正 */
[data-theme="light"] .nps-score-btn {
    background: #f4f2fb;
    border-color: #dcd6f0;
    color: #2a2050;
}
[data-theme="light"] .nps-score-btn.selected {
    background: linear-gradient(135deg, #7c5cff, #2d9cff);
    border-color: transparent;
    color: #fff;
}
[data-theme="light"] .nps-question,
[data-theme="light"] .nps-feedback-label,
[data-theme="light"] .nps-thank-msg { color: #1e1440; }
[data-theme="light"] .nps-feedback-input {
    background: #fff;
    border-color: #dcd6f0;
    color: #1e1440;
}
[data-theme="light"] .nps-skip-btn { color: #6b6390; }
[data-theme="light"] .nps-skip-btn:hover { color: #1e1440; }

/* 快速反馈入口文字（双主题适配） */
.nps-entry-title {
    font-size: 1.02em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.nps-entry-sub {
    font-size: 0.84em;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 16px;
}
.nps-entry-note {
    font-size: 0.74em;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 10px;
}
[data-theme="light"] .nps-entry-title { color: #1e1440; }
[data-theme="light"] .nps-entry-sub { color: rgba(30, 20, 64, 0.62); }
[data-theme="light"] .nps-entry-note { color: rgba(30, 20, 64, 0.42); }

/* ============================================================
   海报全屏预览弹窗（生成后立即弹出，可见 + 可保存）
   ============================================================ */
.poster-preview-overlay {
    z-index: 100060;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.poster-preview-box {
    width: 100%;
    max-width: 430px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(30, 22, 60, 0.97), rgba(16, 12, 38, 0.98));
    border: 1px solid rgba(160, 140, 255, 0.28);
    border-radius: 20px;
    padding: 16px 16px 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    animation: posterPopIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes posterPopIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.poster-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.poster-preview-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #fff;
}
.poster-preview-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.25em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.18s;
}
.poster-preview-close:hover { background: rgba(255, 255, 255, 0.18); transform: rotate(90deg); }

.poster-preview-imgwrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
}
.poster-preview-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    -webkit-user-select: none;
    user-select: none;
}
.poster-preview-tip {
    font-size: 0.76em;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 10px 0 12px;
    line-height: 1.6;
    flex-shrink: 0;
}
.poster-preview-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.poster-save-btn {
    flex: 1;
    padding: 13px 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c5cff, #2d9cff);
    color: #fff;
    font-size: 0.94em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
    transition: transform 0.16s, box-shadow 0.16s;
}
.poster-save-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 26px rgba(124, 92, 255, 0.5); }
.poster-save-btn:active { transform: translateY(0); }
.poster-share-btn {
    flex: 1;
    padding: 13px 12px;
    border: 1px solid rgba(160, 140, 255, 0.4);
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.14);
    color: #cfc4ff;
    font-size: 0.94em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.16s;
}
.poster-share-btn:hover { background: rgba(124, 92, 255, 0.26); }
.poster-back-btn {
    margin-top: 10px;
    padding: 9px;
    width: 100%;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.82em;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
}
.poster-back-btn:hover { color: rgba(255, 255, 255, 0.75); }

/* 亮色主题适配 */
[data-theme="light"] .poster-preview-box {
    background: linear-gradient(160deg, #ffffff, #f6f4fd);
    border-color: rgba(124, 92, 255, 0.22);
    box-shadow: 0 24px 70px rgba(60, 40, 120, 0.22);
}
[data-theme="light"] .poster-preview-title { color: #1e1440; }
[data-theme="light"] .poster-preview-close {
    border-color: rgba(30, 20, 64, 0.14);
    background: rgba(30, 20, 64, 0.05);
    color: #1e1440;
}
[data-theme="light"] .poster-preview-close:hover { background: rgba(30, 20, 64, 0.12); }
[data-theme="light"] .poster-preview-imgwrap { background: rgba(30, 20, 64, 0.05); }
[data-theme="light"] .poster-preview-tip { color: rgba(30, 20, 64, 0.55); }
[data-theme="light"] .poster-share-btn {
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.1);
    color: #6c5ce7;
}
[data-theme="light"] .poster-share-btn:hover { background: rgba(124, 92, 255, 0.2); }
[data-theme="light"] .poster-back-btn { color: rgba(30, 20, 64, 0.45); }
[data-theme="light"] .poster-back-btn:hover { color: rgba(30, 20, 64, 0.8); }

@media (max-width: 420px) {
    .poster-preview-overlay { padding: 10px; }
    .poster-preview-box { max-height: 96vh; padding: 13px 13px 15px; border-radius: 17px; }
    .poster-preview-title { font-size: 0.98em; }
}

/* ========== 答题页「返回来处」按钮 ========== */
.quiz-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px 0;
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82em;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.18s;
}
.quiz-back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(-2px);
}
.quiz-back-btn:active { transform: translateX(-2px) scale(0.97); }
.quiz-back-btn:focus-visible { outline: 2px solid #7c5cff; outline-offset: 2px; }
.quiz-back-arrow { font-size: 1.05em; line-height: 1; }
[data-theme="light"] .quiz-back-btn {
    border-color: rgba(30, 20, 64, 0.14);
    background: rgba(30, 20, 64, 0.05);
    color: rgba(30, 20, 64, 0.66);
}
[data-theme="light"] .quiz-back-btn:hover {
    background: rgba(30, 20, 64, 0.1);
    color: #1e1440;
}

/* ========== 键盘 1-5 作答提示 ========== */
.kbd-hint {
    margin: 12px 0 2px;
    text-align: center;
}
.kbd-hint-text {
    display: inline-block;
    font-size: 0.78em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.42);
}
.kbd-hint-text b {
    display: inline-block;
    min-width: 20px;
    margin: 0 1px;
    padding: 1px 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92em;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: center;
}
[data-theme="light"] .kbd-hint-text { color: rgba(30, 20, 64, 0.5); }
[data-theme="light"] .kbd-hint-text b {
    border-color: rgba(30, 20, 64, 0.22);
    background: rgba(30, 20, 64, 0.05);
    color: #1e1440;
}
/* 触屏设备无需键盘提示 */
@media (hover: none) and (pointer: coarse) {
    .kbd-hint { display: none; }
}
/* 小屏省略，避免拥挤 */
@media (max-width: 480px) {
    .kbd-hint { display: none; }
    .quiz-back-btn { font-size: 0.78em; padding: 6px 13px; margin-bottom: 10px; }
}
