@font-face {
  font-family: "ZiXiaoHunCangLang";
  src: url("../fonts/ZiXiaoHun-Subset.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #042113;
  --bg-felt: #093d24;
  --bg-card: rgba(9, 48, 30, 0.74);
  --bg-card-hover: rgba(14, 66, 42, 0.9);
  --jade-500: #10b981;
  --jade-400: #34d399;
  --jade-300: #6ee7b7;
  --jade-glow: rgba(16, 185, 129, 0.35);
  --gold-400: #eab308;
  --gold-300: #fde047;
  --gold-soft: rgba(234, 179, 8, 0.18);
  --ivory: #fbf7ed;
  --ivory-border: #d9cfb8;
  --pip-red: #dc2626;
  --pip-dark: #14281d;
  --text-main: #ecfdf5;
  --text-muted: #a7f3d0;
  --text-dim: #6ea88e;
  --border-jade: rgba(52, 211, 153, 0.24);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

html {
  scroll-behavior: smooth;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: #07351f;
  background-image:
    radial-gradient(ellipse 85% 65% at 50% 22%, rgba(28, 138, 82, 0.42) 0%, rgba(12, 74, 43, 0.58) 48%, rgba(4, 28, 16, 0.94) 100%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.045) 0px, rgba(0, 0, 0, 0.045) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #0b4a2c 0%, #07351f 55%, #042113 100%);
  background-attachment: fixed;
  line-height: 1.65;
}

/* 绿色绒面桌布细腻纤维质感层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='felt'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23felt)' opacity='0.38'/%3E%3C/svg%3E");
}

/* 顶部导航栏 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 32, 19, 0.82);
  border-bottom: 1px solid var(--border-jade);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

header.scrolled {
  background: rgba(4, 26, 15, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-svg {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.48));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-logo-svg {
  transform: translateY(-1px) scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: "ZiXiaoHunCangLang", "Xingkai SC", "Kaiti SC", serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 6px;
  line-height: 1.05;
  background: linear-gradient(135deg, #fffdf7 15%, var(--gold-300) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav li {
  display: flex;
  align-items: center;
}

nav li + li::before {
  content: "◆";
  font-size: 8px;
  color: rgba(253, 224, 71, 0.38);
  margin-right: 4px;
  user-select: none;
}

nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-family: "ZiXiaoHunCangLang", "Songti SC", "STSong", "PingFang SC", sans-serif;
  color: #d1fae5;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 3px;
  border: 1px solid transparent;
  transition: all 0.28s ease;
}

nav a::before,
nav a::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  opacity: 0;
  transition: all 0.28s ease;
  pointer-events: none;
}

nav a::before {
  top: 3px;
  left: 3px;
  border-top: 1.5px solid var(--gold-300);
  border-left: 1.5px solid var(--gold-300);
  transform: translate(2px, 2px);
}

nav a::after {
  bottom: 3px;
  right: 3px;
  border-bottom: 1.5px solid var(--gold-300);
  border-right: 1.5px solid var(--gold-300);
  transform: translate(-2px, -2px);
}

nav a:hover {
  color: var(--gold-300);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
}

nav a:hover::before,
nav a:hover::after,
nav a.active::before,
nav a.active::after {
  opacity: 1;
  transform: translate(0, 0);
}

nav a.active {
  color: var(--gold-300);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.3) 0%, rgba(6, 78, 59, 0.85) 100%);
  border-color: rgba(253, 224, 71, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(4, 27, 18, 0.6),
    inset 0 0 12px rgba(253, 224, 71, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 6px;
  background: rgba(4, 29, 17, 0.75);
  border: 1px solid rgba(234, 179, 8, 0.42);
  color: var(--gold-300);
  font-family: "ZiXiaoHunCangLang", "Songti SC", "STSong", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.28s ease;
  box-shadow: inset 0 0 8px rgba(253, 224, 71, 0.08);
}

.sound-toggle:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--gold-300);
  transform: translateY(-1px);
}

.sound-toggle.muted {
  color: var(--text-dim);
  border-color: rgba(52, 211, 153, 0.24);
}

.sound-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
}

.sound-bars i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: currentColor;
  height: 4px;
  transition: height 0.2s ease;
}

.sound-toggle.playing .sound-bars i:nth-child(1) { animation: soundWave 1.1s ease-in-out infinite 0s; }
.sound-toggle.playing .sound-bars i:nth-child(2) { animation: soundWave 1.1s ease-in-out infinite 0.25s; }
.sound-toggle.playing .sound-bars i:nth-child(3) { animation: soundWave 1.1s ease-in-out infinite 0.5s; }

@keyframes soundWave {
  0%, 100% { height: 4px; }
  50% { height: 13px; }
}

.menu-toggle {
  display: none;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--border-jade);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

main {
  position: relative;
  z-index: 1;
}

section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 100px 24px 72px;
}

/* 滚动渐入动效 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 主页 Hero */
#home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding-top: 140px;
}

.hero-title {
  font-family: "ZiXiaoHunCangLang", "Xingkai SC", "Kaiti SC", serif;
  font-size: clamp(42px, 5.4vw, 64px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 3px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, #ffffff 10%, var(--jade-300) 55%, var(--gold-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 30px;
}

.build-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-jade);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.build-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--jade-300);
  font-weight: 600;
}

