/* css/style.css — 大字报风格 */

@import url('https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=Noto+Serif+SC:wght@400;700&display=swap');

/* ── Reset & Base ─────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #8b1a1a;
  /* 红布纹理 */
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px),
    repeating-linear-gradient(90deg,  transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 16px 60px;
  font-family: 'Noto Serif SC', 'FangSong', '仿宋', 'STFangsong', 'SimSun', serif;
}

/* ── Paper ────────────────────────────────────────────────────── */

.paper {
  max-width: 660px;
  width: 100%;
  /* 泛黄宣纸底色 */
  background-color: #f0d9a8;
  background-image:
    /* 纸张纹理：细噪点 */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  border: 1px solid #c4a06a;
  /* 多层阴影模拟贴纸效果 */
  box-shadow:
    2px 2px 0 #b8956c,
    4px 4px 0 rgba(0,0,0,0.12),
    0 12px 48px rgba(0,0,0,0.5);
  position: relative;
}

/* 顶部红色条纹（真实大字报纸的上沿装饰） */
.paper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #b71c1c 0px, #b71c1c 24px,
    #8b1a1a 24px, #8b1a1a 26px
  );
}

/* 底部折痕阴影 */
.paper::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 10px; right: 10px;
  height: 4px;
  background: rgba(0,0,0,0.15);
  filter: blur(3px);
}

.paper-inner {
  padding: 44px 48px 36px;
  position: relative;
}

/* ── 印章（通用） ──────────────────────────────────────────────── */

.stamp {
  display: inline-block;
  border: 2.5px solid #b71c1c;
  color: #b71c1c;
  padding: 4px 10px;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-size: 0.82rem;
  letter-spacing: 0.15rem;
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}

.stamp-top-right {
  position: absolute;
  top: 22px;
  right: 22px;
  transform: rotate(7deg);
}

/* ── 首页 ──────────────────────────────────────────────────────── */

.dazibao-title {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', '楷体', 'STKaiti', serif;
  color: #b71c1c;
  font-size: 4rem;
  text-align: center;
  letter-spacing: 0.35rem;
  padding-top: 10px;
  margin-bottom: 6px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.18);
}

.subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #6b4a2a;
  letter-spacing: 0.35rem;
  margin-bottom: 22px;
}

.divider {
  border: none;
  border-top: 2px solid #a0764a;
  margin: 18px 0;
}

/* 两侧有小装饰的分割线 */
.divider-ornate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: #a0764a;
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
}
.divider-ornate::before,
.divider-ornate::after {
  content: '';
  flex: 1;
  border-top: 1px solid #a0764a;
}

.intro-text {
  text-align: center;
  line-height: 2.1;
  color: #3a2010;
  font-size: 0.95rem;
  margin: 18px 0 10px;
}

.intro-sub {
  text-align: center;
  color: #7a5030;
  font-size: 0.82rem;
  margin-bottom: 24px;
  letter-spacing: 0.1rem;
}

/* ── 进度 ──────────────────────────────────────────────────────── */

.progress-bar {
  background: #d4b080;
  height: 5px;
  margin-bottom: 5px;
  border: 1px solid #b89060;
}

.progress-fill {
  height: 100%;
  background: #b71c1c;
  transition: width 0.35s ease;
  width: 0%;
}

.progress-text {
  text-align: right;
  font-size: 0.78rem;
  color: #7a5030;
  margin-bottom: 22px;
  letter-spacing: 0.08rem;
}

/* ── 题目区 ────────────────────────────────────────────────────── */

.question-label {
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  color: #b71c1c;
  font-size: 0.88rem;
  margin-bottom: 10px;
  letter-spacing: 0.25rem;
}

.question-text {
  font-size: 1.08rem;
  line-height: 2;
  color: #1e0f00;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #b89060;
}

/* ── 选项 ──────────────────────────────────────────────────────── */

