/* ==========================================
   全局变量与基础重置
   ========================================== */
:root {
    --bg-outside: #0a0000; /* 浏览器最外层背景，极暗 */
    --card-red: #8f0808; /* 图中的纯血红 */
    --card-red-gradient: linear-gradient(180deg, #990a0a 0%, #6b0000 100%);
    --gold-text: #f5d787; /* 图中的主视觉金色 */
    --btn-dark: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #ffbaba; /* 浅红灰色的小字 */
    --border-color: rgba(255, 255, 255, 0.2);
}

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

body {
    background: radial-gradient(circle at top, #6b0505 0%, #1a0000 100%) !important;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* ==========================================
   主容器 (模拟图中的红色卡片质感)
   ========================================== */
#app-container {
    width: 100%;
    max-width: 480px;
    background: var(--card-red-gradient);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

/* ==========================================
   页面切换显示逻辑
   ========================================== */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.page.hidden {
    opacity: 0;
    visibility: hidden;
    z-index: 0;
}

.scrollable {
    overflow-y: auto;
    position: relative;
    height: 100%;
    display: block;
}

/* ==========================================
   首页验证模块
   ========================================== */
#page-home {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.title-box {
    margin-bottom: 60px;
}

.eng-title {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 6px;
    margin-bottom: 30px;
}

.title-box h1 {
    font-size: 42px;
    color: var(--gold-text);
    text-shadow: 0 2px 10px rgba(245, 215, 135, 0.3);
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 900;
}

.title-box .subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    letter-spacing: 1px;
}

.auth-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 18px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--gold-text);
}

/* ==========================================
   通用按钮样式 (黑底金边圆角)
   ========================================== */
.btn-primary {
    width: 100%;
    padding: 18px;
    background-color: var(--btn-dark);
    color: var(--gold-text);
    border: 1px solid var(--gold-text);
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 4px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--gold-text);
    color: var(--btn-dark);
}

/* ==========================================
   答题模块调整
   ========================================== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

#progress-text {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

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

#question-text {
    font-size: 22px;
    line-height: 1.6;
    font-weight: bold;
}

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

/* 选项改为图中的黑底圆角 */
.option-btn {
    width: 100%;
    padding: 18px 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.option-btn:hover, .option-btn:active {
    border-color: var(--gold-text);
    background-color: rgba(0, 0, 0, 0.6);
}

/* ==========================================
   答题模块
   ========================================== */
.progress-bar {
    margin-bottom: 40px;
}

#progress-text {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: right;
}

.progress-track {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--crimson-main);
    transition: width 0.3s ease;
}

.question-container {
    margin-bottom: 40px;
    min-height: 80px;
}

#question-text {
    font-size: 20px;
    line-height: 1.5;
    font-weight: normal;
}

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

.option-btn {
    width: 100%;
    padding: 16px 20px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover, .option-btn:active {
    border-color: var(--crimson-main);
    background-color: rgba(138, 3, 3, 0.1);
}

/* ==========================================
   加载过渡动画
   ========================================== */
#page-loading {
    justify-content: center;
    align-items: center;
}

.loading-animation {
    width: 60px;
    height: 60px;
    margin-bottom: 30px;
    position: relative;
}

.crimson-pulse {
    width: 100%;
    height: 100%;
    background-color: var(--crimson-main);
    border-radius: 50%;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.loading-text {
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-size: 14px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   结果页模块
   ========================================== */
.module {
    margin-bottom: 30px;
}

.module-title {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.module-main-sin {
    text-align: center;
    margin-top: 20px;
}

#result-main-sin-name {
    font-size: 48px;
    color: var(--gold-highlight);
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.sin-quote {
    font-size: 16px;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.radar-chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.sin-desc, .roast-text, .combo-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: justify;
}

.divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 30px 0;
}

.module-advice h4 {
    color: var(--crimson-main);
    margin-bottom: 10px;
    font-size: 16px;
}

.module-advice p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.share-box {
    margin-top: 40px;
    margin-bottom: 40px;
}
/* ==========================================
   UI 视觉规范深度定制 (覆盖原有基础样式)
   ========================================== */
   
/* 1. 标题 / 主罪名：硬朗加粗黑体 + 暖金 + 微金发光 */
.title-box h1, 
.title-box h2, 
#result-main-sin-name {
    font-family: "Arial Black", "Source Han Sans Heavy", "Noto Sans SC", sans-serif;
    font-weight: 900;
    color: #F2D488;
    letter-spacing: -1px; /* 字距略收紧 */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px rgba(242, 212, 136, 0.35); /* 暗色阴影 + 微金发光 */
}

/* 2. 题目正文：加粗黑体，暖金 */
#question-text {
    font-family: "Source Han Sans Bold", "Noto Sans SC", sans-serif;
    font-weight: bold;
    color: #F2D488;
    font-size: 20px;
    line-height: 1.6;
}

