@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=ZCOOL+XiaoWei&family=Noto+Serif+SC:wght@500;700;900&display=swap");

:root {
  --ink: #24130d;
  --paper: #f8e6c7;
  --paper-deep: #e4b76d;
  --tea: #8a3d16;
  --chili: #d92216;
  --grass: #0f5b3f;
  --lime: #c8ff4d;
  --night: #071f1a;
  --cream: #fff7df;
  --shadow: 0 24px 80px rgba(36, 19, 13, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.9), transparent 24rem),
    radial-gradient(circle at 86% 8%, rgba(200, 255, 77, 0.35), transparent 20rem),
    linear-gradient(135deg, #f8dfab 0%, #f6c067 42%, #15563e 42%, #09251f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(36, 19, 13, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(36, 19, 13, 0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.stadium-glow {
  position: fixed;
  right: -14rem;
  top: 18rem;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  background: conic-gradient(from 130deg, transparent, rgba(200, 255, 77, 0.5), transparent, rgba(255, 247, 223, 0.45), transparent);
  filter: blur(16px);
  animation: slowSpin 24s linear infinite;
  pointer-events: none;
}

.hero,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
}

.hero {
  padding: 28px 0 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 44px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 2px solid rgba(36, 19, 13, 0.22);
  border-radius: 999px;
  background: rgba(255, 247, 223, 0.72);
  box-shadow: 0 12px 36px rgba(36, 19, 13, 0.12);
  backdrop-filter: blur(12px);
}

.seal {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--cream);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 32px;
  background: var(--chili);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-mark small {
  color: rgba(36, 19, 13, 0.62);
}

.source-link,
.button {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.source-link {
  padding: 12px 18px;
  border: 2px solid rgba(255, 247, 223, 0.35);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(7, 31, 26, 0.5);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.fat-card,
.combo-card,
.prediction-card,
.character-strip,
.archive-card,
.sources,
.score-strip article {
  border: 2px solid rgba(36, 19, 13, 0.18);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 5vw, 64px);
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(255, 247, 223, 0.92), rgba(255, 247, 223, 0.68)),
    repeating-linear-gradient(-12deg, rgba(217, 34, 22, 0.08) 0 10px, transparent 10px 24px);
}

.eyebrow,
.section-head p,
.card-kicker,
.sources p:first-child {
  margin: 0 0 10px;
  color: var(--chili);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: clamp(54px, 10vw, 126px);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.intro {
  max-width: 760px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-3px) rotate(-1deg);
}

.button.primary {
  color: var(--cream);
  background: var(--chili);
  box-shadow: 0 14px 30px rgba(217, 34, 22, 0.24);
}

.button.ghost {
  border: 2px solid var(--ink);
  background: var(--lime);
}

.fat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
  padding: 18px 24px 30px;
  border-radius: 34px;
  color: var(--cream);
  background:
    radial-gradient(circle at 30% 20%, rgba(200, 255, 77, 0.25), transparent 14rem),
    linear-gradient(150deg, #113a2d, #071f1a 72%);
  overflow: hidden;
}

.pangpang-hero {
  display: grid;
  place-items: center;
  align-self: center;
  width: min(100%, 330px);
  aspect-ratio: 1 / 1;
  margin: -4px auto 16px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 247, 223, 0.92), rgba(255, 247, 223, 0.08) 62%),
    linear-gradient(135deg, rgba(200, 255, 77, 0.28), transparent);
}

.pangpang-hero img {
  width: 118%;
  max-width: none;
  transform: translateY(3%) rotate(-1deg);
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.28));
}

.fat-card h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.fat-card p:last-child {
  color: rgba(255, 247, 223, 0.72);
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 8px 0 52px;
}

.score-strip article {
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 247, 223, 0.82);
}

.score-strip span {
  display: block;
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 900;
  line-height: 1;
}

.score-strip small {
  color: rgba(36, 19, 13, 0.66);
  font-weight: 900;
}

.section-head {
  margin: 56px 0 18px;
}

.section-head h2,
.sources h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.combo-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 247, 223, 0.9);
  transform: rotate(var(--tilt, 0deg));
}

.combo-avatar {
  position: absolute;
  right: -22px;
  bottom: -18px;
  width: 118px;
  height: 118px;
  object-fit: contain;
  opacity: 0.28;
  filter: drop-shadow(0 12px 14px rgba(36, 19, 13, 0.25));
  pointer-events: none;
}

.combo-card:nth-child(2) {
  --tilt: 1deg;
}

.combo-card:nth-child(3) {
  --tilt: -1deg;
  color: var(--cream);
  background: linear-gradient(145deg, var(--chili), #7a130c);
}

.combo-card:nth-child(4) {
  background: var(--lime);
}

.combo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.combo-top h3 {
  margin: 0;
  font-size: 25px;
}

.joint {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--grass);
  font-weight: 900;
}

.combo-card:nth-child(3) .joint {
  color: var(--ink);
  background: var(--lime);
}

.combo-desc {
  color: rgba(36, 19, 13, 0.68);
  line-height: 1.7;
}