.options-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.option-btn {
  background: transparent;
  border: 1px solid #c4a06a;
  padding: 11px 16px;
  text-align: left;
  cursor: pointer;
  font-family: 'Noto Serif SC', '仿宋', 'STFangsong', serif;
  font-size: 0.93rem;
  color: #1e0f00;
  line-height: 1.7;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.option-btn:hover:not(:disabled) {
  background: rgba(183, 28, 28, 0.07);
  border-color: #b71c1c;
  transform: translateX(5px);
}

.option-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.option-btn.selected {
  background: rgba(183, 28, 28, 0.12);
  border-color: #b71c1c;
  opacity: 1;
}

.option-letter {
  color: #b71c1c;
  font-family: 'KaiTi', '楷体', serif;
  font-weight: bold;
  flex-shrink: 0;
  min-width: 1.6rem;
}

/* ── 结果页 ────────────────────────────────────────────────────── */

.result-title {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', '楷体', serif;
  color: #b71c1c;
  font-size: 2.6rem;
  text-align: center;
  letter-spacing: 0.9rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.15);
}

.result-preamble {
  text-align: center;
  color: #3a2010;
  line-height: 2.1;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.result-code {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 4.2rem;
  font-weight: 700;
  color: #b71c1c;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.18rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.14);
}

.result-alias {
  text-align: center;
  color: #3a2010;
  font-size: 1.08rem;
  line-height: 1.8;
  margin-top: 8px;
  letter-spacing: 0.12rem;
}

.result-hidden {
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 2px;
  padding: 6px 12px;
  border: 1px solid #b71c1c;
  color: #b71c1c;
  background: rgba(183, 28, 28, 0.08);
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-size: 0.92rem;
  line-height: 1.5;
  letter-spacing: 0.08rem;
}

.result-hat {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', '楷体', serif;
  font-size: 2.2rem;
  color: #b71c1c;
  text-align: center;
  padding: 10px 0 4px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.12);
  letter-spacing: 0.3rem;
  line-height: 1.4;
}

.result-stamp-wrap {
  display: flex;
  justify-content: flex-end;
  padding-right: 24px;
  margin-bottom: 18px;
}

.stamp-result {
  font-size: 1.05rem;
  padding: 7px 14px;
  border-width: 3px;
  transform: rotate(-12deg);
  transform-origin: center;
  letter-spacing: 0.2rem;
}

@keyframes stampIn {
  0%   { transform: rotate(-12deg) scale(2.2); opacity: 0; }
  55%  { transform: rotate(-12deg) scale(0.92); opacity: 0.88; }
  75%  { transform: rotate(-12deg) scale(1.05); opacity: 0.9; }
  100% { transform: rotate(-12deg) scale(1);    opacity: 0.82; }
}

.stamp-animate {
  animation: stampIn 0.45s cubic-bezier(0.22,0.61,0.36,1) forwards;
}

.result-desc {
  color: #2a1500;
  line-height: 2;
  font-size: 0.93rem;
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px dashed #b89060;
  background: rgba(0,0,0,0.03);
}

.result-desc strong {
  color: #8b1a1a;
  margin-right: 4px;
}

.dimension-panel,
.dimension-scores {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #c4a06a;
  background: rgba(255,255,255,0.12);
}

.panel-title {
  color: #8b1a1a;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12rem;
  margin-bottom: 10px;
}

.dimension-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.legend-item {
  padding: 10px;
  border: 1px dashed #b89060;
  background: rgba(0,0,0,0.025);
}

.legend-item strong {
  display: block;
  color: #b71c1c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  letter-spacing: 0.08rem;
  margin-bottom: 3px;
}

.legend-item span {
  display: block;
  color: #3a2010;
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 5px;
}

.legend-item p {
  color: #2a1500;
  line-height: 1.65;
  font-size: 0.82rem;
}

.score-row {
  margin-top: 12px;
}

.score-row:first-of-type {
  margin-top: 0;
}

.score-head,
.score-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-head {
  color: #3a2010;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.score-head strong {
  color: #b71c1c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
}

.score-labels {
  color: #6b4a2a;
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 6px;
}

