/* ===== RBTI 恋爱人格测试 专属样式 ===== */
/* 继承 h5-fresh.css 主题变量 */

/* ---------- 通用布局 ---------- */
html, body { width:100%; max-width:100%; margin:0; overflow-x:hidden; }
*, *::before, *::after { box-sizing: border-box; }

.rbti-wrap { width:100%; max-width:680px; margin:0 auto; padding:0 18px; }

/* ---------- 首页 Hero ---------- */
.rbti-hero {
    padding: 42px 18px 22px;
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,124,168,0.16), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(156,140,255,0.12), transparent 40%),
        linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,244,249,0.95) 100%);
}
.rbti-hero .rbti-emoji { font-size: 56px; margin-bottom: 12px; }
.rbti-hero .rbti-hero-logo { width: 88px; height: 88px; object-fit: contain; margin-bottom: 12px; border-radius: 22px; }
.rbti-hero .rbti-main-title {
    font-size: 32px; font-weight: 900; line-height: 1.28;
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rbti-hero .rbti-sub {
    margin-top: 12px; font-size: 15px; color: var(--fresh-text-muted);
    line-height: 1.75; max-width: 520px; margin-left: auto; margin-right: auto;
    text-align: left;
}
.rbti-hero .rbti-tags {
    margin-top: 12px; max-width: 520px; margin-left: auto; margin-right: auto; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.rbti-tags-track {
    display: flex; gap: 8px; width: max-content;
    animation: rbti-scroll 18s linear infinite;
}
@keyframes rbti-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.rbti-tag {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; white-space: nowrap;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.88); border: 1px solid var(--fresh-border);
    font-size: 12px; font-weight: 600; color: var(--fresh-text-muted);
}

/* ---------- 通用按钮 ---------- */
.rbti-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 32px; border-radius: 16px;
    font-size: 16px; font-weight: 800; text-decoration: none;
    color: #fff; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-primary-deep));
    box-shadow: 0 12px 30px rgba(255,94,145,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.rbti-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(255,94,145,0.32); }
.rbti-btn:active { transform: scale(0.97); }
.rbti-btn.secondary {
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,244,248,0.96));
    box-shadow: 0 10px 24px rgba(255,176,202,0.22);
    color: #7a3652; border: 1px solid rgba(255,255,255,0.78);
}
.rbti-btn.accent {
    background: linear-gradient(135deg, var(--fresh-accent), #7b6bff);
    box-shadow: 0 12px 30px rgba(156,140,255,0.28);
}
.rbti-btn-group { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- 信息卡片 ---------- */
.rbti-card {
    background: var(--fresh-surface);
    border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-lg);
    padding: 18px; margin-top: 10px;
    box-shadow: var(--fresh-shadow-soft);
}
.rbti-card-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.rbti-card-desc { font-size: 13px; color: var(--fresh-text-muted); line-height: 1.7; }

.rbti-features {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px;
}
.rbti-feature {
    text-align: center; padding: 16px 10px;
    background: rgba(255,255,255,0.85); border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-md);
}
.rbti-feature-icon { font-size: 28px; margin-bottom: 6px; }
.rbti-feature-label { font-size: 13px; font-weight: 700; color: var(--fresh-text); }
.rbti-feature-desc { font-size: 11px; color: var(--fresh-text-muted); margin-top: 4px; line-height: 1.5; }

/* ---------- 关系阶段选择 ---------- */
.rbti-stage-section { padding: 14px 0 4px; }
.rbti-stage-title { font-size: 20px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.rbti-stage-sub { font-size: 13px; color: var(--fresh-text-muted); text-align: center; margin-bottom: 20px; }
.rbti-stages { display: grid; grid-template-columns: 1fr; gap: 10px; }
.rbti-stage-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--fresh-radius-md);
    background: var(--fresh-surface); border: 2px solid transparent;
    cursor: pointer; transition: all 0.2s;
    min-height: 78px;
}
.rbti-stage-item:hover { border-color: var(--fresh-primary-soft); transform: translateY(-1px); }
.rbti-stage-item.active {
    border-color: var(--fresh-primary);
    background: linear-gradient(135deg, rgba(255,124,168,0.06), rgba(156,140,255,0.04));
}
.rbti-stage-emoji { font-size: 28px; flex-shrink: 0; }
.rbti-stage-info { flex: 1; min-width: 0; }
.rbti-stage-name { font-size: 15px; font-weight: 800; }
.rbti-stage-hint { font-size: 12px; color: var(--fresh-text-muted); margin-top: 2px; }