/* 3. 次要文字 (进度、副标题等)：米白，透明度 65% */
#progress-text, 
.subtitle, 
.eng-title {
    color: rgba(245, 230, 200, 0.65); /* 米白 #F5E6C8 + 透明度 */
}

/* 4. 选项框 (深黑底 + 细描边) */
.option-btn {
    background-color: rgba(10, 6, 6, 0.82);
    border: 1px solid #3a2020;
    color: #EADFCB; /* 选项文字米白 */
    font-weight: 500;
}

/* 5. 选项选中态/悬浮态 */
.option-btn:hover, 
.option-btn:active {
    background-color: rgba(0, 0, 0, 0.92);
    border-color: #8a6a2e; /* 描边微微泛暗金 */
    color: #F2D488; /* 文字点亮 */
    box-shadow: 0 4px 12px rgba(138, 106, 46, 0.25); /* 轻阴影反馈 */
    transform: translateY(-1px);
}

/* 6. 上/下一题 药丸状幽灵按键 (Ghost Button) 深度定制 */
.nav-text-btn {
    background-color: rgba(0, 0, 0, 0.3); /* 30%透明度的深黑底座 */
    border: 1px solid rgba(242, 212, 136, 0.3); /* 纤细的半透明暗金描边 */
    border-radius: 20px; /* 药丸状圆角 */
    padding: 8px 18px; /* 明确的按压区域 */
    color: rgba(245, 230, 200, 0.65); /* 米白文字 */
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 微微的立体感 */
}

/* 触摸选中/悬浮态：纯金描边 + 微发光阴影 + 文字提亮 */
.nav-text-btn:hover, 
.nav-text-btn:active {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: #F2D488;
    color: #F2D488;
    box-shadow: 0 0 8px rgba(242, 212, 136, 0.4);
    transform: translateY(-1px);
}

.nav-text-btn:hover {
    color: #F2D488;
}
/* ==========================================
   加载动画特效：灵魂扫描仪
   ========================================== */
.spin-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-outer {
    top: 0; left: 0; right: 0; bottom: 0;
    border-top-color: rgba(242, 212, 136, 0.8); /* 金色 */
    border-bottom-color: rgba(242, 212, 136, 0.2);
    animation: spin 1.5s linear infinite reverse;
}

.ring-inner {
    top: 15px; left: 15px; right: 15px; bottom: 15px;
    border-left-color: #8f0808; /* 猩红 */
    border-right-color: rgba(143, 8, 8, 0.3);
    animation: spin 1s linear infinite;
}

.loading-core {
    position: absolute;
    top: 35px; left: 35px; right: 35px; bottom: 35px;
    background-color: #8f0808;
    border-radius: 50%;
    box-shadow: 0 0 15px #8f0808, 0 0 30px #8f0808;
    animation: pulse-core 1.2s ease-in-out infinite alternate;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse-core { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(1.5); opacity: 1; } }
/* ==========================================
   全新结果页专属 UI 模块样式
   ========================================== */

/* 第三部分：维度排行榜条目 */
.rank-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px; /* 限制最大宽度，确保在大屏上依然紧凑居中 */
    font-size: 13px;
    color: rgba(245, 230, 200, 0.85);
}
.rank-name {
    width: 35px;
    text-align: right;
    margin-right: 12px;
    font-weight: bold;
}
.rank-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(245, 230, 200, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-right: 12px;
}
.rank-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7a1015, #F2D488);
    border-radius: 3px;
    transition: width 1s ease-out;
}
.rank-score {
    width: 40px;
    text-align: left;
    color: #F2D488;
    font-family: "Arial Black", sans-serif;
    font-size: 12px;
}

/* 第四部分：洞察总结 (冷色调/理性卡片) */
.card-insight {
    background-color: rgba(20, 26, 35, 0.8); /* 深曜石/灰蓝色 */
    border: 1px solid #4a5568; /* 冷银色细边框 */
    border-radius: 16px; /* 大圆角包裹 */
    padding: 22px;
    margin-bottom: 25px;
    color: rgba(245, 230, 200, 0.85);
    line-height: 1.7;
    text-align: justify;
    font-size: 14px;
}
.card-insight .card-title {
    color: #a0aec0; /* 偏冷的金属灰 */
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 1px;
}

