:root {
    --primary: #818cf8;
    --accent: #f43f5e;
    --bg: #030712;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

body {
    font-family: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0; padding: 15px;
    display: flex; justify-content: center;
    min-height: 100vh; overflow-x: hidden;
}

#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

.container {
    max-width: 600px; width: 100%;
    background: var(--card-bg);
    padding: 35px 25px; border-radius: 28px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    margin-top: 20px; backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.08);
}

h1 { text-align: center; font-size: 1.6em; letter-spacing: 2px; color: #fff; }
.subtitle { text-align: center; color: var(--text-dim); font-size: 0.82em; margin-bottom: 40px; }

.q-block { margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 25px; transition: background-color 0.5s ease; }
.q-text { font-size: 1.05em; line-height: 1.7; margin-bottom: 20px; color: #e2e8f0; }

.scale-group { display: flex; justify-content: space-between; align-items: center; }
.radio-dot { width: 22px; height: 22px; cursor: pointer; accent-color: var(--primary); transform: scale(1.1); }

.binary-group { display: flex; flex-direction: column; gap: 12px; }
.binary-opt {
    background: rgba(51, 65, 85, 0.5); padding: 16px; border-radius: 12px;
    cursor: pointer; transition: 0.3s; border: 1px solid transparent; font-size: 0.95em;
}
.binary-opt.active { border-color: var(--primary); background: var(--primary); color: #fff; }

#color-strip { height: 10px; width: 80px; margin: 0 auto; border-radius: 5px; }
.color-tag { text-align: center; font-size: 0.9em; margin-top: 5px; margin-bottom: 15px; font-weight: bold; }

.res-type { font-size: 4.2em; text-align: center; font-weight: 900; letter-spacing: 10px; margin: 5px 0; }
.section-title { font-size: 1.1em; color: var(--primary); font-weight: bold; margin-top: 35px; border-left: 4px solid var(--primary); padding-left: 12px; }
.res-desc { line-height: 1.9; color: #cbd5e1; background: rgba(15, 23, 42, 0.5); padding: 22px; border-radius: 16px; margin: 15px 0; font-size: 0.95em; }

.prob-row { margin-bottom: 18px; }
.prob-label { display: flex; justify-content: space-between; font-size: 0.75em; margin-bottom: 6px; color: var(--text-dim); }
.prob-bar-bg { height: 7px; background: #334155; border-radius: 4px; overflow: hidden; }
.prob-bar-fill { height: 100%; background: var(--primary); width: 0%; transition: width 1.8s cubic-bezier(0.1, 0, 0.3, 1); }

.btn { width: 100%; padding: 18px; background: var(--primary); color: #fff; border: none; border-radius: 14px; font-weight: bold; cursor: pointer; font-size: 1.1em; }
.hidden { display: none !important; }
.spinner { border: 4px solid #334155; border-top: 4px solid var(--accent); border-radius: 50%; width: 45px; height: 45px; animation: spin 1s linear infinite; margin: 25px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

#share-img { width: 100%; border-radius: 12px; margin-top: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); display: none; }
.match-group { display: flex; gap: 12px; margin-top: 20px; }
.match-item { flex: 1; background: rgba(0,0,0,0.3); padding: 15px; border-radius: 14px; font-size: 0.9em; text-align: center; border: 1px solid rgba(255,255,255,0.03); }
.match-val { color: var(--accent); font-weight: bold; margin-top: 5px; font-size: 1.1em; }