:root {
  --bg-start: #f5f9ff;
  --bg-end: #fbfdff;
  --card: #f9fcff;
  --card-strong: #ffffff;
  --text: #1f2d3d;
  --muted: #6c7b90;
  --primary: #7ab6f0;
  --primary-pressed: #65a0d8;
  --border: #e1ecfa;
  --shadow: 0 12px 30px rgba(82, 146, 214, 0.12);
  --radius-lg: 22px;
  --radius-sm: 12px;
  --max-width: 520px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 20%, #f6fbff 0%, var(--bg-start) 45%), linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 28px 16px 40px;
}

.app {
  width: 100%;
  max-width: var(--max-width);
  position: relative;
}

.view {
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

.quiz-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hidden {
  display: none !important;
}

.home-shell {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 20px;
}

.home-outer-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(122, 182, 240, 0.25);
  border-radius: 26px;
  padding: 18px 16px 20px;
  box-shadow: 0 16px 36px rgba(82, 146, 214, 0.12);
  backdrop-filter: blur(4px);
}

.home-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(122, 182, 240, 0.25);
  color: #425f80;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  margin-bottom: 16px;
}

.home-title {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: #2f4c71;
  letter-spacing: 0.4px;
}

.home-subtitle {
  margin: 0 0 18px;
  color: #60718a;
  font-size: 14px;
  line-height: 1.7;
}

.home-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px auto 16px;
}

.home-feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(82, 146, 214, 0.12);
  padding: 14px 14px;
  text-align: left;
}

.home-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(122, 182, 240, 0.25), rgba(93, 143, 203, 0.22));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4a7db8;
  font-weight: 700;
  font-size: 14px;
}

.home-card-title {
  font-size: 16px;
  color: #2f4c71;
  font-weight: 700;
  margin-bottom: 4px;
}

.home-card-desc {
  font-size: 14px;
  color: #5f7089;
  line-height: 1.6;
}

.home-info {
  background: rgba(122, 182, 240, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  color: #4f647e;
  border: 1px solid rgba(122, 182, 240, 0.28);
  margin: 6px 0 16px;
}

.home-info p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.6;
}

.home-info strong {
  color: #2f4c71;
  font-weight: 700;
}

.home-btn-wrap {
  width: 100%;
  margin-top: 6px;
}

.btn-home {
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7fb9f1, #6fa9e0);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 12px 24px rgba(111, 169, 224, 0.28);
}

.btn-home:active {
  background: linear-gradient(135deg, #72aee8, #5f98d0);
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(111, 169, 224, 0.22);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  backdrop-filter: blur(4px);
}

h1 {
  margin: 4px 0 10px;
  font-size: 26px;
  letter-spacing: 0.5px;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: 0.2px;
}

p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(122, 182, 240, 0.12);
  border-radius: 999px;
  color: #4a7db8;
  font-size: 13px;
  margin-bottom: 8px;
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(122, 182, 240, 0.22);
}

.btn-primary:active {
  background: var(--primary-pressed);
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(101, 160, 216, 0.18);
}

.btn-secondary {
  background: var(--card-strong);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.footer-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px 18px 24px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(122, 182, 240, 0.07) 0%, transparent 45%), radial-gradient(circle at 20% 70%, rgba(122, 182, 240, 0.07) 0%, transparent 50%);
  pointer-events: none;
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #4a7db8;
  font-size: 13px;
}

.progress {
  margin-bottom: 14px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(122, 182, 240, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8abff4, #7ab6f0);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.question-card {
  padding: 18px 16px 6px;
  margin-bottom: 16px;
}

.question-title {
  margin-bottom: 14px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.option-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, background 0.2s ease;
}

.option-btn:hover {
  border-color: rgba(122, 182, 240, 0.5);
  box-shadow: 0 6px 14px rgba(122, 182, 240, 0.12);
  transform: translateY(-1px);
}

.option-btn.selected {
  background: rgba(122, 182, 240, 0.18);
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(122, 182, 240, 0.18);
}

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.hint {
  margin: 4px 0 10px;
  color: #d67a62;
  font-size: 13px;
  min-height: 18px;
}

.result-header {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.result-header .tag {
  margin: 0;
  font-size: 19.5px;
  font-weight: 700;
}

.result-type {
  font-size: 22px;
  margin: 0;
  font-weight: 800;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  justify-content: center;
}

.pill {
  padding: 6px 10px;
  background: rgba(122, 182, 240, 0.16);
  color: #4a7db8;
  border-radius: 999px;
  font-size: 13px;
}

.result-block {
  margin-top: 12px;
  padding: 14px 14px 12px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.result-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
}

.result-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.centered {
  text-align: center;
}

.developer-note {
  margin-top: 8px;
  font-size: 13px;
  color: #c27b00;
  text-align: center;
}

.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
  body { padding-top: 40px; }
  .card { padding: 22px 22px; }
}

@media (max-width: 420px) {
  body {
    padding: 20px 14px 28px;
  }
  .home-outer-card {
    padding: 16px 14px 18px;
    border-radius: 22px;
  }
  .home-title {
    font-size: 26px;
  }
  .home-feature-card {
    padding: 12px 12px;
    border-radius: 16px;
  }
  .home-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .btn-home {
    padding: 14px;
  }
  .quiz-shell {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}
