:root {
  --night: #030303;
  --ink: #f5efe8;
  --paper-dim: #b9aba0;
  --seal-red: #c8131d;
  --cinnabar: #8f0b12;
  --ember: #ef3340;
  --ash: #15110f;
  --line-red: rgba(200, 19, 29, 0.36);
  --line-ink: rgba(245, 239, 232, 0.08);
  --parallax-x: 0px;
  --parallax-y: 0px;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 28%, rgba(200, 19, 29, 0.18), transparent 30%),
    radial-gradient(circle at 22% 78%, rgba(143, 11, 18, 0.2), transparent 34%),
    linear-gradient(145deg, #020202 0%, #0a0605 50%, #050303 100%);
  font-family:
    "STKaiti",
    "KaiTi",
    "Songti SC",
    "Noto Serif SC",
    serif;
}

.war-room {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.ink-background {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.ink-background::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 7px 7px;
  opacity: 0.34;
  mix-blend-mode: screen;
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(239, 51, 64, 0.18), transparent 0 94px),
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(245, 239, 232, 0.1), transparent 0 34px);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 180ms ease;
}

body.cursor-active .cursor-spotlight {
  opacity: 1;
}

.cinnabar-spark {
  position: fixed;
  z-index: 19;
  width: var(--spark-size, 7px);
  height: var(--spark-size, 7px);
  border-radius: 50%;
  background: rgba(239, 51, 64, 0.92);
  box-shadow:
    0 0 10px rgba(239, 51, 64, 0.9),
    0 0 24px rgba(200, 19, 29, 0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cinnabar-fade 680ms ease-out forwards;
}

.chess-grid {
  position: absolute;
  inset: 9% 6% 7%;
  transform: translate3d(calc(var(--parallax-x) * -0.22), calc(var(--parallax-y) * -0.22), 0);
  border: 1px solid rgba(200, 19, 29, 0.32);
  background:
    linear-gradient(var(--line-red) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-red) 1px, transparent 1px),
    linear-gradient(var(--line-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-ink) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 52% 48%, black 0%, transparent 76%);
  opacity: 0.64;
}

.river-trend {
  position: absolute;
  left: -4%;
  top: 26%;
  width: 108%;
  height: 44%;
  transform: translate3d(calc(var(--parallax-x) * 0.42), calc(var(--parallax-y) * 0.18), 0);
  background:
    linear-gradient(105deg, transparent 0 12%, rgba(200, 19, 29, 0.0) 12.5%, rgba(200, 19, 29, 0.78) 13%, transparent 13.4% 100%),
    linear-gradient(150deg, transparent 0 24%, rgba(239, 51, 64, 0.62) 24.2%, transparent 24.7% 100%),
    linear-gradient(118deg, transparent 0 42%, rgba(200, 19, 29, 0.38) 42.2%, transparent 42.8% 100%),
    linear-gradient(146deg, transparent 0 58%, rgba(239, 51, 64, 0.68) 58.1%, transparent 58.6% 100%);
  filter: drop-shadow(0 0 20px rgba(200, 19, 29, 0.36));
  opacity: 0.68;
  animation: river-flow 12s linear infinite;
}

.river-trend::before {
  position: absolute;
  inset: 28% 4% 24%;
  content: "";
  background: rgba(200, 19, 29, 0.12);
  clip-path: polygon(0 68%, 9% 54%, 18% 60%, 30% 28%, 42% 38%, 53% 18%, 66% 46%, 78% 34%, 100% 8%, 100% 14%, 78% 40%, 66% 52%, 53% 24%, 42% 44%, 30% 34%, 18% 66%, 9% 60%, 0 74%);
}

.terrain-lines {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--parallax-x) * 0.12), calc(var(--parallax-y) * 0.12), 0);
  background:
    radial-gradient(ellipse at 70% 32%, transparent 0 36%, rgba(245, 239, 232, 0.08) 36.4%, transparent 36.8%),
    radial-gradient(ellipse at 65% 36%, transparent 0 44%, rgba(245, 239, 232, 0.06) 44.4%, transparent 44.8%),
    radial-gradient(ellipse at 24% 76%, transparent 0 28%, rgba(200, 19, 29, 0.12) 28.4%, transparent 28.8%);
  opacity: 0.78;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(330px, 1.18fr);
  align-items: center;
  width: min(1180px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 62px 0 46px;
  gap: 42px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  animation: ink-rise 900ms ease-out both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #e85258;
  font-family: "Bahnschrift", "Microsoft YaHei", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 42px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--seal-red));
  box-shadow: 0 0 16px rgba(200, 19, 29, 0.9);
}

