/* 面相洞察 - 冷淡治愈SVG信息图美学 */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --border-color: #e2e8f0;
    --bg-muted: #f1f5f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }

body { background: var(--bg-main); color: var(--text-primary); -webkit-font-smoothing: antialiased; }

.xxd-app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; overflow-x: hidden; }

.xxd-screen { display: none; padding: 24px 20px; min-height: 100vh; animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.xxd-screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Header */
.xxd-header { display: flex; align-items: center; margin-bottom: 30px; }
.xxd-back-btn { color: var(--text-secondary); text-decoration: none; font-size: 14px; position: absolute; }
.xxd-header h2 { flex: 1; text-align: center; font-size: 18px; font-weight: 500; letter-spacing: 1px; color: var(--text-primary); }

/* Upload Area */
.xxd-upload-area {
    background: var(--bg-card); border: 1px dashed #cbd5e1;
    border-radius: 20px; height: 300px; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; margin-bottom: 30px; cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.xxd-upload-placeholder { text-align: center; pointer-events: none; }
.xxd-icon { font-size: 48px; margin-bottom: 16px; display: block; opacity: 0.8; }
.xxd-upload-placeholder p { font-size: 16px; font-weight: 500; margin-bottom: 8px; color: var(--text-primary); }
.xxd-subtext { font-size: 13px; color: var(--text-secondary); }
#preview-image { width: 100%; height: 100%; object-fit: cover; position: absolute; z-index: 1; opacity: 0.85; filter: grayscale(20%) contrast(1.1); }
.xxd-scan-mesh {
    position: absolute; width: 100%; height: 100%; z-index: 2; top: 0; display: none;
    background-image: linear-gradient(var(--accent-blue) 1px, transparent 1px);
    background-size: 100% 20px; animation: scanMesh 3s linear infinite; opacity: 0.3;
}
@keyframes scanMesh { 0% { background-position: 0 0; } 100% { background-position: 0 100%; } }

/* Question Area */
.xxd-question-area h3 { font-size: 15px; margin-bottom: 16px; font-weight: 500; color: var(--text-secondary); }
.xxd-quick-questions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.xxd-q-btn {
    background: var(--bg-card); border: 1px solid var(--border-color); text-align: left;
    color: var(--text-primary); padding: 14px 20px; border-radius: 12px;
    font-size: 15px; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.xxd-q-btn.selected { background: #eff6ff; border-color: #bfdbfe; color: var(--accent-blue); font-weight: 500; }

/* Actions */
.xxd-action-area { margin-top: 40px; text-align: center; }
.xxd-main-btn {
    width: 100%; padding: 16px; background: var(--text-primary); color: #fff;
    border: none; border-radius: 14px; font-size: 16px; font-weight: 500;
    cursor: pointer; transition: 0.2s; box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}
.xxd-main-btn:disabled { background: var(--border-color); color: var(--text-secondary); cursor: not-allowed; box-shadow: none; }
.xxd-btn-blue { background: var(--accent-blue); }
.xxd-outline-btn {
    width: 100%; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 14px; font-size: 16px; font-weight: 500;
    cursor: pointer; margin-top: 16px;
}
.xxd-quota-tip { font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.xxd-quota-tip span.highlight { color: var(--accent-blue); font-weight: 500; }

/* Loading Screen */
.xxd-loading-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 80vh; text-align: center;
}
.xxd-scanner {
    width: 80px; height: 100px; border: 2px solid var(--border-color); border-radius: 40px;
    position: relative; overflow: hidden; margin-bottom: 30px;
}
.xxd-scanner-line {
    position: absolute; width: 100%; height: 4px; background: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.5);
    animation: scanUpDown 2s ease-in-out infinite;
}
@keyframes scanUpDown { 0% { top: 10%; } 50% { top: 90%; } 100% { top: 10%; } }
.xxd-loading-container h3 { font-size: 18px; margin-bottom: 12px; color: var(--text-primary); font-weight: 500; }
.xxd-loading-container p { color: var(--text-secondary); font-size: 14px; }

/* Report Screen */
.xxd-report-container { padding-bottom: 20px; }
.xxd-report-header { margin-bottom: 30px; text-align: center; }
.xxd-r-question { font-size: 22px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; color: var(--text-primary); }
.xxd-r-subtitle { font-size: 13px; color: var(--text-secondary); }

.xxd-face-map {
    height: 200px; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border-color);
    margin-bottom: 30px; position: relative; display: flex; justify-content: center; align-items: center;
}
.xxd-face-silhouette {
    width: 120px; height: 160px; border: 1.5px dashed #cbd5e1; border-radius: 60px 60px 80px 80px; position: relative;
}
.xxd-pin {
    position: absolute; width: 24px; height: 24px; background: #eff6ff; border: 2px solid var(--accent-blue);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transform: translate(-50%, -50%); z-index: 10;
}
.xxd-pin span { color: var(--accent-blue); font-size: 12px; font-weight: 600; }

.xxd-evidence-section { margin-bottom: 30px; }
.xxd-evidences-list { display: flex; flex-direction: column; gap: 16px; }
.xxd-evidence-card {
    background: var(--bg-card); border: 1px solid var(--border-color); padding: 20px; border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.xxd-e-row { display: flex; margin-bottom: 12px; }
.xxd-e-label { width: 70px; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.xxd-e-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.xxd-e-meaning { font-size: 14px; color: var(--text-secondary); line-height: 1.6; background: var(--bg-muted); padding: 12px; border-radius: 8px; margin-top: 12px; }

.xxd-conclusion-block {
    background: #eff6ff; padding: 24px; border-radius: 16px; border: 1px solid #bfdbfe;
}
.xxd-conclusion-block h3 { font-size: 16px; color: var(--accent-blue); margin-bottom: 12px; font-weight: 600; }
.xxd-conclusion-block p { font-size: 15px; color: #1e3a8a; line-height: 1.6; }

.xxd-report-actions { margin-top: 40px; }
