:root {
  --ink: #12201c;
  --ink-soft: #1c322c;
  --fog: #e8f2ec;
  --mist: #c5d9cf;
  --amber: #f0a14a;
  --amber-deep: #d4782a;
  --coral: #e86b5a;
  --mint: #3cb89a;
  --cream: #f7faf8;
  --line: rgba(18, 32, 28, 0.12);
  --shadow: 0 24px 60px rgba(18, 32, 28, 0.18);
  --font-display: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, #dff5ea 0%, transparent 55%),
    radial-gradient(900px 600px at 90% 8%, #ffe8c8 0%, transparent 50%),
    linear-gradient(165deg, #f4faf6 0%, #e7f0ea 45%, #f8efe4 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-a {
  width: 280px;
  height: 280px;
  top: 18%;
  left: -60px;
  background: #9fe0c8;
}

.orb-b {
  width: 320px;
  height: 320px;
  right: -80px;
  top: 42%;
  background: #ffd19a;
  animation-delay: -4s;
}

@keyframes drift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(36px) scale(1.08); }
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  background:
    linear-gradient(135deg, var(--mint), #2a9a7e),
    var(--mint);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 28% 28%;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(18, 32, 28, 0.15);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a {
  opacity: 0.72;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  opacity: 1;
  color: var(--amber-deep);
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 5.5rem);
}

.brand-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--mint);
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--ink);
  animation: rise-in 0.8s ease both;
}

.hero-lead {
  margin: 1.15rem 0 0;
  max-width: 28rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(18, 32, 28, 0.78);
  animation: rise-in 0.8s ease 0.12s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  animation: rise-in 0.8s ease 0.22s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-deep) 100%);
  color: #1a1208;
  box-shadow: 0 12px 28px rgba(212, 120, 42, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(212, 120, 42, 0.36);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.85);
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: rise-in 0.9s ease 0.18s both;
}

.board-stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
}