.score-bar {
  display: flex;
  height: 12px;
  border: 1px solid #a0764a;
  background: #d4b080;
  overflow: hidden;
}

.score-left {
  background: #b71c1c;
}

.score-right {
  background: #6b4a2a;
}

.result-profile {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 5.8rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid #b71c1c;
  background: rgba(183, 28, 28, 0.055);
}

.profile-row span {
  color: #8b1a1a;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-weight: 700;
  letter-spacing: 0.08rem;
  white-space: nowrap;
}

.profile-row p {
  color: #2a1500;
  line-height: 1.7;
  font-size: 0.9rem;
}

/* ── 按钮 ──────────────────────────────────────────────────────── */

.btn-primary {
  display: block;
  width: 100%;
  background: #b71c1c;
  color: #f5e6c0;
  border: none;
  padding: 14px;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-size: 1.05rem;
  letter-spacing: 0.4rem;
  cursor: pointer;
  transition: background 0.18s ease;
  margin: 18px 0 10px;
}

.btn-primary:hover {
  background: #8b1a1a;
}

.btn-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: #8b1a1a;
  border: 1px solid #b71c1c;
  padding: 12px;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-size: 0.98rem;
  letter-spacing: 0.18rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  margin: 10px 0;
}

.btn-secondary:hover {
  background: rgba(183, 28, 28, 0.08);
  color: #b71c1c;
}

/* ── 投诉页 ────────────────────────────────────────────────────── */

.complaint-note {
  color: #3a2010;
  line-height: 1.9;
  font-size: 0.9rem;
  padding: 12px 14px;
  border: 1px dashed #b89060;
  background: rgba(183, 28, 28, 0.055);
  margin-bottom: 16px;
}

.complaint-form {
  display: grid;
  gap: 12px;
}

.complaint-form label {
  display: grid;
  gap: 6px;
}

.complaint-form span {
  color: #8b1a1a;
  font-family: 'KaiTi', '楷体', 'STKaiti', serif;
  font-weight: 700;
  letter-spacing: 0.08rem;
}

.complaint-form input {
  width: 100%;
  border: 1px solid #b89060;
  background: rgba(255,255,255,0.28);
  color: #1e0f00;
  padding: 11px 12px;
  font-family: 'Noto Serif SC', '仿宋', 'STFangsong', serif;
  font-size: 0.95rem;
}

.complaint-form input:focus {
  outline: 2px solid rgba(183, 28, 28, 0.28);
  border-color: #b71c1c;
}

.complaint-receipt {
  margin-top: 18px;
  padding: 16px;
  border: 2px solid #b71c1c;
  background: rgba(255,255,255,0.16);
  color: #2a1500;
  line-height: 1.8;
}

.receipt-code {
  color: #b71c1c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  margin-bottom: 8px;
}

.receipt-small {
  color: #7a5030;
  font-size: 0.82rem;
  margin-top: 6px;
}

/* ── 页脚文字 ──────────────────────────────────────────────────── */

.footer-text {
  text-align: center;
  font-size: 0.72rem;
  color: #9a7050;
  letter-spacing: 0.25rem;
  margin-top: 4px;
}

/* ── 屏幕切换 ──────────────────────────────────────────────────── */

.screen {
  display: none;
  width: 100%;
  max-width: 660px;
}

.screen.active {
  display: block;
  animation: fadeSlideIn 0.28s ease;
}

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

/* ── 移动端适配 ────────────────────────────────────────────────── */

@media (max-width: 520px) {
  body {
    padding: 18px 10px 40px;
  }
  .paper-inner {
    padding: 36px 20px 28px;
  }
  .dazibao-title {
    font-size: 3rem;
    letter-spacing: 0.2rem;
  }
  .result-title {
    font-size: 2rem;
    letter-spacing: 0.6rem;
  }
  .result-hat {
    font-size: 1.75rem;
  }
  .result-code {
    font-size: 3.2rem;
  }
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .dimension-legend {
    grid-template-columns: 1fr;
  }
  .score-labels {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .option-btn {
    font-size: 0.88rem;
  }
}
