/* 主题变量统一由 ../shared/tokens.css 提供 */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--bg);
}

body {
  overflow: hidden;
  color: var(--cream);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

a,
button {
  color: inherit;
  font: inherit;
}

.home-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: url("./assets/village-bg.webp") center bottom / cover no-repeat;
}

.home-page::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 17% 35%, rgba(34, 19, 10, 0.34) 0%, rgba(34, 19, 10, 0.18) 24%, transparent 46%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.18) 0%, transparent 15%, transparent 84%, rgba(28, 14, 4, 0.16) 100%);
}

.site-header,
.map-intro,
.hotspot-layer,
.map-hud {
  position: relative;
  z-index: 2;
}

.site-header {
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  height: 92px;
  padding: 0 clamp(38px, 4.7vw, 82px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(244, 200, 121, 0.68);
  border-radius: 50%;
  background: rgba(255, 236, 184, 0.18);
  box-shadow: 0 0 18px rgba(255, 179, 71, 0.22), inset 0 0 10px rgba(255, 246, 207, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-name {
  font-family: "STSong", "SimSun", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gold);
}

.brand-line {
  width: 1px;
  height: 17px;
  background: rgba(244, 200, 121, 0.32);
}

.brand-tagline {
  font-size: 14px;
  color: rgba(255, 228, 177, 0.82);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 4vw, 62px);
  white-space: nowrap;
}

.main-nav a {
  position: relative;
  padding: 10px 0 18px;
  font-size: 17px;
  text-decoration: none;
  color: rgba(255, 241, 210, 0.72);
  transition: color 180ms ease, text-shadow 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(244, 200, 121, 0.24);
}

.main-nav a.active::before,
.main-nav a.active::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.main-nav a.active::before {
  bottom: 6px;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.main-nav a.active::after {
  bottom: 1px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 15px rgba(244, 200, 121, 0.86);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}

.search-button {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.search-button::before {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 15px;
  height: 15px;
  content: "";
  border: 2px solid rgba(255, 246, 224, 0.92);
  border-radius: 50%;
}

.search-button::after {
  position: absolute;
  top: 23px;
  left: 23px;
  width: 11px;
  height: 2px;
  content: "";
  background: rgba(255, 246, 224, 0.92);
  border-radius: 99px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.login-button {
  min-width: 132px;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--gold);
  border: 1px solid rgba(244, 200, 121, 0.52);
  border-radius: 13px;
  background: rgba(106, 68, 33, 0.14);
  box-shadow: 0 8px 22px rgba(94, 53, 14, 0.12), inset 0 0 16px rgba(255, 235, 179, 0.05);
}

.map-intro {
  z-index: 4;
  width: min(610px, 43vw);
  margin-top: clamp(54px, 8vh, 82px);
  margin-left: clamp(52px, 5vw, 84px);
  padding: 16px 18px 18px 0;
  animation: fade-up 740ms ease both;
}

.map-intro::before {
  position: absolute;
  inset: -18px -32px -20px -24px;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at 28% 45%, rgba(37, 21, 10, 0.26) 0%, rgba(37, 21, 10, 0.13) 38%, transparent 72%);
}

.map-intro h1 {
  margin: 0 0 16px;
  font-family: var(--xh-font-serif);
  font-size: var(--xh-fs-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 1px;
  color: #fff0cb; /* 回退色 */
  background: linear-gradient(176deg, #fff6e0 0%, #ffe6b0 52%, var(--xh-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(42, 19, 3, 0.55)) drop-shadow(0 0 16px rgba(244, 200, 121, 0.22));
}

.map-kicker {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(18px, 1.35vw, 24px);
  color: rgba(255, 241, 210, 0.9);
  text-shadow: 0 2px 12px rgba(42, 19, 3, 0.56);
}

.map-rule {
  display: block;
  width: 46px;
  height: 2px;
  margin: 21px 0 14px;
  background: var(--xh-grad-rule);
  box-shadow: 0 0 12px rgba(244, 200, 121, 0.5);
}

.map-copy {
  margin: 0;
  font-size: clamp(13px, 0.9vw, 16px);
  line-height: 1.7;
  color: var(--muted);
  text-shadow: 0 2px 11px rgba(42, 19, 3, 0.56);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  width: min(650px, 54vw);
  margin-top: clamp(21px, 3vh, 32px);
}

.hotspot-label {
  border: 1px solid rgba(244, 200, 121, 0.3);
  background: linear-gradient(180deg, rgba(24, 14, 6, 0.6), rgba(18, 10, 4, 0.65));
  box-shadow: 0 10px 24px var(--shadow), 0 0 18px rgba(255, 181, 73, 0.06), inset 0 0 18px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
}

.map-button {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 236, 184, 0.16), rgba(122, 78, 35, 0.2));
  box-shadow: 0 10px 24px var(--shadow), 0 0 18px rgba(255, 181, 73, 0.06), inset 0 0 18px rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 174px;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  color: rgba(255, 241, 210, 0.9);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-button.is-primary {
  color: #fff6df;
  border-color: rgba(255, 220, 145, 0.7);
  background: var(--xh-grad-gold);
  box-shadow: 0 10px 26px rgba(255, 158, 40, 0.22), inset 0 1px 0 rgba(255, 238, 190, 0.32);
}

.entry-logo,
.hotspot-label img,
.stat-logo {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 200, 121, 0.48);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 9px rgba(255, 179, 71, 0.18);
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  width: 136px;
  height: 70px;
  color: #fff1d7;
  text-decoration: none;
  pointer-events: auto;
}

.hotspot::after {
  position: absolute;
  left: var(--pin-x, 50%);
  top: var(--pin-y, 57px);
  width: 76px;
  height: 34px;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(255, 183, 73, 0.24) 0%, rgba(255, 183, 73, 0.1) 38%, transparent 72%);
  opacity: 0.45;
  transform: translate(-50%, -15%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hotspot-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  min-height: 34px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.hotspot-line {
  position: absolute;
  left: var(--pin-x, 50%);
  top: 32px;
  width: 1px;
  height: calc(var(--pin-y, 57px) - 32px);
  background: linear-gradient(180deg, rgba(244, 200, 121, 0.7), rgba(255, 244, 207, 0.08));
  transform: translateX(-50%);
}

.hotspot-pin {
  position: absolute;
  left: var(--pin-x, 50%);
  top: var(--pin-y, 57px);
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fff3cd;
  box-shadow: 0 0 0 6px rgba(244, 200, 121, 0.1), 0 0 16px rgba(255, 224, 142, 0.88);
  transform: translateX(-50%);
  animation: pulse 2.4s ease-in-out infinite;
}

.map-button:hover,
.map-button:focus-visible,
.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label,
.hotspot.is-active .hotspot-label,
.login-button:hover,
.login-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-hot);
  background: linear-gradient(180deg, rgba(255, 239, 194, 0.22), rgba(132, 82, 34, 0.26));
  box-shadow: 0 13px 30px rgba(255, 166, 49, 0.18), 0 0 20px rgba(255, 190, 90, 0.1), inset 0 0 22px rgba(255, 238, 190, 0.09);
}

.map-button.is-primary:hover,
.map-button.is-primary:focus-visible {
  color: #fff6df;
  border-color: rgba(255, 224, 150, 0.9);
  background: linear-gradient(180deg, #f6c96e, #c67c2c);
  box-shadow: 0 14px 32px rgba(255, 158, 40, 0.32), inset 0 1px 0 rgba(255, 244, 205, 0.42);
}

.hotspot:hover .hotspot-pin,
.hotspot:focus-visible .hotspot-pin,
.hotspot.is-active .hotspot-pin {
  box-shadow: 0 0 0 10px rgba(244, 200, 121, 0.17), 0 0 28px rgba(255, 224, 142, 1);
}

.hotspot:hover::after,
.hotspot:focus-visible::after,
.hotspot.is-active::after {
  opacity: 0.95;
  transform: translate(-50%, -15%) scale(1.08);
}

.hotspot-ai-nav {
  left: 47.5%;
  top: 50.5%;
  --pin-x: 55%;
  --pin-y: 56px;
}

.hotspot-plaza {
  left: 46.9%;
  top: 63.7%;
  --pin-x: 57%;
  --pin-y: 54px;
}

.hotspot-workshop {
  left: 63.2%;
  top: 52.9%;
  --pin-x: 57%;
  --pin-y: 63px;
}

.hotspot-gallery {
  left: 79.1%;
  top: 52.8%;
  --pin-x: 51%;
  --pin-y: 66px;
}

.hotspot-mission {
  left: 76.8%;
  top: 71.3%;
  --pin-x: 49%;
  --pin-y: 62px;
}

.hotspot-camp {
  left: 22.1%;
  top: 70.8%;
  --pin-x: 70%;
  --pin-y: 60px;
}

.stats-bar {
  position: absolute;
  left: 50%;
  bottom: clamp(34px, 4.5vh, 48px);
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  width: min(760px, calc(100% - 160px));
  min-height: 54px;
  padding: 7px 18px;
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-pill);
  background: linear-gradient(180deg, rgba(111, 70, 33, 0.16), rgba(64, 40, 21, 0.15));
  box-shadow: 0 8px 24px rgba(82, 45, 13, 0.14), 0 0 16px rgba(255, 181, 73, 0.04), inset 0 1px 0 rgba(255, 238, 190, 0.14), inset 0 0 18px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  animation: float-in 880ms 160ms ease both;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}

.stat + .stat {
  border-left: 1px solid rgba(244, 200, 121, 0.13);
}

.stat-logo {
  width: 24px;
  height: 24px;
}

.stat-content {
  display: grid;
  gap: 3px;
}

.stat-content span {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(244, 200, 121, 0.82);
}

.stat-content strong {
  font-family: var(--xh-font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--xh-gold-bright);
  text-shadow: 0 0 12px rgba(255, 216, 135, 0.28);
}

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

@keyframes float-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateX(-50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

@media (max-width: 1220px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: 82px;
  }

  .main-nav {
    display: none;
  }

  .map-intro {
    width: min(560px, calc(100% - 58px));
    margin-top: 42px;
    margin-left: 30px;
  }

  .map-intro h1 {
    font-size: clamp(40px, 5.4vw, 64px);
  }

  .hotspot {
    transform: scale(0.86);
    transform-origin: left top;
  }
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .home-page {
    min-height: 100svh;
    padding-bottom: 24px;
    overflow: hidden auto;
    background-position: center bottom;
  }

  .home-page::before {
    background:
      radial-gradient(ellipse at 50% 22%, rgba(34, 19, 10, 0.22) 0%, transparent 54%),
      linear-gradient(180deg, rgba(4, 6, 10, 0.14) 0%, transparent 32%, rgba(28, 14, 4, 0.14) 100%);
  }

  .site-header {
    height: 70px;
    padding: 0 18px;
  }

  .brand-line,
  .brand-tagline,
  .search-button {
    display: none;
  }

  .brand-name {
    font-size: 22px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .login-button {
    min-width: auto;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
  }

  .map-intro {
    width: calc(100% - 36px);
    margin: 24px 18px 0;
  }

  .map-intro h1 {
    font-size: 38px;
  }

  .map-kicker {
    font-size: 18px;
  }

  .map-copy {
    font-size: 13px;
  }

  .map-actions {
    width: 100%;
    gap: 10px;
    margin-top: 20px;
  }

  .map-button {
    width: 100%;
    min-height: 48px;
  }

  .hotspot-layer {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 38vh 18px 14px;
    pointer-events: auto;
  }

  .hotspot {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }

  .hotspot-line,
  .hotspot-pin {
    display: none;
  }

  .hotspot-label {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 12px;
    font-size: 14px;
  }

  .stats-bar {
    position: relative;
    left: auto;
    bottom: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% - 36px);
    min-height: auto;
    margin: 16px auto 0;
    padding: 10px;
    transform: none;
    animation: none;
  }

  .stat {
    justify-content: flex-start;
    gap: 10px;
    padding: 8px;
  }

  .stat + .stat {
    border-left: 0;
  }

  .stat-logo {
    width: 22px;
    height: 22px;
  }

  .stat-content span {
    font-size: 12px;
  }

  .stat-content strong {
    font-size: 19px;
  }
}