.brand-title {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-size: clamp(5.4rem, 13vw, 10.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(200, 19, 29, 0.5),
    9px 9px 0 rgba(200, 19, 29, 0.34);
}

.brand-title::before {
  position: absolute;
  right: 0.04em;
  top: -0.18em;
  width: 0.72em;
  height: 0.72em;
  content: "";
  border: 2px solid rgba(200, 19, 29, 0.68);
  transform: rotate(7deg);
  opacity: 0.5;
}

.brand-title::after {
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 1.12em;
  height: 7px;
  content: "";
  background: linear-gradient(90deg, var(--seal-red), rgba(200, 19, 29, 0.0));
  box-shadow: 0 0 22px rgba(200, 19, 29, 0.74);
}

.hero-line {
  margin: 34px 0 0;
  color: #fff6ee;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(1.52rem, 3vw, 2.36rem);
  font-weight: 800;
}

.hero-subline {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--paper-dim);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.9;
}

.seal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
  font-family: "Microsoft YaHei", sans-serif;
}

.seal-row span {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(200, 19, 29, 0.62);
  color: #f9e5df;
  background:
    linear-gradient(145deg, rgba(200, 19, 29, 0.22), rgba(9, 5, 4, 0.76)),
    rgba(12, 8, 7, 0.82);
  box-shadow:
    inset 0 0 18px rgba(200, 19, 29, 0.12),
    0 0 20px rgba(200, 19, 29, 0.11);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.strategy-board {
  position: relative;
  min-height: 620px;
  animation: ink-rise 1050ms 120ms ease-out both;
}

.board-frame {
  position: absolute;
  inset: 5% 0 0;
  overflow: hidden;
  border: 1px solid rgba(200, 19, 29, 0.4);
  background:
    radial-gradient(circle at 52% 42%, rgba(200, 19, 29, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 26%),
    rgba(5, 4, 3, 0.58);
  box-shadow:
    inset 0 0 68px rgba(200, 19, 29, 0.1),
    0 34px 90px rgba(0, 0, 0, 0.5);
  clip-path: polygon(7% 0, 100% 0, 100% 82%, 86% 100%, 0 100%, 0 10%);
  transform: translate3d(calc(var(--parallax-x) * 0.16), calc(var(--parallax-y) * 0.16), 0);
}

.board-frame::before {
  position: absolute;
  inset: 8%;
  content: "";
  background:
    linear-gradient(rgba(200, 19, 29, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 19, 29, 0.22) 1px, transparent 1px);
  background-size: 82px 82px;
  opacity: 0.78;
}

.board-frame::after {
  position: absolute;
  inset: 8%;
  content: "";
  background:
    linear-gradient(45deg, transparent 49.8%, rgba(200, 19, 29, 0.28) 50%, transparent 50.2%),
    linear-gradient(-45deg, transparent 49.8%, rgba(200, 19, 29, 0.2) 50%, transparent 50.2%);
  background-size: 164px 164px;
  opacity: 0.52;
}

.board-axis {
  position: absolute;
  z-index: 2;
  background: rgba(239, 51, 64, 0.5);
  box-shadow: 0 0 18px rgba(200, 19, 29, 0.56);
}

.board-axis-x {
  left: 9%;
  right: 9%;
  top: 52%;
  height: 1px;
}

.board-axis-y {
  top: 9%;
  bottom: 9%;
  left: 52%;
  width: 1px;
}

.route {
  position: absolute;
  z-index: 3;
  border-top: 2px solid rgba(239, 51, 64, 0.7);
  filter: drop-shadow(0 0 12px rgba(200, 19, 29, 0.55));
  transform-origin: left center;
}

.route-one {
  left: 15%;
  top: 65%;
  width: 56%;
  transform: rotate(-26deg);
}

.route-two {
  left: 29%;
  top: 28%;
  width: 44%;
  transform: rotate(18deg);
  opacity: 0.74;
}

.route-three {
  left: 45%;
  top: 78%;
  width: 38%;
  transform: rotate(-50deg);
  opacity: 0.62;
}

.piece {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.6),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.piece-dark {
  border: 1px solid rgba(245, 239, 232, 0.28);
  color: #f2e4da;
  background: radial-gradient(circle, #19110f, #050403 68%);
}

.piece-red {
  border: 1px solid rgba(255, 142, 146, 0.62);
  color: #fff6f0;
  background: radial-gradient(circle, #cf1b25, #68070d 70%);
  box-shadow:
    0 0 28px rgba(200, 19, 29, 0.54),
    inset 0 0 18px rgba(255, 255, 255, 0.1);
}

.piece-one {
  left: 15%;
  top: 24%;
}

.piece-two {
  right: 18%;
  top: 22%;
}

.piece-three {
  left: 27%;
  bottom: 17%;
}

.piece-four {
  right: 26%;
  bottom: 24%;
}

.seal-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: min(31vw, 224px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 224, 213, 0.72);
  color: #fff4ed;
  background:
    radial-gradient(circle, rgba(239, 51, 64, 0.88), rgba(143, 11, 18, 0.86) 64%, rgba(5, 3, 3, 0.94));
  box-shadow:
    0 0 44px rgba(200, 19, 29, 0.7),
    inset 0 0 36px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  transform: translate(-50%, -50%) rotate(-7deg);
  transition:
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.seal-mark::before,
.seal-mark::after {
  position: absolute;
  inset: 12px;
  content: "";
  border: 1px solid rgba(255, 236, 226, 0.44);
}

.seal-mark::after {
  inset: 24px;
}

.seal-mark span {
  font-size: clamp(4.2rem, 9vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
}

.seal-mark:hover,
.seal-mark:focus-visible {
  filter: brightness(1.08);
  box-shadow:
    0 0 62px rgba(200, 19, 29, 0.92),
    0 0 16px rgba(255, 236, 226, 0.34),
    inset 0 0 36px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%) rotate(-7deg) scale(1.035);
}

.tactic-note {
  position: absolute;
  z-index: 6;
  padding: 12px 16px;
  border: 1px solid rgba(200, 19, 29, 0.4);
  color: #f5ddd6;
  background: rgba(8, 5, 4, 0.78);
  box-shadow: 0 0 24px rgba(200, 19, 29, 0.18);
  font-family: "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.tactic-note-top {
  top: 15%;
  left: 44%;
}

.tactic-note-bottom {
  right: 9%;
  bottom: 13%;
}

.ink-node {
  position: absolute;
  z-index: 7;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow:
    0 0 12px rgba(239, 51, 64, 0.92),
    0 0 30px rgba(200, 19, 29, 0.52);
  opacity: 0;
  animation: node-glow 4.2s ease-in-out infinite;
}

@keyframes ink-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes river-flow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 180px 0;
  }
}

@keyframes node-glow {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.68);
  }

  45%,
  64% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cinnabar-fade {
  from {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
  }

  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-dx, 0px)), calc(-50% + var(--spark-dy, 0px))) scale(0.1);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 34px;
    gap: 34px;
  }

  .strategy-board {
    min-height: 460px;
  }

  .board-frame {
    position: relative;
    min-height: 460px;
  }
}

@media (max-width: 540px) {
  .hero {
    width: min(100% - 28px, 1180px);
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  .seal-row span {
    width: 100%;
    clip-path: none;
  }

  .strategy-board,
  .board-frame {
    min-height: 390px;
  }

  .piece {
    width: 50px;
    height: 50px;
    font-size: 1.12rem;
  }

  .seal-mark {
    width: 150px;
  }

  .tactic-note {
    padding: 9px 11px;
    font-size: 0.84rem;
  }

  .tactic-note-top {
    left: 36%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .cursor-spotlight,
  .cinnabar-spark {
    display: none !important;
  }
}
