﻿/* --- 全局与布局 --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background-color: #f0f7ff; color: #333; }
body:not(.hall-body) { overflow: hidden; }
.app-container { width: 100%; height: 100%; max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; background-color: white; box-shadow: 0 0 20px rgba(0,0,0,0.05); transition: filter 0.3s ease; }

/* --- 弹窗样式 --- */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; display: flex; justify-content: center; align-items: center; padding: 20px; opacity: 1; transition: opacity 0.3s ease, visibility 0.3s; }
.popup-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.popup-card { position: relative; background-color: white; border-radius: 16px; padding: 25px; text-align: center; max-width: 350px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.popup-card h2, .popup-card h3 { margin-top: 0; color: #333; }
.popup-card p { color: #666; line-height: 1.6; margin-bottom: 25px; }
.ad-card p { margin-bottom: 15px; }
.close-btn { position: absolute; top: 5px; right: 10px; background: none; border: none; font-size: 24px; color: #aaa; cursor: pointer; }
.qr-code-img { width: 150px; height: 150px; margin-bottom: 10px; }
.small-text { font-size: 14px; color: #999; }

/* --- 顶部导航 --- */
.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 10px; width: 100%; height: 50px; background-color: #fff; border-bottom: 1px solid #eee; flex-shrink: 0; }
.nav-btn { width: 40px; height: 30px; background: none; border: none; font-size: 24px; color: #888; cursor: pointer; flex-shrink: 0; }
.back-btn { visibility: hidden; text-align: left; }
.more-btn { font-weight: bold; text-align: right; }
.progress-container { flex-grow: 1; height: 6px; background-color: #e9ecef; border-radius: 3px; overflow: hidden; margin-right: 0; }
.progress-bar { width: 0%; height: 100%; background-color: #4a90e2; transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); }

/* --- 页面与过渡 --- */
#page-container { flex-grow: 1; position: relative; overflow: hidden; }
.step { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 30px 25px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background-color: white; transition: transform 0.4s cubic-bezier(0.45, 0.05, 0.55, 0.95), opacity 0.4s; transform: translateX(100%); visibility: hidden; opacity: 0; }
.step.active { transform: translateX(0); visibility: visible; opacity: 1; }
.step.previous { transform: translateX(-100%); }
/* ⭐⭐⭐ 终极修复：使用专属class来为结果页设置特殊样式！ ⭐⭐⭐ */
.step.result-page {
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- 文本元素等 (后面所有代码保持不变) --- */
.title { font-size: 28px; font-weight: 600; color: #333; margin: 0 0 10px; }
.version-tag { font-size: 14px; font-weight: 500; color: #fff; background-color: #4a90e2; padding: 2px 8px; border-radius: 5px; vertical-align: middle; }
.subtitle { font-size: 16px; color: #888; margin: 0 0 40px; }
.question { font-size: 20px; font-weight: 500; color: #333; margin: 0 0 30px; }
.options-container { width: 100%; display: flex; flex-direction: column; gap: 15px; }
.btn { width: 100%; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s ease; background-color: #f0f7ff; color: #4a90e2; display: block; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background-color: #4a90e2; color: white; }
.btn-secondary { border: 1px solid #d0e1f9; background-color: #fff;}
.option-btn.selected { background-color: #4a90e2; color: white; }
.skip-btn { margin-top: 10px; background-color: #f8f9fa; color: #888; border: 1px solid #eee; }
.input-field, .textarea-field { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 12px; font-size: 16px; font-family: inherit; text-align: center; margin-bottom: 20px; }
.textarea-field { min-height: 120px; resize: none; text-align: left; }
.mbti-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.mbti-btn { padding: 12px 5px; font-size: 14px; font-weight: bold; border-radius: 8px; border: 1px solid #d0e1f9; background-color: white; color: #4a90e2; }
.mbti-btn.selected { background-color: #4a90e2; color: white; }
.loader { border: 8px solid #f3f3f3; border-radius: 50%; border-top: 8px solid #4a90e2; width: 60px; height: 60px; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.result-icon { font-size: 60px; margin-bottom: 15px; }
.result-text { font-size: 28px; font-weight: bold; margin-bottom: 20px; }
.result-text.truth { color: #28a745; }
.result-text.lie { color: #dc3545; }
.result-text.apple { color: #555; }
.result-text.android { color: #3DDC84; }
.analysis-text { background-color: #f8f9fa; border-radius: 8px; padding: 15px; font-size: 15px; line-height: 1.6; color: #495057; text-align: left; margin-bottom: 20px; width: 100%; white-space: pre-wrap; }
.footer-actions { width: 100%; display: flex; flex-direction: column; gap: 15px; margin-top: auto; padding-top: 20px; flex-shrink: 0; }

/* --- 测试大厅页面专属样式 --- */
.hall-body { background-color: #f0f7ff; }
.hall-scroll-container { width: 100%; height: 100vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.hall-container { width: 100%; max-width: 800px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.hall-title { font-size: 36px; font-weight: 700; color: #333; }
.hall-subtitle { font-size: 18px; color: #888; margin-bottom: 50px; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.test-card { background-color: white; border-radius: 16px; padding: 25px; text-decoration: none; color: inherit; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; overflow: hidden; cursor: pointer; }
.test-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.card-icon { font-size: 40px; margin-bottom: 15px; }
.card-title { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.card-desc { font-size: 14px; color: #888; margin: 0; }
.test-card.disabled { opacity: 0.5; cursor: not-allowed; background-color: #f8f9fa; }
.test-card.disabled:hover { transform: none; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.status-tag { position: absolute; top: 10px; right: 10px; background-color: #ffc107; color: #333; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 5px; }
.hall-footer { margin-top: 60px; font-size: 12px; color: #aaa; }

/* --- 留言板区域样式 --- */
.comment-section { margin-top: 60px; background-color: #fff; padding: 20px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.comment-title { font-size: 24px; font-weight: 600; margin-top: 0; margin-bottom: 20px; text-align: center; }

/* --- 新增样式 --- */
.status-tag.wechat-tag { background-color: #07c160; color: white; }
.special-entry-btn { position: absolute; bottom: 20px; left: 25px; background-color: #fdf6e3; color: #b58900; padding: 8px 15px; font-size: 14px; border-radius: 20px; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s ease; }
.special-entry-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }/* --- 赞赏悬浮球 & 赞赏页面样式 (追加到末尾) --- */

/* 赞赏悬浮球 */
.support-fab {
    position: fixed;
    bottom: 20px; /* 改为右下角，避免与左上角返回按钮冲突 */
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #ff8c94; /* 温暖的粉红色 */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.2s ease;
}
.support-fab:hover {
    transform: scale(1.1);
}

/* 赞赏页面容器 */
.support-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.back-to-hall-btn {
    display: inline-block;
    margin-bottom: 30px;
    color: #888;
    text-decoration: none;
}

.support-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.support-story {
    background-color: #fff;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.support-story h2 {
    margin-top: 0;
}

.support-story p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.support-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
}
.support-box h2 {
    margin-top: 0;
}
.support-subtitle {
    font-size: 14px;
    color: #e53935; /* 红色醒目提示 */
    font-weight: 500;
}
.qr-code-group {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}
.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.qr-code-item img {
    width: 150px;
    height: 150px;
}
.qr-code-item p {
    margin: 0;
    font-weight: 500;
}
.support-amount {
    font-size: 14px;
    color: #999;
}


/* --- QQ频道引流模块样式 --- */
.community-section {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    gap: 30px; 
}
.community-text { flex: 1; min-width: 250px; text-align: left; }
.community-text h2 { font-size: 24px; font-weight: 600; margin-top: 0; margin-bottom: 15px; }
.community-text p { font-size: 16px; color: #666; line-height: 1.7; margin: 0; }
.community-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.community-qr img { width: 140px; height: 140px; border-radius: 8px; }
.community-qr p { font-size: 14px; color: #888; margin: 0; }

@media (max-width: 600px) {
    .community-section { flex-direction: column; padding: 20px; gap: 20px; }
    .community-text { text-align: center; }
}