.progress-track {
  height: 15px;
  padding: 2px;
  border-radius: 999px;
  display: flex;
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(2, 16, 10, 0.96) 0%, rgba(8, 42, 26, 0.9) 100%);
  border: 1px solid rgba(52, 211, 153, 0.32);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.78),
    0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  position: relative;
  height: 100%;
  width: 68%;
  border-radius: 999px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.04) 48%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(90deg, #059669 0%, var(--jade-400) 45%, var(--gold-300) 75%, var(--jade-400) 100%);
  background-size: 100% 100%, 200% 100%;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(52, 211, 153, 0.45);
  animation: growFromLeft 1.1s cubic-bezier(0.22, 1, 0.36, 1), shimmerBar 2.6s linear infinite;
}

.progress-fill::before {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffbeb;
  box-shadow: 0 0 8px #fde047, 0 0 14px #fde047;
}

@keyframes growFromLeft {
  from { width: 0%; }
  to { width: 68%; }
}

@keyframes shimmerBar {
  0% { background-position: 0 0, 200% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}

.build-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.build-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: var(--text-muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--jade-400), var(--jade-500));
  color: #032215;
  box-shadow: 0 8px 25px var(--jade-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
}

.btn-outline {
  background: rgba(11, 52, 35, 0.65);
  color: var(--text-main);
  border: 1px solid var(--border-jade);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--jade-400);
  transform: translateY(-2px);
}

/* 主页右侧立体骨牌展示 */
.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  perspective: 1100px;
}

.felt-halo {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.24) 0%, rgba(16, 185, 129, 0.04) 60%, transparent 72%);
  border: 1px dashed rgba(253, 224, 71, 0.32);
  animation: spinSlow 28s linear infinite;
}

.compass-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  pointer-events: none;
  z-index: 1;
}

.compass-dir {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "ZiXiaoHunCangLang", "Kaiti SC", "STKaiti", serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--gold-300);
  background: #07351f;
  border: 1px solid rgba(253, 224, 71, 0.55);
  box-shadow:
    0 0 0 3px rgba(7, 53, 31, 0.85),
    0 4px 12px rgba(0, 0, 0, 0.45);
}

.compass-dir.north { top: -17px; left: 50%; transform: translateX(-50%); }
.compass-dir.east  { right: -17px; top: 50%; transform: translateY(-50%); }
.compass-dir.south { bottom: -17px; left: 50%; transform: translateX(-50%); }
.compass-dir.west  { left: -17px; top: 50%; transform: translateY(-50%); }

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tile-showcase {
  position: relative;
  display: flex;
  gap: 22px;
  z-index: 2;
}

