* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #0a0e27; color: #fff; }
#starfield { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; background: radial-gradient(ellipse at center, #1a1f4e 0%, #0a0e27 50%, #050816 100%); }
.star { position: absolute; background: #fff; border-radius: 50%; animation: twinkle var(--dur) ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }
.page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity 0.4s ease; }
.page.active { display: flex; opacity: 1; }
.planet-orbit { position: relative; width: 260px; height: 260px; margin-bottom: 28px; }
.planet-orbit::before { content: ''; position: absolute; top: 50%; left: 50%; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; transform: translate(-50%, -50%); }
.planet-orbit::after { content: ''; position: absolute; top: 50%; left: 50%; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,0.06); border-radius: 50%; transform: translate(-50%, -50%); }
.planet-core { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; background: radial-gradient(circle at 30% 30%, #fff, #8b7fff 40%, #4a3fbf 80%); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 40px rgba(139,127,255,0.6), 0 0 80px rgba(139,127,255,0.3); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 40px rgba(139,127,255,0.6), 0 0 80px rgba(139,127,255,0.3); } 50% { box-shadow: 0 0 60px rgba(139,127,255,0.8), 0 0 120px rgba(139,127,255,0.4); } }
.planet { position: absolute; width: 26px; height: 26px; border-radius: 50%; top: 50%; left: 50%; }
.planet:nth-child(2) { background: radial-gradient(circle at 30% 30%, #ff8a8a, #c0392b); box-shadow: 0 0 15px rgba(192,57,43,0.7); animation: orbit1 8s linear infinite; }
.planet:nth-child(3) { background: radial-gradient(circle at 30% 30%, #ffd93d, #f39c12); box-shadow: 0 0 15px rgba(243,156,18,0.7); animation: orbit2 10s linear infinite; }
.planet:nth-child(4) { background: radial-gradient(circle at 30% 30%, #6effc1, #1abc9c); box-shadow: 0 0 15px rgba(26,188,156,0.7); animation: orbit3 12s linear infinite; }
.planet:nth-child(5) { background: radial-gradient(circle at 30% 30%, #fff176, #f1c40f); box-shadow: 0 0 15px rgba(241,196,15,0.7); animation: orbit4 9s linear infinite; }
.planet:nth-child(6) { background: radial-gradient(circle at 30% 30%, #81ff9e, #27ae60); box-shadow: 0 0 15px rgba(39,174,96,0.7); animation: orbit5 11s linear infinite; }
.planet:nth-child(7) { background: radial-gradient(circle at 30% 30%, #d4a5ff, #8e44ad); box-shadow: 0 0 15px rgba(142,68,173,0.7); animation: orbit6 13s linear infinite; }
.planet:nth-child(8) { background: radial-gradient(circle at 30% 30%, #ff9ecd, #e91e63); box-shadow: 0 0 15px rgba(233,30,99,0.7); animation: orbit7 7s linear infinite; }
@keyframes orbit1 { from { transform: translate(-50%,-50%) rotate(0deg) translateX(95px) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg) translateX(95px) rotate(-360deg); } }
@keyframes orbit2 { from { transform: translate(-50%,-50%) rotate(51deg) translateX(95px) rotate(-51deg); } to { transform: translate(-50%,-50%) rotate(411deg) translateX(95px) rotate(-411deg); } }
@keyframes orbit3 { from { transform: translate(-50%,-50%) rotate(103deg) translateX(95px) rotate(-103deg); } to { transform: translate(-50%,-50%) rotate(463deg) translateX(95px) rotate(-463deg); } }
@keyframes orbit4 { from { transform: translate(-50%,-50%) rotate(154deg) translateX(95px) rotate(-154deg); } to { transform: translate(-50%,-50%) rotate(514deg) translateX(95px) rotate(-514deg); } }
@keyframes orbit5 { from { transform: translate(-50%,-50%) rotate(206deg) translateX(95px) rotate(-206deg); } to { transform: translate(-50%,-50%) rotate(566deg) translateX(95px) rotate(-566deg); } }
@keyframes orbit6 { from { transform: translate(-50%,-50%) rotate(257deg) translateX(95px) rotate(-257deg); } to { transform: translate(-50%,-50%) rotate(617deg) translateX(95px) rotate(-617deg); } }
@keyframes orbit7 { from { transform: translate(-50%,-50%) rotate(309deg) translateX(95px) rotate(-309deg); } to { transform: translate(-50%,-50%) rotate(669deg) translateX(95px) rotate(-669deg); } }
.main-title { font-size: 30px; font-weight: 800; text-align: center; letter-spacing: 2px; margin-bottom: 10px; background: linear-gradient(135deg, #fff 0%, #b8a9ff 50%, #fff 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sub-title { font-size: 15px; color: rgba(255,255,255,0.7); text-align: center; letter-spacing: 4px; margin-bottom: 6px; }
.hint-text { font-size: 12px; color: rgba(255,255,255,0.4); text-align: center; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 48px; border: none; border-radius: 50px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; letter-spacing: 2px; margin-top: 22px; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; box-shadow: 0 4px 20px rgba(102,126,234,0.4); }
.btn-primary:active { transform: scale(0.96); }
.rule-card { background: rgba(255,255,255,0.06); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 28px 24px; max-width: 330px; width: 100%; text-align: center; }
.rule-card p { font-size: 15px; line-height: 2; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.rule-card .highlight { font-size: 22px; font-weight: 700; color: #b8a9ff; }
.rule-card .tip { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 14px; line-height: 1.6; }
.rule-dims { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0; }
.rule-dim { padding: 4px 12px; background: rgba(102,126,234,0.15); border: 1px solid rgba(102,126,234,0.3); border-radius: 12px; font-size: 11px; color: rgba(255,255,255,0.7); }
.quiz-container { width: 100%; max-width: 370px; }
.progress-bar { display: flex; gap: 4px; margin-bottom: 18px; }
.progress-seg { flex: 1; height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; transition: all 0.3s ease; }
.progress-seg.done { background: linear-gradient(90deg, #667eea, #764ba2); }
.progress-seg.current { background: linear-gradient(90deg, #667eea, #764ba2); box-shadow: 0 0 8px rgba(102,126,234,0.6); }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.question-num { font-size: 13px; color: rgba(255,255,255,0.5); letter-spacing: 1px; }
.question-type { font-size: 11px; padding: 3px 10px; border-radius: 10px; background: rgba(102,126,234,0.2); color: #b8a9ff; letter-spacing: 1px; }
.question-type.single { background: rgba(102,126,234,0.15); color: #a9b8ff; }
.question-text { font-size: 17px; font-weight: 600; line-height: 1.6; margin-bottom: 18px; color: #fff; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { padding: 13px 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.85); cursor: pointer; transition: all 0.25s ease; display: flex; align-items: flex-start; gap: 12px; }
.option:active { transform: scale(0.98); }
.option.selected { background: rgba(102,126,234,0.2); border-color: #667eea; color: #fff; box-shadow: 0 0 16px rgba(102,126,234,0.2); }
.option.disabled { opacity: 0.4; pointer-events: none; }
.option-check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; transition: all 0.2s; }
.option.multi .option-check { border-radius: 5px; }
.option.selected .option-check { background: #667eea; color: #fff; }
.option.selected .option-check::after { content: '\2713'; font-size: 12px; }
.option.selected .option-check span { display: none; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.nav-btn { padding: 10px 20px; background: transparent; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; color: rgba(255,255,255,0.6); font-size: 13px; cursor: pointer; transition: all 0.2s; }
.nav-btn:active { background: rgba(255,255,255,0.1); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn.primary { background: linear-gradient(135deg, #667eea, #764ba2); border-color: transparent; color: #fff; }
.loading-wrap { text-align: center; }
.loading-planets { position: relative; width: 110px; height: 110px; margin: 0 auto 22px; }
.loading-planet { position: absolute; width: 18px; height: 18px; border-radius: 50%; top: 50%; left: 50%; animation: converge 1.5s ease-in-out infinite; }
.loading-planet:nth-child(1) { background: #c0392b; --angle: 0deg; }
.loading-planet:nth-child(2) { background: #f39c12; --angle: 51deg; animation-delay: 0.1s; }
.loading-planet:nth-child(3) { background: #1abc9c; --angle: 103deg; animation-delay: 0.2s; }
.loading-planet:nth-child(4) { background: #f1c40f; --angle: 154deg; animation-delay: 0.3s; }
.loading-planet:nth-child(5) { background: #27ae60; --angle: 206deg; animation-delay: 0.4s; }
.loading-planet:nth-child(6) { background: #8e44ad; --angle: 257deg; animation-delay: 0.5s; }
.loading-planet:nth-child(7) { background: #e91e63; --angle: 309deg; animation-delay: 0.6s; }
@keyframes converge { 0% { transform: translate(-50%,-50%) rotate(var(--angle)) translateX(48px) rotate(calc(-1 * var(--angle))); opacity: 1; } 70% { transform: translate(-50%,-50%) rotate(var(--angle)) translateX(0px) rotate(calc(-1 * var(--angle))); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(3); opacity: 0; } }
.loading-text { font-size: 15px; color: rgba(255,255,255,0.7); letter-spacing: 2px; }
.loading-bar { width: 180px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin: 14px auto 0; overflow: hidden; }
.loading-bar-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 2px; animation: loadfill 1.5s ease-in-out infinite; }
@keyframes loadfill { 0% { width: 0%; } 100% { width: 100%; } }
#page-result { background: #F8F5EE; }
.result-scroll { width: 100%; max-width: 380px; height: calc(100vh - 48px); overflow-y: auto; padding: 14px 0 30px; -webkit-overflow-scrolling: touch; }
.result-scroll::-webkit-scrollbar { display: none; }
.poster-wrap { width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.13); margin-bottom: 18px; }
.poster-wrap img { width: 100%; display: block; }
.match-label { text-align: center; font-size: 12px; color: #999; letter-spacing: 3px; margin-bottom: 4px; }
.match-percent-row { text-align: center; margin-bottom: 16px; }
.match-percent-row .num { font-size: 40px; font-weight: 800; }
.match-percent-row .unit { font-size: 18px; font-weight: 700; }
.result-info-card { background: #fff; border-radius: 16px; padding: 20px 18px; box-shadow: 0 2px 14px rgba(0,0,0,0.06); margin-bottom: 16px; }
.info-title { font-size: 12px; color: #aaa; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.info-text { font-size: 14px; line-height: 1.85; color: #333; }
.info-divider { height: 1px; background: #f0f0f0; margin: 16px 0; }
.second-dept-row { font-size: 13px; color: #777; text-align: center; }
.second-dept-row span { font-weight: 700; }
.result-restart-btn { display: block; width: 100%; padding: 14px; border: none; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; letter-spacing: 2px; transition: all 0.3s; }
.result-restart-btn:active { transform: scale(0.97); }
.share-tip { text-align: center; color: #bbb; font-size: 12px; margin-top: 14px; }
