body { background-color: #0f172a !important; color: #f8fafc !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 15px; margin: 0; line-height: 1.6; }
.container { max-width: 550px; margin: 20px auto; background: #1e293b; padding: 25px; border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid #334155; }

/* 全域主標題樣式 */
.main-title { text-align: center; color: #f8fafc; font-size: 1.4rem; font-weight: 800; margin-top: 0; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #334155; letter-spacing: 1px; }

.phase-indicator { color: #60a5fa; font-weight: 800; margin-bottom: 5px; font-size: 1.15rem; border-left: 5px solid #60a5fa; padding-left: 12px; text-transform: uppercase; }
.phase-desc { font-size: 0.85rem; color: #94a3b8; margin-bottom: 25px; padding-left: 17px; }
.question { margin-bottom: 25px; padding: 20px; border-radius: 16px; border: 2px solid #334155; background: #0f172a; transition: border-color 0.3s; }
.options { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
label { cursor: pointer; padding: 16px; border: 1.5px solid #334155; border-radius: 12px; font-size: 0.95rem; display: block; background: #1e293b; color: #f1f5f9; transition: 0.2s; }
label:hover { border-color: #60a5fa; background: #334155; }
input[type="radio"] { margin-right: 12px; accent-color: #60a5fa; transform: scale(1.1); }
button { width: 100%; padding: 18px; background: #3b82f6; color: white; border: none; border-radius: 14px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: 0.2s; }
button:hover { background: #2563eb; transform: translateY(-2px); }

#mbti-type { font-size: 4.5rem; font-weight: 900; color: #60a5fa; text-align: center; margin: 10px 0 0 0; letter-spacing: -1px; line-height:1; }
.chart-container { width: 100%; max-width: 350px; margin: 0 auto; position: relative; }
#anomaly-warning { background: #78350f; border: 1px solid #fbbf24; color: #fde68a; padding: 15px; border-radius: 12px; font-size: 0.9rem; margin-bottom: 15px; line-height: 1.5; }
.score-table-wrapper { display: flex; justify-content: center; overflow-x: auto; margin: 25px 0; }
table { width: 100%; max-width: 480px; border-collapse: collapse; background: #0f172a; border-radius: 12px; font-size: 0.75rem; color: #cbd5e1; border: 1px solid #334155; }
th, td { padding: 12px 6px; text-align: center; border: 1px solid #334155; }
th { background: #1e293b; color: #94a3b8; font-weight: 600; }
td { font-weight: 700; color: #60a5fa; }
#analysis-text { padding: 25px; background: #0f172a; border-radius: 18px; border: 1px solid #334155; margin-top: 25px; }
.report-section { margin-bottom: 25px; border-bottom: 1px solid #334155; padding-bottom: 15px; }
.report-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.report-section h3 { color: #60a5fa; margin-top: 0; font-size: 1.1rem; letter-spacing: 1px; }
.report-section p { font-size: 0.95rem; color: #e2e8f0; margin: 8px 0; line-height: 1.7; }
.hidden { display: none !important; }

/* 按鈕群組排版 */
.action-buttons { display: flex; gap: 15px; margin-top: 25px; }
.btn-primary { background: #2563eb; flex: 1; font-size: 1rem; padding: 15px; }
.btn-secondary { background: #475569; margin-top: 15px; font-size: 1rem; }
.btn-secondary:hover { background: #334155; }

/* 演算過場動畫 */
#loading-screen { text-align: center; padding: 50px 0; }
.spinner { width: 50px; height: 50px; border: 5px solid #334155; border-top: 5px solid #60a5fa; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { color: #60a5fa; font-weight: 700; letter-spacing: 2px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }