:root {
  --page-bg: #fff8f1;
  --ink: #202b43;
  --muted: #69728a;
  --blue: #2878ef;
  --orange: #ff9c0b;
  --pink: #fa3d72;
  --card-radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 11% 8%, rgba(255, 217, 151, 0.18), transparent 25rem),
    radial-gradient(circle at 92% 34%, rgba(89, 151, 255, 0.1), transparent 28rem),
    var(--page-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(229, 216, 204, 0.75);
  background: rgba(255, 250, 245, 0.86);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 1080px);
  height: 66px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  box-shadow: 0 7px 16px rgba(29, 102, 224, 0.22);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  color: #2172e9;
  font-size: 16px;
  line-height: 1.15;
}

.brand-copy small {
  color: #778196;
  font-size: 11px;
}

.official-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 178, 39, 0.25);
  border-radius: 999px;
  color: #a8670f;
  background: #fff2d1;
  font-size: 12px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.official-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(216, 154, 35, 0.17);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f8a900;
  box-shadow: 0 0 0 4px rgba(248, 169, 0, 0.12);
}

.main-content {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 36px 0 26px;
}

h2,
h3,
p {
  margin: 0;
}

/* ---------- 顶部海报横幅 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 60, 0.28);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(226, 150, 54, 0.11);
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- 图标精灵与通用图标 ---------- */

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

/* ---------- 难度筛选项 ---------- */

.tier-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 26px;
  scroll-margin-top: 92px;
}