.combo-card:nth-child(3) .combo-desc {
  color: rgba(255, 247, 223, 0.75);
}

.combo-card ul,
.prediction-card ul {
  margin: 0;
  padding-left: 1.1em;
}

.combo-card li,
.prediction-card li {
  margin: 8px 0;
}

.character-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) 1fr;
  gap: 22px;
  align-items: center;
  margin: 44px 0 24px;
  padding: 26px;
  border-radius: 32px;
  background:
    linear-gradient(100deg, rgba(255, 247, 223, 0.95), rgba(255, 247, 223, 0.72)),
    repeating-linear-gradient(90deg, rgba(15, 91, 63, 0.08) 0 9px, transparent 9px 20px);
}

.character-strip p {
  margin: 0 0 10px;
  color: var(--chili);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.character-strip h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 66px);
  line-height: 0.98;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 10px;
  align-items: end;
}

.character-tile {
  position: relative;
  min-height: 154px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #fff7df, #f1c675);
  border: 2px solid rgba(36, 19, 13, 0.14);
}

.character-tile:nth-child(even) {
  transform: translateY(18px) rotate(2deg);
}

.character-tile:nth-child(odd) {
  transform: rotate(-2deg);
}

.character-tile img {
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 132%;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 14px rgba(36, 19, 13, 0.2));
}

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

.prediction-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 247, 223, 0.93);
}

.prediction-card::after {
  content: "胖";
  position: absolute;
  right: -18px;
  top: -34px;
  color: rgba(217, 34, 22, 0.08);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 160px;
}

.card-character {
  position: absolute;
  right: -18px;
  bottom: -30px;
  width: 172px;
  height: 172px;
  margin: 0;
  opacity: 0.18;
  pointer-events: none;
}

.card-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(36, 19, 13, 0.22));
}

.match-meta,
.verdict-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.match-meta span,
.confidence,
.lean {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: rgba(36, 19, 13, 0.08);
}

.prediction-card h3 {
  margin: 24px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}

.scoreline {
  margin-bottom: 18px;
  color: var(--chili);
  font-size: 22px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.probabilities {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  position: relative;
  z-index: 1;
}

.prob-row {
  display: grid;
  grid-template-columns: 76px 1fr 54px;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(36, 19, 13, 0.12);
}

.bar span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--grass), var(--lime));
}

details {
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.sources {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 20px;
  align-items: center;
  margin: 64px 0 36px;
  padding: 28px;
  border-radius: 32px;
  color: var(--cream);
  background: linear-gradient(135deg, #09251f, #153d2e);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.archive-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 247, 223, 0.9);
}

.archive-date {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--grass);
  font-weight: 900;
}

.archive-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

.archive-card p {
  color: rgba(36, 19, 13, 0.7);
  line-height: 1.7;
}

.archive-card a {
  color: var(--chili);
  font-weight: 900;
  text-decoration-thickness: 3px;
}

.sources p:last-child {
  margin: 0;
  line-height: 1.8;
  color: rgba(255, 247, 223, 0.78);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 42px;
  color: rgba(255, 247, 223, 0.82);
  font-weight: 900;
}

.loading,
.error {
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 247, 223, 0.9);
  font-weight: 900;
}

@keyframes slowSpin {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .sources,
  .prediction-grid,
  .combo-grid,
  .archive-grid,
  .character-strip,
  .score-strip {
    grid-template-columns: 1fr;
  }

  .fat-card {
    min-height: 360px;
  }

  .combo-card {
    transform: none;
  }

  .character-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .character-tile:nth-child(n) {
    transform: none;
  }

  footer,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== 访问密码门 ===== */
body.gate-locked {
  overflow: hidden;
}

#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(200, 255, 77, 0.22), transparent 22rem),
    linear-gradient(150deg, #113a2d, #071f1a 72%);
}

body:not(.gate-locked) #gate-overlay {
  display: none;
}

.gate-box {
  width: min(420px, 100%);
  padding: 38px 32px 32px;
  border-radius: 28px;
  text-align: center;
  color: var(--cream);
  background: rgba(255, 247, 223, 0.07);
  border: 2px solid rgba(200, 255, 77, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.gate-seal {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  color: var(--cream);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 40px;
  background: var(--chili);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.gate-box h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 0.02em;
}

.gate-hint {
  margin: 0 0 22px;
  color: rgba(255, 247, 223, 0.7);
  font-size: 14px;
}

.gate-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(200, 255, 77, 0.32);
  background: rgba(255, 247, 223, 0.12);
  color: var(--cream);
  font-size: 18px;
  font-family: inherit;
  outline: none;
}

.gate-input::placeholder {
  color: rgba(255, 247, 223, 0.5);
}

.gate-input:focus {
  border-color: var(--lime);
}

.gate-submit {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--chili);
  color: var(--cream);
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.gate-submit:hover:not(:disabled) {
  transform: translateY(-2px);
}

.gate-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gate-error {
  margin: 14px 0 0;
  color: var(--lime);
  font-weight: 900;
  font-size: 14px;
}