/* 第五部分：毒舌吐槽 (暖色调/情绪锋利卡片) */
.card-roast {
    background: linear-gradient(90deg, rgba(45, 10, 10, 0.8) 0%, rgba(10, 5, 5, 0.3) 100%); /* 凝血暗红渐变 */
    border-left: 4px solid #F2D488; /* 左侧亮金锋利切割 */
    padding: 22px 20px 22px 18px;
    color: #EADFCB;
    text-align: justify;
}
.card-roast .card-title {
    color: #F2D488;
    font-size: 16px;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.roast-tags {
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(245, 230, 200, 0.6);
    border-bottom: 1px dashed rgba(242, 212, 136, 0.2);
    padding-bottom: 12px;
}
.roast-tags p {
    margin-bottom: 4px;
}
/* 玻璃管外壳 */
.rank-bar-bg {
    flex: 1;
    height: 14px;
    background: rgba(255, 255, 255, 0.05); /* 半透明的玻璃管 */
    border: 1px solid rgba(255, 255, 255, 0.15); /* 管壁的高光反光 */
    border-radius: 20px;
    padding: 2px; /* 留出管壁的厚度 */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6); /* 管内部的暗影，体现立体感 */
}

/* 玻璃管内的发光液体 */
.rank-bar-fill {
    height: 100%;
    border-radius: 20px;
    /* 默认颜色，会被 JS 里的专属颜色覆盖 */
    background: #F2D488; 
    transition: width 1s ease-in-out;
}
/* ==========================================
   全新高级感答题页 UI 优化
   ========================================== */
/* 1. 题目文字：收敛锋芒，增加呼吸感 */
#question-text {
    font-size: 18px !important;       /* 缩小字号 */
    font-weight: normal !important;   /* 取消粗体，显得更精致 */
    line-height: 1.6 !important;      /* 增加行高，阅读更舒适 */
    color: #F2D488 !important;        /* 保持主视觉金色 */
    text-align: justify;              /* 两端对齐，边缘更整齐 */
    margin-bottom: 25px;              /* 和下方选项拉开距离 */
    padding: 0 10px;                  /* 两侧留白 */
}

/* 2. 选项外框：半透明暗黑质感卡片 */
.option-btn {
    width: 100%;
    display: block;
    background: rgba(15, 0, 0, 0.5) !important; /* 深邃的半透明黑红底色 */
    border: 1px solid rgba(242, 212, 136, 0.2) !important; /* 极细的暗金边框 */
    border-radius: 12px !important;   /* 圆润的倒角 */
    padding: 16px 20px !important;    /* 增加内部留白，显得大气 */
    margin-bottom: 15px !important;   /* 选项之间的间距 */
    
    /* 3. 选项文字：左对齐排版 */
    font-size: 15px !important;
    color: rgba(245, 230, 200, 0.9) !important; 
    text-align: left !important;      /* 多行文字左对齐才好看 */
    line-height: 1.5 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

/* 4. 用户点击选项时的反馈动画 */
.option-btn:active {
    background: rgba(242, 212, 136, 0.2) !important; /* 点击时微微闪耀金色 */
    transform: scale(0.98); /* 点击时微微内缩 */
}
/* ==========================================
   答题页高级感微调：极致紧凑与精细化
   ========================================== */

/* 1. 题目：稍微缩小字号，减小和选项之间的割裂感 */
#question-text {
    font-size: 16px !important;       /* 字号变小，显得更精致 */
    margin-bottom: 12px !important;   /* 大幅缩小题目和第一个选项的距离 */
    line-height: 1.5 !important;
}

/* 2. 选项外框：瘦身，变得更像精致的暗黑卡牌 */
.option-btn {
    padding: 12px 16px !important;    /* 缩小内部的上下左右留白 */
    margin-bottom: 10px !important;   /* 缩小每个选项之间的缝隙 */
    border-radius: 8px !important;    /* 稍微减小圆角，显得更锐利专业 */
}

/* 3. 选项文字：更细腻的阅读体验 */
.option-btn {
    font-size: 14px !important;       /* 缩小选项文字 */
    line-height: 1.4 !important;
}