.board {
  position: absolute;
  inset: 8% 18% 22% 4%;
  border-radius: 1.25rem;
  background:
    linear-gradient(rgba(18, 32, 28, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    linear-gradient(90deg, rgba(18, 32, 28, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    linear-gradient(145deg, #d8b07a, #c49252);
  box-shadow: var(--shadow), inset 0 0 0 10px rgba(90, 55, 20, 0.18);
  overflow: hidden;
}

.stone {
  position: absolute;
  width: 11%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.stone.black {
  background: radial-gradient(circle at 32% 28%, #555, #111 62%);
}

.stone.white {
  background: radial-gradient(circle at 32% 28%, #fff, #d8d8d8 70%);
}

.s1 { top: 28%; left: 38%; animation: place 0.5s ease 0.6s both; }
.s2 { top: 40%; left: 50%; animation: place 0.5s ease 0.85s both; }
.s3 { top: 52%; left: 38%; animation: place 0.5s ease 1.1s both; }
.s4 { top: 40%; left: 26%; animation: place 0.5s ease 1.35s both; }
.s5 { top: 52%; left: 50%; animation: place 0.5s ease 1.6s both; }

.cursor-dot {
  position: absolute;
  top: 64%;
  left: 62%;
  width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(18, 32, 28, 0.35);
  animation: pulse 1.8s ease-in-out infinite;
}

.wheel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1;
  filter: drop-shadow(0 18px 28px rgba(18, 32, 28, 0.22));
}

.wheel-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #1f2e28;
  background: conic-gradient(
    #e86b5a 0 25%,
    #f0a14a 0 50%,
    #3cb89a 0 75%,
    #5b8def 0 100%
  );
  animation: spin-slow 10s linear infinite;
  position: relative;
}

.wheel-inner::after {
  content: "";
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: #12201c;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.wheel-pointer {
  position: absolute;
  top: -4%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #12201c;
  transform: translateX(-50%);
  z-index: 2;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes place {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.games {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4.5rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2,
.about h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
}

.section-head p,
.about p {
  margin: 0.65rem 0 0;
  color: rgba(18, 32, 28, 0.72);
  line-height: 1.7;
  max-width: 36rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.game-entry {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 220px;
  border-radius: 1.35rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px rgba(18, 32, 28, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-entry:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(18, 32, 28, 0.14);
}

.game-entry:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.game-art {
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.game-gomoku .game-art {
  background: linear-gradient(160deg, #d9b27f, #b9864d);
}

.game-wheel .game-art {
  background: linear-gradient(160deg, #1f3a34, #2f5b4f);
}

.game-chess .game-art {
  background: linear-gradient(160deg, #c9a06a, #9a7344);
}

.mini-board {
  width: 110px;
  height: 110px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 0.75rem;
  background: rgba(90, 55, 20, 0.18);
}

.mini-board i {
  border-radius: 50%;
  background: transparent;
}

.mini-board i:nth-child(1),
.mini-board i:nth-child(5),
.mini-board i:nth-child(9) {
  background: radial-gradient(circle at 30% 28%, #666, #111 65%);
}

.mini-board i:nth-child(3),
.mini-board i:nth-child(7) {
  background: radial-gradient(circle at 30% 28%, #fff, #d0d0d0 70%);
}

.mini-wheel {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 5px solid #0f1c18;
  background: conic-gradient(
    #e86b5a 0 25%,
    #f0a14a 0 50%,
    #3cb89a 0 75%,
    #5b8def 0 100%
  );
  position: relative;
  animation: spin-slow 8s linear infinite;
}

.mini-wheel span {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: #12201c;
}

.mini-xiangqi {
  position: relative;
  width: 118px;
  height: 132px;
  border-radius: 0.55rem;
  background:
    linear-gradient(rgba(18, 32, 28, 0.14) 1px, transparent 1px) 0 0 / 100% 16.66%,
    linear-gradient(90deg, rgba(18, 32, 28, 0.14) 1px, transparent 1px) 0 0 / 20% 100%,
    linear-gradient(180deg, #e8c98a, #d4ad6a);
  box-shadow: inset 0 0 0 3px rgba(90, 55, 20, 0.22);
}

.mini-xiangqi::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 46%;
  height: 2px;
  background: rgba(18, 32, 28, 0.2);
  border-top: 1px dashed rgba(18, 32, 28, 0.35);
  border-bottom: 1px dashed rgba(18, 32, 28, 0.35);
}

.mini-xiangqi .piece {
  position: absolute;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.mini-xiangqi .piece.red {
  color: #8b1a12;
  background: radial-gradient(circle at 32% 28%, #fff5f0, #f0c8b8 70%);
  border: 2px solid #b52a20;
}

.mini-xiangqi .piece.black {
  color: #1a1208;
  background: radial-gradient(circle at 32% 28%, #f5f0e8, #d8ccb8 70%);
  border: 2px solid #3a2e22;
}

.mini-xiangqi .piece:nth-child(1) { top: 10%; left: 42%; }
.mini-xiangqi .piece:nth-child(2) { bottom: 10%; left: 42%; }
.mini-xiangqi .piece:nth-child(3) { top: 34%; left: 18%; }
.mini-xiangqi .piece:nth-child(4) { bottom: 34%; right: 16%; }

.game-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem 1.5rem 1.4rem 0.4rem;
}

.game-index {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--mint);
}

.game-meta h3 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.05em;
}

.game-meta p {
  margin: 0.55rem 0 0;
  color: rgba(18, 32, 28, 0.7);
  line-height: 1.55;
  font-size: 0.95rem;
}

.game-go {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--amber-deep);
  transition: transform 0.2s ease;
  display: inline-block;
}

.game-entry:hover .game-go {
  transform: translateX(4px);
}

.about {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 4.5rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 1.5rem 2rem;
  text-align: center;
  color: rgba(18, 32, 28, 0.55);
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.5rem;
    gap: 1.75rem;
  }

  .hero-visual {
    order: -1;
  }

  .board-stage {
    width: min(100%, 240px);
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding-inline: 1.1rem;
  }

  .nav {
    gap: 0.9rem;
    font-size: 0.88rem;
  }

  .hero {
    padding-top: 1rem;
    gap: 1.15rem;
  }

  .board-stage {
    width: min(72vw, 200px);
  }

  .hero,
  .games,
  .about {
    padding-inline: 1.1rem;
  }

  .game-entry {
    grid-template-columns: 1fr;
  }

  .game-art {
    min-height: 150px;
  }

  .game-meta {
    padding: 1.2rem 1.25rem 1.4rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
