* {
  box-sizing: border-box;
}

:root {
  --bg1: #0b1020;
  --bg2: #151a2f;
  --card: rgba(20, 25, 45, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f4f7ff;
  --muted: #b7bfd8;
  --primary: #8b5cf6;
  --primary-2: #ec4899;
  --secondary: #26304f;
  --secondary-hover: #313d63;
  --accent: #22d3ee;
  --success: #34d399;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #20294a 0%, #0b1020 55%, #060a15 100%);
}

body {
  position: relative;
}

.app-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.22), transparent 22%),
    radial-gradient(circle at 85% 18%, rgba(236, 72, 153, 0.18), transparent 20%),
    radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.12), transparent 25%);
  pointer-events: none;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 18px 60px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(12px);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.26);
  color: #ddd6fe;
  font-size: 13px;
  margin-bottom: 14px;
}

.badge.small {
  font-size: 12px;
  padding: 5px 10px;
  margin-bottom: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.subtitle {
  font-size: 16px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 22px;
}

.intro-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  padding: 18px 18px 10px;
  margin-bottom: 26px;
}

.intro-box h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.intro-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.start-actions,
.result-actions {
  display: flex;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.22s ease;
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.28);
}

.btn.primary:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.btn.secondary {
  color: #e6ebff;
  background: var(--secondary);
}

.btn.secondary:hover {
  background: var(--secondary-hover);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quiz-top {
  margin-bottom: 22px;
}

.quiz-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-text {
  color: var(--muted);
  font-size: 14px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--primary-2));
  transition: width 0.25s ease;
}

.question-wrap {
  padding: 8px 0 2px;
}

.question-tag {
  display: inline-block;
  font-size: 13px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 14px;
}

.question-title {
  font-size: 28px;
  line-height: 1.5;
  margin-bottom: 20px;
}

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

.option-btn {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  cursor: pointer;
  transition: 0.18s ease;
}

.option-btn:hover {
  border-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.08);
}

.option-btn.selected {
  border-color: rgba(236, 72, 153, 0.45);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.quiz-actions {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-title {
  font-size: 34px;
  margin-bottom: 10px;
}

.result-subtitle {
  color: #d8b4fe;
  font-size: 16px;
  margin-bottom: 20px;
}

.result-panel {
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}

.result-desc {
  color: var(--muted);
  line-height: 1.95;
  margin: 0;
  font-size: 15px;
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.meter-card,
.analysis-card {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meter-head {
  display: flex;
  justify-content: space-between;
  color: #e9edff;
  margin-bottom: 10px;
  font-size: 14px;
}

.mini-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.mini-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--primary-2));
  transition: width 0.35s ease;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-bottom: 20px;
}

.analysis-card h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

.keywords-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #f5d0fe;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.18);
}

.summary-line {
  color: var(--muted);
  line-height: 1.9;
  margin: 0;
}

@media (max-width: 760px) {
  .card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  h1 {
    font-size: 30px;
  }

  .question-title {
    font-size: 23px;
  }

  .quiz-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .meter-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }
}