.tier-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 520px);
  padding: 7px;
  border: 1px solid rgba(230, 217, 204, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 248, 0.8));
  box-shadow:
    0 14px 30px rgba(75, 50, 31, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.tier-tab {
  --tab-a: #4a90ff;
  --tab-b: #1f6ae0;
  --tab-glow: rgba(40, 116, 233, 0.3);
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #6f7a90;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

/* 每档一套配色，按钮与对应板块标签保持一致 */
.tier-tab[data-target="beginner"] {
  --tab-a: #45c78c;
  --tab-b: #199e60;
  --tab-glow: rgba(28, 163, 101, 0.3);
}

.tier-tab[data-target="newbie"] {
  --tab-a: #ffb233;
  --tab-b: #ee830f;
  --tab-glow: rgba(238, 131, 15, 0.3);
}

.tier-tab[data-target="advanced"] {
  --tab-a: #8d7dfc;
  --tab-b: #5b46e6;
  --tab-glow: rgba(91, 70, 230, 0.3);
}

.tier-tab .tab-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.42;
  transition: opacity 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.tier-tab:hover {
  color: var(--tab-b);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 16px -6px var(--tab-glow);
  transform: translateY(-1px);
}

.tier-tab:hover .tab-dot {
  opacity: 0.85;
}

.tier-tab.is-active {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: linear-gradient(158deg, var(--tab-a), var(--tab-b));
  box-shadow:
    0 12px 22px -8px var(--tab-glow),
    0 2px 4px rgba(23, 40, 80, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* 顶部高光，让选中态更有质感 */
.tier-tab.is-active::after {
  position: absolute;
  top: 2px;
  right: 3px;
  left: 3px;
  height: 45%;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

.tier-tab.is-active .tab-dot {
  background: #fff;
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.24);
}

.tier-tab:focus-visible {
  outline: 2px solid #2f6fe0;
  outline-offset: 2px;
}

.results-note {
  flex: 0 0 auto;
  color: #8b91a0;
  font-size: 12px;
  white-space: nowrap;
}

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

/* 板块内卡片为奇数时，最后一张铺满整行 */
.play-card--wide {
  grid-column: 1 / -1;
}

.play-card--wide .card-copy h3,
.play-card--wide .card-copy p {
  max-width: 620px;
}

.play-card {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 158px;
  grid-template-rows: 1fr auto;
  min-height: 252px;
  align-items: center;
  gap: 0 18px;
  padding: 23px 25px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--card-radius);
  box-shadow: 0 14px 30px rgba(75, 61, 53, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hot-section {
  margin: 0 0 28px;
  padding: 22px 22px 24px;
  border: 1px solid #f2c4a1;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8ef 0%, #fffdf9 100%);
}

.hot-section .tier-tag,
.hot-badge {
  color: #a33d13;
  background: #ffd9b8;
}

.hot-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.play-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 19px 34px rgba(75, 61, 53, 0.13);
}

/* 每张卡片一套主色，用于次级按钮的悬浮着色 */
.card-blue {
  --accent: #2f6fd6;
  --accent-soft: rgba(47, 111, 214, 0.42);
  background: #e8f4ff;
}

.card-green {
  --accent: #1f9a63;
  --accent-soft: rgba(31, 154, 99, 0.42);
  background: #eaf8ee;
}

.card-orange {
  --accent: #d9760f;
  --accent-soft: rgba(217, 118, 15, 0.42);
  background: #fff0df;
}

.card-yellow {
  --accent: #b38600;
  --accent-soft: rgba(179, 134, 0, 0.42);
  background: #fff5d9;
}

.card-pink {
  --accent: #d9326a;
  --accent-soft: rgba(217, 50, 106, 0.42);
  background: #ffedf4;
}

.card-lilac {
  --accent: #5b46e6;
  --accent-soft: rgba(91, 70, 230, 0.42);
  background: #f0efff;
}

.card-aside {
  display: grid;
  width: 72px;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  justify-items: center;
  gap: 17px;
}

.card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 15px rgba(65, 77, 108, 0.08);
}

.card-icon img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.card-index {
  color: rgba(57, 83, 126, 0.44);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 0;
}

.card-copy h2,
.card-copy h3 {
  max-width: 430px;
  color: #273146;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.3;
}

.card-copy p {
  max-width: 430px;
  margin-top: 13px;
  color: #68738b;
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- 卡片操作区：两个次级入口在上，主 CTA 最大 ---------- */

.card-actions {
  display: grid;
  width: 158px;
  grid-column: 3;
  grid-row: 1 / 3;
  gap: 8px;
}

.card-sub {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 13px;
  color: #59637a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 12px -9px rgba(48, 62, 96, 0.62);
  font-size: 12.5px;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.card-sub .ico {
  width: 14px;
  height: 14px;
  opacity: 0.82;
}

.card-sub:hover {
  color: var(--accent, #3568b8);
  background: #fff;
  box-shadow: 0 10px 18px -10px var(--accent-soft, rgba(53, 104, 184, 0.5));
  transform: translateY(-1px);
}

.card-sub:hover .ico {
  opacity: 1;
}

.card-action {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #ff9800, #ff3e74);
  box-shadow:
    0 12px 20px -8px rgba(247, 91, 54, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 15.5px;
  font-weight: 800;
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.card-action .ico {
  width: 15px;
  height: 15px;
  opacity: 0.95;
}

.card-action:hover {
  filter: saturate(1.12) brightness(1.04);
  box-shadow:
    0 16px 24px -8px rgba(247, 91, 54, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.card-sub:focus-visible,
.card-action:focus-visible {
  outline: 2px solid var(--accent, #2f6fe0);
  outline-offset: 2px;
}

.card-footer {
  display: flex;
  grid-column: 2;
  grid-row: 2;
  gap: 6px;
  width: auto;
  justify-content: flex-start;
  margin-top: 0;
  color: #8690a2;
  font-size: 11px;
  line-height: 1.25;
}

.card-footer span+span::before {
  margin-right: 8px;
  content: "·";
  color: #b7bdc9;
}

/* ---------- 玩法板块 ---------- */

.tier-list {
  display: grid;
  gap: 30px;
}

.tier-section {
  scroll-margin-top: 92px;
}

.tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(230, 217, 204, 0.8);
}

.tier-head-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.tier-tag {
  --tag-a: #4a90ff;
  --tag-b: #1f6ae0;
  --tag-glow: rgba(40, 116, 233, 0.32);
  display: inline-flex;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(158deg, var(--tag-a), var(--tag-b));
  box-shadow:
    0 9px 16px -7px var(--tag-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.tier-section[data-tier="beginner"] .tier-tag {
  --tag-a: #45c78c;
  --tag-b: #199e60;
  --tag-glow: rgba(28, 163, 101, 0.32);
}

.tier-section[data-tier="newbie"] .tier-tag {
  --tag-a: #ffb233;
  --tag-b: #ee830f;
  --tag-glow: rgba(238, 131, 15, 0.32);
}

.tier-section[data-tier="advanced"] .tier-tag {
  --tag-a: #8d7dfc;
  --tag-b: #5b46e6;
  --tag-glow: rgba(91, 70, 230, 0.32);
}

.tier-head h2 {
  overflow: hidden;
  color: #59647a;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tier-count {
  flex: 0 0 auto;
  color: #99a1b0;
  font-size: 12px;
  white-space: nowrap;
}

/* 跳转命中时的脉冲提示 */
@keyframes tier-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 116, 233, 0);
  }

  22% {
    box-shadow: 0 0 0 5px rgba(40, 116, 233, 0.15);
  }

  100% {
    box-shadow: 0 0 0 14px rgba(40, 116, 233, 0);
  }
}

.tier-section.is-flash {
  border-radius: 24px;
  animation: tier-flash 900ms ease-out;
}

.footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 20px 43px;
  color: #9da0aa;
  text-align: center;
  font-size: 11px;
}

.footer img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  opacity: 0.92;
}

.footer p {
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

/* ---------- 教程视频弹窗 ---------- */
.video-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 39, 0.72);
  backdrop-filter: blur(5px);
}

.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.video-modal-player {
  display: block;
  width: 100%;
  max-height: min(78vh, 680px);
  background: #000;
}

.video-modal-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.tutorial-notice {
  position: fixed;
  z-index: 40;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(32, 43, 67, 0.92);
  box-shadow: 0 12px 28px rgba(31, 40, 62, 0.24);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tutorial-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .video-modal {
    padding: 14px;
  }

  .video-modal-dialog {
    border-radius: 14px;
  }

  .video-modal-player {
    max-height: 72vh;
  }

  .tutorial-notice {
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 12px;
  }
}

@media (max-width: 720px) {

  .topbar-inner,
  .main-content {
    width: min(100% - 24px, 560px);
  }

  .topbar-inner {
    height: 58px;
    padding-top: env(safe-area-inset-top);
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .official-link {
    max-width: 42vw;
    overflow: hidden;
    padding: 7px 9px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-content {
    padding-top: 20px;
  }

  .hero {
    border-radius: 20px;
  }

  /* ---------- 难度跳转按钮 ---------- */
  .tier-nav {
    display: grid;
    gap: 10px;
    margin: 16px 0 22px;
    scroll-margin-top: 74px;
  }

  .tier-tabs {
    /* 移动端让四个筛选按钮获得更充足的横向点击区域 */
    width: calc(100% + 80px);
    margin-inline: -4px;
    gap: 5px;
    padding: 6px;
    border-radius: 18px;
  }

  .tier-tab {
    min-width: 0;
    min-height: 44px;
    gap: 6px;
    padding: 0 6px;
    border-radius: 13px;
    font-size: 13px;
  }

  .tier-tab.is-active::after {
    border-radius: 11px;
  }

  .results-note {
    padding-left: 4px;
  }

  /* ---------- 玩法板块 ---------- */
  .tier-list {
    gap: 24px;
  }

  .tier-section {
    scroll-margin-top: 74px;
  }

  .tier-head {
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .tier-head-main {
    gap: 9px;
  }

  .tier-tag {
    height: 26px;
    padding: 0 11px;
    font-size: 12px;
  }

  .tier-head h2 {
    font-size: 13.5px;
  }

  .tier-count {
    font-size: 11px;
  }

  /* ---------- 手机：卡片网格改为单列 ---------- */
  .play-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .play-card {
    padding: 18px;
    border-radius: 18px;
  }
}

/* ---------- 中窄屏（平板/小窗）：卡片内部改为纵向堆叠，保持两列网格 ---------- */
@media (max-width: 1049px) {
  .play-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    min-height: 0;
    gap: 0;
    padding: 20px;
  }

  .card-aside {
    display: flex;
    width: 100%;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .card-icon img {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .card-index {
    font-size: 14px;
  }

  .card-copy {
    grid-column: 1;
    grid-row: 2;
    padding: 15px 0 0;
  }

  .card-copy h2,
  .card-copy h3,
  .card-copy p {
    max-width: 100%;
  }

  .card-copy h3 {
    font-size: 20px;
  }

  .card-copy p {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
  }

  .card-footer {
    flex-wrap: wrap;
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
    margin-top: 14px;
  }

  .card-actions {
    width: 100%;
    grid-column: 1;
    grid-row: 4;
    gap: 10px;
    margin-top: 16px;
  }

  .card-sub {
    min-height: 44px;
    font-size: 13px;
  }

  .card-sub .ico {
    width: 15px;
    height: 15px;
  }

  .card-action {
    min-height: 54px;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-copy small,
  .official-link {
    display: none;
  }

  .topbar-inner,
  .main-content {
    width: calc(100% - 20px);
  }

  .main-content {
    padding-top: 14px;
  }

  .hero {
    border-radius: 16px;
  }

  .tier-nav {
    margin-top: 12px;
  }

  .tier-tab {
    min-height: 42px;
    padding: 0 4px;
    font-size: 12.5px;
  }

  .tier-tab .tab-dot {
    display: none;
  }

  .tier-head h2 {
    display: none;
  }

  .play-card {
    padding: 16px;
  }

  .card-copy h3 {
    font-size: 18.5px;
  }

  .card-copy p {
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.65;
  }

  .card-footer {
    margin-top: 11px;
  }

  .card-actions {
    gap: 8px;
    margin-top: 13px;
  }

  .card-sub,
  .card-action {
    min-height: 46px;
  }

  .card-action {
    font-size: 14px;
  }
}

@media (max-width: 350px) {
  .tier-tab {
    font-size: 12px;
  }

  .tier-tabs {
    width: calc(100% + 6px);
    margin-inline: -3px;
    gap: 3px;
    padding: 5px;
  }

  .play-card {
    padding: 14px;
  }

  .card-copy h3 {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tier-section.is-flash {
    animation: none;
  }

  .play-card,
  .tier-tab,
  .official-link,
  .card-sub,
  .card-action {
    transition: none;
  }
}
