/* ========== 基础重置 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa; color: #333; line-height: 1.6; font-size: 15px;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 600; }

/* ========== 顶部导航栏 ========== */
.site-header {
    background: #fff; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 16px;
    display: flex; justify-content: space-between; align-items: center;
    height: 52px;
}
.site-logo { font-weight: bold; font-size: 17px; color: #667eea; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { padding: 6px 12px; font-size: 14px; color: #555; border-radius: 6px; }
.site-nav a:hover { background: #f0f2ff; color: #667eea; }

.site-main { min-height: calc(100vh - 100px); }
.site-footer { text-align: center; padding: 24px 16px; color: #999; font-size: 13px; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }

/* ========== 首页头部大横幅 ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; text-align: center; padding: 44px 16px 40px;
}
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: .92; }

/* ========== 测评卡片网格 ========== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card-item {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform .2s, box-shadow .2s;
    display: block;
}
.card-item:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(102,126,234,0.15); }
.card-item .cover {
    height: 140px; background-size: cover; background-position: center;
    background-color: #eef0ff;
}
.cover-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #aab3f0; font-weight: bold; letter-spacing: 4px;
}
.card-item .card-body { padding: 14px 16px 16px; }
.card-item h3 { font-size: 16px; margin: 4px 0 6px; color: #222; }
.card-item .sub { font-size: 13px; color: #888; margin-bottom: 10px; min-height: 20px; }
.tag {
    display: inline-block; background: #eef0ff; color: #667eea;
    font-size: 12px; padding: 2px 8px; border-radius: 4px;
}
.price-row {
    display: flex; justify-content: space-between;
    font-size: 12px; color: #999; padding-top: 10px; border-top: 1px solid #f0f0f0;
}
.empty-tip { text-align: center; padding: 60px 20px; color: #999; }

/* ========== 测评详情页 ========== */
.detail-head { text-align: center; padding: 20px 0; }
.detail-cover { height: 200px; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 20px; }
.detail-head h1 { font-size: 24px; margin-bottom: 10px; }
.detail-sub { color: #666; font-size: 14px; margin-bottom: 12px; }
.detail-meta { color: #999; font-size: 13px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.detail-block { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.detail-block h2 { font-size: 16px; margin-bottom: 12px; color: #333; }
.detail-desc { color: #555; font-size: 14px; line-height: 1.8; }

.result-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-option {
    border: 1px solid #eee; border-radius: 10px; padding: 16px; text-align: center;
}
.result-option.highlight { border-color: #667eea; background: #f7f8ff; }
.result-option h3 { font-size: 15px; margin-bottom: 6px; }
.result-option p { font-size: 13px; color: #888; margin-bottom: 10px; }
.result-price { font-size: 18px; color: #667eea; font-weight: bold; }

.detail-action { text-align: center; padding: 10px 0 30px; }
.btn-primary, .btn-default {
    display: inline-block; padding: 10px 20px; border: none; border-radius: 8px;
    font-size: 15px; cursor: pointer; font-family: inherit;
}
.btn-primary { background: #667eea; color: #fff; }
.btn-primary:hover { opacity: .92; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-default { background: #eee; color: #333; }
.btn-lg { padding: 13px 40px; font-size: 16px; border-radius: 10px; }

/* ========== 答题页 ========== */
.quiz-head { margin-bottom: 20px; }
.quiz-head h1 { font-size: 18px; margin-bottom: 12px; }
.quiz-progress { font-size: 13px; color: #888; }
.progress-bar {
    background: #eee; border-radius: 4px; height: 6px; overflow: hidden; margin-top: 8px;
}
.progress-inner { background: #667eea; height: 100%; transition: width .3s; }

.question-card { background: #fff; border-radius: 12px; padding: 22px 20px; margin-bottom: 16px; }
.q-title { font-size: 16px; margin-bottom: 18px; line-height: 1.6; }
.q-num { color: #667eea; font-weight: bold; margin-right: 8px; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.option {
    display: flex; align-items: center; padding: 14px 16px; border: 1.5px solid #eee;
    border-radius: 10px; cursor: pointer; transition: all .15s;
    background: #fff;
}
.option:hover { border-color: #c8cfff; background: #fafbff; }
.option input { display: none; }
.option input:checked + .option-label + .option-text,
.option input:checked ~ * { color: #667eea; }
.option:has(input:checked) { border-color: #667eea; background: #f7f8ff; }
.option-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; background: #f0f0f0;
    color: #666; font-size: 13px; font-weight: bold; margin-right: 12px; flex-shrink: 0;
}
.option:has(input:checked) .option-label { background: #667eea; color: #fff; }
.option-text { font-size: 14px; color: #333; }

.quiz-actions {
    display: flex; justify-content: center; gap: 12px; padding: 10px 0 30px;
    flex-wrap: wrap;
}

/* ========== 测评结果页 ========== */
.result-head { text-align: center; padding: 20px 0; }
.result-head h1 { font-size: 22px; margin-bottom: 6px; }
.result-sub { color: #888; font-size: 14px; }

/* 总分卡片（紫色渐变） */
.score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-radius: 14px; padding: 28px 20px; text-align: center;
    margin-bottom: 20px;
}
.score-label { font-size: 13px; opacity: .85; margin-bottom: 6px; }
.score-value { font-size: 44px; font-weight: bold; line-height: 1; }

.result-block { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.result-block h2 { font-size: 16px; margin-bottom: 14px; }
.result-content { color: #444; font-size: 14px; line-height: 1.8; }

/* 锁定状态（模糊 + 遮罩） */
.result-locked { position: relative; }
.result-locked .lock-text { color: #bbb; font-size: 14px; line-height: 1.8; filter: blur(4px); user-select: none; }
.result-locked .lock-mask {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.4); color: #667eea; font-weight: bold; font-size: 14px;
}

/* 解锁区 */
.unlock-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.unlock-section h2 { font-size: 16px; margin-bottom: 14px; }

.unlock-card {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
    flex-wrap: wrap; gap: 10px;
}
.unlock-card.highlight { border-color: #667eea; background: #f7f8ff; }
.unlock-card.member { border-color: #f5a623; background: #fffbf0; }
.unlock-info h3 { font-size: 15px; margin-bottom: 3px; }
.unlock-info p { font-size: 13px; color: #888; }
.unlock-action { display: flex; align-items: center; gap: 12px; }
.unlock-price { color: #667eea; font-weight: bold; font-size: 16px; }
.unlock-action .btn-primary { padding: 8px 16px; font-size: 14px; }

.result-footer { display: flex; gap: 12px; justify-content: center; padding: 20px 0; flex-wrap: wrap; }

/* ========== 解锁中间页 ========== */
.unlock-page { background: #fff; border-radius: 12px; padding: 26px 20px; }
.unlock-page h1 { font-size: 20px; margin-bottom: 6px; text-align: center; }
.unlock-page-sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 22px; }

.notice-card { background: #f7f8ff; border-radius: 10px; padding: 18px; text-align: center; }
.notice-card p { color: #666; font-size: 14px; margin-bottom: 12px; }
.notice-card h2 { font-size: 16px; margin-bottom: 10px; }

.unlock-methods { display: grid; gap: 12px; }
.method-card { border: 1px solid #eee; border-radius: 10px; padding: 16px; }
.method-card.highlight { border-color: #f5a623; background: #fffbf0; }
.method-card h3 { font-size: 15px; margin-bottom: 5px; }
.method-card p { font-size: 13px; color: #888; margin-bottom: 10px; }
.method-price { font-size: 18px; color: #667eea; font-weight: bold; margin-bottom: 10px; }

/* 通用输入框 */
.input-text {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; font-family: inherit; outline: none;
}
.input-text:focus { border-color: #667eea; }

/* ========== 手机端适配（屏幕宽度 ≤ 640px） ========== */
@media (max-width: 640px) {
    .hero h1 { font-size: 22px; }
    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-item .cover { height: 110px; }
    .card-item h3 { font-size: 14px; }
    .card-item .sub { font-size: 12px; }
    .price-row { flex-direction: column; gap: 2px; }
    .result-options { grid-template-columns: 1fr; }
    .detail-head h1 { font-size: 20px; }
}

/* ========== 注册/登录页 ========== */
.auth-box {
    background: #fff; border-radius: 12px; padding: 30px 24px;
    max-width: 420px; margin: 20px auto;
}
.auth-box h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 22px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 14px; color: #888; }
.auth-footer a { color: #667eea; }
.alert-error {
    background: #fee; color: #c33; border: 1px solid #fcc;
    padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
}

/* ========== 个人中心 ========== */
.my-head { padding: 10px 0 20px; }
.my-head h1 { font-size: 22px; }

.user-info-card {
    background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px;
}
.user-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.user-info-row:last-child { border-bottom: none; }
.user-info-label { color: #888; font-size: 14px; }
.user-info-value { color: #333; font-size: 14px; }

.my-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.my-section h2 { font-size: 16px; margin-bottom: 14px; }
.empty-tip-small { color: #999; font-size: 14px; text-align: center; padding: 20px; }
.empty-tip-small a { color: #667eea; }

.record-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f5f5f5; gap: 10px; flex-wrap: wrap;
}
.record-item:last-child { border-bottom: none; }
.record-title { font-size: 15px; color: #333; font-weight: 500; }
.record-meta { color: #999; font-size: 12px; display: flex; gap: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ========== 会员页 ========== */
.member-page { background: #fff; border-radius: 12px; padding: 26px 20px; }
.member-page h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.member-sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 24px; }

.member-benefits { background: #f7f8ff; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.member-benefits h2 { font-size: 15px; margin-bottom: 12px; }
.member-benefits ul { list-style: none; padding: 0; }
.member-benefits li { padding: 6px 0; color: #555; font-size: 14px; }

.member-plans h2 { font-size: 15px; margin-bottom: 12px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card {
    border: 1px solid #eee; border-radius: 10px; padding: 18px 12px; text-align: center;
    position: relative;
}
.plan-card.highlight { border-color: #667eea; background: #f7f8ff; }
.plan-badge {
    position: absolute; top: -8px; right: 8px;
    background: #667eea; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 8px;
}
.plan-name { font-size: 14px; color: #666; margin-bottom: 8px; }
.plan-price { font-size: 22px; color: #667eea; font-weight: bold; margin-bottom: 4px; }
.plan-period { font-size: 12px; color: #999; margin-bottom: 14px; }
.plan-card .btn-primary { padding: 8px 14px; font-size: 13px; }
.plan-tip { text-align: center; color: #999; font-size: 12px; margin-top: 14px; }

/* 手机端适配 */
@media (max-width: 640px) {
    .plans-grid { grid-template-columns: 1fr; }
    .record-item { flex-direction: column; align-items: flex-start; }
}

/* 成功提示 */
.alert-success {
    background: #efe; color: #2a2; border: 1px solid #cfc;
    padding: 10px 14px; border-radius: 6px; font-size: 14px;
    text-align: center;
}

/* ========== 支付页 ========== */
.pay-page { background: #fff; border-radius: 12px; padding: 26px 20px; }
.pay-page h1 { font-size: 20px; text-align: center; margin-bottom: 22px; }

.order-info { background: #f7f8ff; border-radius: 10px; padding: 18px; margin-bottom: 20px; }
.order-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #eef0ff;
}
.order-info-row:last-child { border-bottom: none; }
.order-info-label { color: #888; font-size: 14px; }
.order-info-value { color: #333; font-size: 14px; }
.order-info-value.amount { color: #667eea; font-size: 18px; font-weight: bold; }

.pay-notice {
    background: #fff8e1; border: 1px solid #ffe082;
    border-radius: 8px; padding: 14px; margin-bottom: 20px;
    text-align: center;
}
.pay-notice p { color: #8a6d3b; font-size: 14px; }

.pay-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    padding: 10px 0;
}

/* ========== 前台底部 ========== */
.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 28px 16px 24px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.footer-line {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}
.footer-about {
    color: #aaa;
    font-size: 12px;
    line-height: 1.8;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}