:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --text: #1e2a22;
  --muted: #6a786f;
  --line: #dbe8dd;
  --soft: #edf6ef;
  --accent: #6c8d71;
  --accent-strong: #4d6a53;
  --shadow: 0 16px 40px rgba(47, 73, 55, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #f6f5f1;
  background-image: 
    linear-gradient(0deg, transparent 24%, rgba(200, 200, 200, 0.05) 25%, rgba(200, 200, 200, 0.05) 26%, transparent 27%, transparent 74%, rgba(200, 200, 200, 0.05) 75%, rgba(200, 200, 200, 0.05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(200, 200, 200, 0.05) 25%, rgba(200, 200, 200, 0.05) 26%, transparent 27%, transparent 74%, rgba(200, 200, 200, 0.05) 75%, rgba(200, 200, 200, 0.05) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
  color: var(--text);
  min-height: 100vh;
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 首页极简样式 ===== */
.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 40px 20px;
}

.intro-header {
  margin-bottom: 60px;
}

.intro-header h1 {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

.intro-header .tagline {
  font-size: 18px;
  color: var(--muted);
  margin: 8px 0 0;
  font-weight: 400;
}

.intro-content {
  margin-bottom: 40px;
  max-width: 500px;
}

.intro-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 20px;
}

.intro-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  padding: 12px 16px;
  background: var(--soft);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.btn-large {
  padding: 18px 48px;
  font-size: 18px;
  margin-bottom: 60px;
}

.intro-footer {
  font-size: 14px;
  color: var(--muted);
  margin-top: auto;
}

.intro-footer a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 500;
}

.intro-footer a:hover {
  text-decoration: underline;
}

/* ===== 测试页面样式 ===== */
.test-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.progress-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.progress {
  flex: 1;
  min-width: 240px;
  height: 8px;
  background: #edf3ee;
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #97b59c, #5b7a62);
  border-radius: inherit;
  transition: width .22s ease;
}

.progress-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
}

.current-question {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
  width: 100%;
  max-width: 700px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-weight: 600;
}

.question-title {
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 24px;
  color: var(--text);
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: all .2s ease;
  cursor: pointer;
}

.option:hover {
  border-color: var(--accent);
  background: #f8fcf9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 73, 55, 0.08);
}

.option input {
  margin-top: 2px;
  accent-color: var(--accent-strong);
  transform: scale(1.2);
  flex-shrink: 0;
}

.option-code {
  font-weight: 700;
  color: var(--accent-strong);
  min-width: 24px;
  font-size: 16px;
}

.test-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

/* ===== 按钮样式 ===== */
button {
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

button:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 8px 25px rgba(77, 106, 83, 0.25);
}

button:active {
  transform: translateY(0);
}

button:disabled { 
  cursor: not-allowed; 
  opacity: 0.5; 
  transform: none; 
  box-shadow: none;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(77, 106, 83, 0.2);
  font-size: 16px;
}

.btn-primary:hover {
  background: #3d5a42;
  box-shadow: 0 8px 25px rgba(77, 106, 83, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--accent-strong);
  padding: 16px 24px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-size: 16px;
}

.btn-secondary:hover {
  background: var(--soft);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(77, 106, 83, 0.1);
}

.screen { display: none; }
.screen.active { display: block; }

/* ===== 结果页面样式 ===== */
.result-wrap {
  margin-top: 22px;
  padding: 32px;
}

.result-layout {
  display: grid;
  gap: 18px;
}

.result-top {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}

.poster-box, .type-box, .analysis-box, .dim-box, .note-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.poster-box {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(127,165,134,0.16), rgba(127,165,134,0) 40%),
    linear-gradient(180deg, #ffffff, #f7fbf8);
}

.poster-box::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(127,165,134,0.12), rgba(127,165,134,0.01));
  pointer-events: none;
}

.poster-image {
  width: 100%;
  min-height: 220px;
  max-height: 460px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  position: relative;
  z-index: 1;
}

.poster-box.no-image .poster-image {
  display: none;
}

.poster-caption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.type-kicker {
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 8px;
  letter-spacing: .06em;
}

.type-name {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.type-subname {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.match {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.analysis-box h3, .dim-box h3, .note-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.analysis-box p {
  margin: 0;
  color: #304034;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.dim-list {
  display: grid;
  gap: 12px;
}

.dim-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.dim-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dim-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.dim-item-score {
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.dim-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.author-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
  overflow: hidden;
}

.author-box summary {
  list-style: none;
  cursor: pointer;
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.author-box summary::-webkit-details-marker { display: none; }

.author-box summary::after {
  content: '展开';
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 6px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.author-box[open] summary::after {
  content: '收起';
}

.author-content {
  border-top: 1px solid var(--line);
  padding: 0 18px 18px;
}

.author-content p {
  margin: 14px 0 0;
  color: #304034;
  font-size: 14px;
  line-height: 1.9;
}

.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 860px) {
  .result-top { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .shell { padding: 14px 12px 42px; }
  
  .intro-container {
    min-height: 100vh;
    padding: 20px;
  }
  
  .intro-header h1 {
    font-size: 48px;
  }
  
  .intro-header .tagline {
    font-size: 16px;
  }
  
  .intro-text {
    font-size: 16px;
  }
  
  .btn-large {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .question { padding: 24px 16px; }
  .question-title { font-size: 16px; }
  
  .result-wrap { padding: 24px 16px; }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}