/* ---------- 答题页 ---------- */
.rbti-test-header {
    position: sticky; top: 0; z-index: 100;
    padding: 14px 18px; background: rgba(255,253,253,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,181,206,0.18);
}
.rbti-progress-bar {
    width: 100%; height: 6px; border-radius: 3px;
    background: var(--fresh-primary-soft); overflow: hidden;
}
.rbti-progress-fill {
    height: 100%; border-radius: 3px; transition: width 0.4s ease;
    background: linear-gradient(90deg, var(--fresh-primary), var(--fresh-accent));
}
.rbti-progress-text {
    margin-top: 6px; font-size: 12px; color: var(--fresh-text-muted);
    display: flex; justify-content: space-between;
}

.rbti-question-area { padding: 24px 0 100px; min-height: 60vh; }
.rbti-q-card {
    background: var(--fresh-surface-strong);
    border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-lg);
    padding: 24px 20px; box-shadow: var(--fresh-shadow-soft);
    animation: rbti-fadeIn 0.35s ease;
}
@keyframes rbti-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.rbti-q-num { font-size: 13px; font-weight: 700; color: var(--fresh-primary); margin-bottom: 8px; }
.rbti-q-text { font-size: 17px; font-weight: 800; line-height: 1.55; color: var(--fresh-text); }
.rbti-q-dim { margin-top: 6px; font-size: 11px; color: var(--fresh-text-muted); }

.rbti-options { margin-top: 20px; display: grid; gap: 10px; }
.rbti-option {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-radius: var(--fresh-radius-sm);
    background: rgba(255,255,255,0.7); border: 2px solid rgba(255,181,206,0.2);
    cursor: pointer; transition: all 0.2s; font-size: 14px; font-weight: 600;
    min-height: 56px;
}
.rbti-option:hover { border-color: var(--fresh-primary-soft); background: rgba(255,255,255,0.9); }
.rbti-option.selected {
    border-color: var(--fresh-primary); background: linear-gradient(135deg, rgba(255,124,168,0.08), rgba(156,140,255,0.05));
    color: var(--fresh-primary-deep);
}
.rbti-option-dot {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255,181,206,0.4); transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.rbti-option.selected .rbti-option-dot {
    border-color: var(--fresh-primary); background: var(--fresh-primary);
}
.rbti-option.selected .rbti-option-dot::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}

/* ---------- 底部导航 ---------- */
.rbti-nav-bottom {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
    background: rgba(255,253,253,0.94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,181,206,0.18);
    display: flex; gap: 10px; justify-content: center;
}
.rbti-nav-bottom .rbti-btn { flex: 1; max-width: 200px; min-height: 44px; font-size: 14px; }