/* 骨牌组件（立体骨质厚度与雕刻点数） */
.domino-tile {
  width: 90px;
  height: 204px;
  background: linear-gradient(155deg, #fffef9 0%, #f6eed9 54%, #e8dcc0 100%);
  border: 1.5px solid #e5d8ba;
  border-radius: 15px;
  padding: 13px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
  box-shadow:
    1px 1.5px 0 #d8cab0,
    2px 3px 0 #ccbc9e,
    3px 4.5px 0 #bfae8d,
    4px 6px 0 #b19f7d,
    5px 7.5px 0 #a18f6c,
    6px 9px 0 #8d7c5c,
    7px 10.5px 0 #183a28,
    8px 12px 0 #0d2418,
    14px 26px 40px rgba(0, 0, 0, 0.68),
    inset 0 2px 4px rgba(255, 255, 255, 0.96),
    inset -2px -3px 7px rgba(168, 152, 118, 0.42);
  position: relative;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.domino-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

.domino-tile.float-1 {
  animation: floatTile1 4.4s ease-in-out infinite;
}

.domino-tile.float-2 {
  animation: floatTile2 5s ease-in-out infinite;
}

@keyframes floatTile1 {
  0%, 100% { transform: perspective(900px) rotateX(15deg) rotateY(-10deg) rotateZ(-6deg) translateY(0); }
  50% { transform: perspective(900px) rotateX(12deg) rotateY(-6deg) rotateZ(-3deg) translateY(-14px); }
}

@keyframes floatTile2 {
  0%, 100% { transform: perspective(900px) rotateX(15deg) rotateY(10deg) rotateZ(6deg) translateY(8px); }
  50% { transform: perspective(900px) rotateX(12deg) rotateY(6deg) rotateZ(3deg) translateY(-8px); }
}

.domino-tile:hover {
  transform: perspective(900px) rotateX(4deg) rotateY(0deg) rotateZ(0deg) translateY(-14px) scale(1.06) !important;
  box-shadow:
    1px 2px 0 #d8cab0,
    2px 4px 0 #ccbc9e,
    3px 6px 0 #bfae8d,
    4px 8px 0 #b19f7d,
    5px 10px 0 #8d7c5c,
    6px 12px 0 #0d2418,
    18px 34px 48px rgba(0, 0, 0, 0.72),
    0 0 28px var(--jade-glow),
    inset 0 2px 4px rgba(255, 255, 255, 0.96);
}

.domino-divider {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 4%, rgba(60, 48, 28, 0.34) 20%, rgba(60, 48, 28, 0.42) 80%, transparent 96%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  margin: 4px 0;
}

.pip-grid {
  height: 78px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  padding: 2px;
}

.pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.pip.red {
  background: radial-gradient(circle at 60% 65%, #ef4444 0%, #b91c1c 65%, #7f1d1d 100%);
  box-shadow: inset 0 2.5px 4px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.88);
}

.pip.dark {
  background: radial-gradient(circle at 60% 65%, #1e4631 0%, #0b2216 65%, #040f09 100%);
  box-shadow: inset 0 2.5px 4px rgba(0, 0, 0, 0.68), 0 1px 0 rgba(255, 255, 255, 0.88);
}

.pip.big {
  width: 18px;
  height: 18px;
}

/* 通用区块标题 */
.section-head {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--jade-400);
  text-transform: uppercase;
}

.section-title {
  font-family: "Songti SC", "STSong", "Kaiti SC", "PingFang SC", serif;
  font-size: clamp(30px, 3.8vw, 40px);
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
}

.section-lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 700px;
}

/* 卡片网格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-jade);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: transform 0.32s ease, border-color 0.32s ease, background 0.32s ease, box-shadow 0.32s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--jade-400), transparent);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--jade-300);
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

.card p {
  font-size: 15px;
  color: var(--text-muted);
}

/* 小牌九互动试玩区 */
.simulator-box {
  margin-top: 30px;
  background: linear-gradient(145deg, rgba(9, 48, 32, 0.9), rgba(4, 27, 18, 0.92));
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.sim-controls h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--gold-300);
}

.sim-controls p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.sim-result {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(4, 27, 18, 0.78);
  border: 1px solid var(--border-jade);
  margin-bottom: 18px;
}

.sim-result-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.sim-result-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--jade-300);
}

.sim-table {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  min-height: 220px;
  perspective: 1000px;
}

.flip-card {
  width: 90px;
  height: 204px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card.flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 15px;
}

.flip-back {
  background: linear-gradient(145deg, #064e3b, #022c22);
  border: 2px solid rgba(52, 211, 153, 0.45);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.flip-back::after {
  content: "牌九";
  writing-mode: vertical-rl;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 6px;
  color: rgba(253, 224, 71, 0.75);
  border: 1px solid rgba(253, 224, 71, 0.35);
  padding: 18px 10px;
  border-radius: 8px;
}

.flip-front {
  transform: rotateY(180deg);
}

/* 牌型等级条 */
.rank-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.rank-item {
  background: rgba(6, 36, 24, 0.75);
  border: 1px solid var(--border-jade);
  border-radius: 12px;
  padding: 14px 16px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: var(--gold-400);
}

.rank-item strong {
  display: block;
  color: var(--gold-300);
  font-size: 15px;
  margin-bottom: 4px;
}

.rank-item span {
  font-size: 13px;
  color: var(--text-muted);
}

/* 单机与联网特色面板 */
.mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  margin-top: 26px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: var(--gold-300);
  font-size: 13px;
  font-weight: 700;
}

.online-ping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--jade-300);
  font-size: 14px;
  font-weight: 600;
}

.ping-bar {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.ping-bar i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--jade-400);
  animation: signalWave 1.4s ease-in-out infinite;
}

.ping-bar i:nth-child(1) { height: 6px; animation-delay: 0s; }
.ping-bar i:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.ping-bar i:nth-child(3) { height: 14px; animation-delay: 0.4s; }

@keyframes signalWave {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 提示吐司（右上角） */
.toast {
  position: fixed;
  top: 108px;
  right: 28px;
  z-index: 200;
  padding: 14px 22px;
  border-radius: 12px;
  background: rgba(6, 78, 59, 0.96);
  border: 1px solid var(--jade-400);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-24px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-jade);
  background: rgba(3, 18, 12, 0.85);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

@media (max-width: 960px) {
  #home {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 130px;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2,
  .simulator-box {
    grid-template-columns: 1fr;
  }
  .rank-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }
  nav ul {
    position: absolute;
    top: 86px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    background: rgba(4, 27, 18, 0.96);
    border: 1px solid var(--border-jade);
    border-radius: 16px;
    padding: 12px;
    display: none;
  }
  nav ul.open {
    display: flex;
  }
  nav li + li::before {
    display: none;
  }
  nav a {
    width: 100%;
    justify-content: center;
  }
  .rank-list {
    grid-template-columns: 1fr;
  }
}
