* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: #0d0d14;
  color: #e8e0d0;
  font-family: "LXGW WenKai", "KaiTi", "STKaiti", "Kaiti SC", "楷体", serif;
}

#app { max-width: 480px; margin: 0 auto; min-height: 100%; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
}

.hidden { display: none !important; }

/* 封面 */
.cover-inner { text-align: center; }

.cover-ornament {
  letter-spacing: 12px;
  font-size: 15px;
  color: #b8963e;
  margin-bottom: 28px;
}

.cover-title {
  font-size: 44px;
  line-height: 1.35;
  color: #f5edd8;
  text-shadow: 0 0 24px rgba(184, 150, 62, 0.35);
  margin-bottom: 18px;
}

.cover-sub {
  font-size: 15px;
  line-height: 1.9;
  color: #b3a88c;
  margin-bottom: 22px;
}

.code-box { margin-bottom: 16px; }

#code-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
  color: #f5edd8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(184, 150, 62, 0.45);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}

#code-input:focus { border-color: #b8963e; background: rgba(184, 150, 62, 0.08); }
#code-input::placeholder { color: #5c5747; letter-spacing: 0; }

.code-error {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  color: #d4695e;
}

.btn-primary {
  width: 100%;
  padding: 15px 0;
  font-size: 18px;
  letter-spacing: 6px;
  color: #0d0d14;
  background: linear-gradient(135deg, #d4b35e, #b8963e);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}

.btn-primary:active { transform: scale(0.98); opacity: 0.9; }

.btn-ghost {
  width: 100%;
  padding: 13px 0;
  font-size: 15px;
  letter-spacing: 3px;
  color: #b8963e;
  background: transparent;
  border: 1px solid rgba(184, 150, 62, 0.5);
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
}

.cover-note {
  margin-top: 26px;
  font-size: 11px;
  color: #55503f;
}

/* 答题 */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  font-size: 13px;
  color: #b8963e;
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #d4b35e, #b8963e);
  transition: width 0.35s ease;
}

.quiz-question {
  font-size: 22px;
  line-height: 1.7;
  color: #f5edd8;
  margin-bottom: 30px;
  min-height: 76px;
}

.quiz-options { display: flex; flex-direction: column; gap: 14px; }

.option-btn {
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  color: #d8cfb8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 150, 62, 0.3);
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.option-btn:active {
  background: rgba(184, 150, 62, 0.18);
  border-color: #b8963e;
  transform: scale(0.985);
}

/* 结算动画 */
.loading-inner { text-align: center; }

.loading-sword {
  font-size: 52px;
  animation: sword-spin 1.6s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes sword-spin {
  0%, 100% { transform: rotate(-12deg) scale(1); opacity: 0.8; }
  50% { transform: rotate(12deg) scale(1.15); opacity: 1; }
}

.loading-text { font-size: 18px; letter-spacing: 4px; color: #b8963e; }

/* 结果 */
.result-inner { text-align: center; }

#poster-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(184, 150, 62, 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.save-hint { margin: 14px 0 18px; font-size: 13px; color: #8d8670; }

.result-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }

.result-detail {
  margin-top: 26px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 150, 62, 0.3);
  border-radius: 12px;
  padding: 22px 20px;
}

.result-detail h3 {
  font-size: 22px;
  color: #d4b35e;
  margin-bottom: 18px;
  text-align: center;
}

.detail-block { margin-bottom: 18px; }
.detail-block:last-child { margin-bottom: 0; }

.detail-label {
  display: inline-block;
  font-size: 13px;
  color: #0d0d14;
  background: #b8963e;
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.detail-block p { font-size: 15px; line-height: 1.9; color: #cfc7ae; }

.attr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.attr-name {
  width: 74px;
  font-size: 13px;
  color: #d4b35e;
  white-space: nowrap;
}

.attr-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.attr-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4b35e, #b8963e);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.attr-pct {
  width: 42px;
  font-size: 12px;
  color: #8d8670;
  text-align: right;
}