/* ---------- 结果页 ---------- */
.rbti-result-hero {
    padding: 40px 18px 30px; text-align: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(255,124,168,0.14), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(156,140,255,0.1), transparent 40%);
}
.rbti-result-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rbti-result-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.9); border: 1px solid var(--fresh-border);
    font-size: 12px; font-weight: 700; color: var(--fresh-primary-deep);
}
.rbti-result-image {
    display: block;
    width: 192px;
    height: 192px;
    margin: 18px auto 12px;
    object-fit: cover;
    border-radius: 38px;
    border: 3px solid rgba(255,255,255,0.92);
    box-shadow: 0 14px 30px rgba(255,124,168,0.18);
    background: rgba(255,255,255,0.88);
}
.rbti-result-code {
    font-size: 28px; font-weight: 900; letter-spacing: 2px;
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rbti-result-name { font-size: 22px; font-weight: 900; margin-top: 6px; }
.rbti-result-tagline {
    font-size: 14px; color: var(--fresh-text-muted); margin-top: 6px;
    font-style: italic; max-width: 400px; margin-left: auto; margin-right: auto;
}

/* 五维雷达图容器 */
.rbti-radar-wrap {
    margin: 20px auto; padding: 20px;
    background: var(--fresh-surface); border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-lg); max-width: 400px;
}
.rbti-radar-title { font-size: 16px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.rbti-radar-canvas { width: 100%; aspect-ratio: 1; }

/* 维度条 */
.rbti-dim-bars { margin-top: 16px; }
.rbti-dim-bar-item { margin-bottom: 14px; }
.rbti-dim-bar-labels {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 700; margin-bottom: 4px;
}
.rbti-dim-bar-left { color: var(--fresh-primary); }
.rbti-dim-bar-right { color: var(--fresh-accent); }
.rbti-dim-bar-track {
    height: 8px; border-radius: 4px; background: var(--fresh-primary-soft);
    position: relative; overflow: hidden;
}
.rbti-dim-bar-fill {
    position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--fresh-primary), var(--fresh-accent));
    transition: width 0.6s ease;
}
.rbti-dim-bar-strength {
    font-size: 11px; color: var(--fresh-text-muted); margin-top: 3px; text-align: center;
}

/* 报告各区块 */
.rbti-section { margin-top: 16px; }
.rbti-section-title {
    font-size: 17px; font-weight: 900; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.rbti-section-title .icon { font-size: 20px; }
.rbti-list { list-style: none; padding: 0; margin: 0; }
.rbti-list li {
    padding: 10px 14px; margin-bottom: 8px;
    background: rgba(255,255,255,0.7); border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-sm);
    font-size: 14px; line-height: 1.6; color: var(--fresh-text);
}
.rbti-list li::before { content: '•'; color: var(--fresh-primary); font-weight: 900; margin-right: 8px; }

.rbti-conflict-box, .rbti-shadow-box, .rbti-love-lang-box {
    padding: 16px; border-radius: var(--fresh-radius-md);
    background: rgba(255,248,251,0.8); border: 1px solid var(--fresh-border);
    font-size: 14px; line-height: 1.7;
}
.rbti-shadow-box { background: rgba(255,244,248,0.6); border-color: rgba(255,150,180,0.25); }

/* 匹配类型 */
.rbti-matches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.rbti-match-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--fresh-border);
    box-shadow: 0 10px 24px rgba(255,124,168,0.08);
}
.rbti-match-image {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 22px;
    border: 2px solid rgba(255,255,255,0.94);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 18px rgba(255,124,168,0.14);
}
.rbti-match-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
    color: var(--fresh-primary-deep);
    font-weight: 700;
}
.rbti-match-key {
    font-size: 13px;
    font-weight: 800;
    color: var(--fresh-primary-deep);
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}
.rbti-match-loading {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.75);
    border: 1px dashed rgba(255,124,168,0.22);
    color: var(--fresh-text-muted);
    font-size: 13px;
    text-align: center;
}

/* 阶段提醒 */
.rbti-stage-tip {
    margin-top: 16px; padding: 16px;
    background: linear-gradient(135deg, rgba(156,140,255,0.06), rgba(255,124,168,0.04));
    border: 1px solid rgba(156,140,255,0.2); border-radius: var(--fresh-radius-md);
}
.rbti-stage-tip-title { font-size: 14px; font-weight: 800; color: var(--fresh-accent); margin-bottom: 6px; }
.rbti-stage-tip-text { font-size: 13px; color: var(--fresh-text-muted); line-height: 1.7; }

/* 分享区域 */
.rbti-share-area {
    margin-top: 24px; padding: 20px; text-align: center;
    background: var(--fresh-surface); border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-lg);
}
.rbti-share-text {
    font-size: 14px; color: var(--fresh-text); line-height: 1.6;
    padding: 12px; background: rgba(255,248,251,0.8);
    border-radius: var(--fresh-radius-sm); margin-bottom: 12px;
}

/* 免责声明 */
.rbti-disclaimer {
    margin-top: 14px; padding: 12px;
    font-size: 11px; color: var(--fresh-text-muted);
    text-align: center; line-height: 1.6;
}

/* 备案 */
.rbti-footer {
    padding: 12px 18px 16px; text-align: center;
    font-size: 12px; color: var(--fresh-text-muted);
}
.rbti-footer a { color: var(--fresh-text-muted); text-decoration: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .rbti-wrap { padding: 0 14px; }
    .rbti-hero { padding: 22px 16px 14px; }
    .rbti-hero .rbti-emoji { font-size: 42px; margin-bottom: 8px; }
    .rbti-hero .rbti-hero-logo { width: 68px; height: 68px; margin-bottom: 8px; border-radius: 16px; }
    .rbti-hero .rbti-main-title { font-size: 26px; }
    .rbti-hero .rbti-sub {
        font-size: 14px;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
    .rbti-tags-track { gap: 7px; animation-duration: 14s; }
    .rbti-tag { font-size: 11px; padding: 6px 10px; }
    .rbti-card { padding: 16px 14px; margin-top: 8px; }
    .rbti-card-title { line-height: 1.5; }
    .rbti-card-desc { font-size: 12px; }
    .rbti-features { grid-template-columns: 1fr; gap: 10px; }
    .rbti-feature {
        display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0 12px;
        text-align: left; padding: 14px 16px;
    }
    .rbti-feature-icon { font-size: 24px; margin-bottom: 0; grid-row: 1 / 3; }
    .rbti-feature-label { white-space: nowrap; grid-column: 2; grid-row: 1 / 3; }
    .rbti-feature-desc { font-size: 12px; grid-column: 3; grid-row: 1 / 3; }
    .rbti-stage-section { padding: 10px 0 2px; }
    .rbti-stage-item { align-items: flex-start; padding: 14px; gap: 10px; }
    .rbti-stage-emoji { font-size: 24px; margin-top: 2px; }
    .rbti-stage-name { font-size: 14px; }
    .rbti-stage-hint { font-size: 12px; line-height: 1.55; margin-top: 4px; }
    .rbti-btn-group { width: 100%; margin-top: 14px; }
    .rbti-btn,
    .rbti-btn.secondary,
    .rbti-btn.accent { width: 100%; }
    .rbti-question-area { padding: 18px 0 96px; min-height: 52vh; }
    .rbti-q-card { padding: 20px 16px; border-radius: 20px; }
    .rbti-result-code { font-size: 24px; }
    .rbti-result-name { font-size: 19px; }
    .rbti-q-text { font-size: 16px; }
    .rbti-options { gap: 12px; }
    .rbti-option { font-size: 15px; padding: 15px 14px; }
    .rbti-option-dot { width: 18px; height: 18px; }
    .rbti-nav-bottom { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
    .rbti-nav-bottom .rbti-btn { max-width: none; min-height: 46px; }
    .rbti-result-hero { padding: 30px 16px 22px; }
    .rbti-result-badge-row { gap: 8px; }
    .rbti-result-image { width: 164px; height: 164px; border-radius: 32px; margin-top: 16px; }
    .rbti-result-tagline { max-width: none; font-size: 13px; }
    .rbti-radar-wrap { max-width: none; padding: 16px 14px; margin: 16px auto; }
    .rbti-dim-bar-labels { font-size: 12px; gap: 8px; }
    .rbti-section-title { font-size: 16px; line-height: 1.5; }
    .rbti-list li,
    .rbti-conflict-box,
    .rbti-shadow-box,
    .rbti-love-lang-box,
    .rbti-share-text { font-size: 13px; }
    .rbti-matches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rbti-match-image { width: 78px; height: 78px; border-radius: 18px; }
    .rbti-match-key { font-size: 12px; }
    .rbti-stage-tip,
    .rbti-share-area { padding: 16px 14px; }
    .rbti-features { margin-top: 12px; }
    .rbti-disclaimer { margin-top: 10px; padding: 10px 12px; }
    .rbti-footer { padding-bottom: 12px; }
}

@media (min-width: 641px) {
    .rbti-wrap { max-width: 640px; }
    .rbti-hero .rbti-main-title { font-size: 36px; }
    .rbti-stages { grid-template-columns: 1fr 1fr; }
    .rbti-btn-group { flex-direction: row; }
}

@media (min-width: 1024px) {
    .rbti-wrap { max-width: 680px; }
}
