/* ==========================================================================
   page.css — 五子棋本地版的「页面级」样式
   内容全部来自原 index.html 中的内联 <style>，已剔除旧站的栏目样式、
   广告条、其他游戏（数独/俄罗斯方块/拼图/象棋…）的遗留规则。
   顺序：字体 → 站点外壳（导航 / 页脚）→ 棋盘状态 → 游戏内控件 → 屏蔽清单
   ========================================================================== */

/* ---------- 字体：仅站点导航使用 ---------- */
@font-face {
  font-family: "museo sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/style/fonts/museo-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "museo sans";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/style/fonts/museo-sans-700.woff2") format("woff2");
}

@font-face {
  font-family: "syne";
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
  src: url("/style/fonts/syne-var.woff2") format("woff2");
}

@font-face {
  font-family: "space grotesk";
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  src: url("/style/fonts/space-grotesk-var.woff2") format("woff2");
}

/* ---------- 站点顶部导航 ---------- */
.site-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  height: 58px;
  padding: 0 clamp(16px, 3vw, 36px);
  overflow: hidden;
  background-color: #7eb;
  background-image: linear-gradient(to right, #9cf 0%, #f9c 25%, #ec8 50%, #7eb 75%, #9cf 100%);
  background-size: 400% 100%;
  animation: site-nav-slide 30s linear infinite;
}

@keyframes site-nav-slide {
  to {
    background-position: 400% 0;
  }
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

/* 全局有 a:hover{text-decoration:underline}，这里连同悬停态一起屏蔽 */
.site-nav__brand:hover,
.site-nav__brand:focus-visible,
.site-nav__links a:hover,
.site-nav__links a:focus-visible {
  text-decoration: none;
}

.site-nav__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 2.5px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, .3), inset 0 0 10px rgba(255, 255, 255, .26);
  transition: transform .3s cubic-bezier(.2, 1.3, .4, 1), box-shadow .3s ease,
    background-color .3s ease;
}

.site-nav__mark svg {
  display: block;
  width: 62%;
  height: 62%;
  transition: transform .35s cubic-bezier(.2, 1.3, .4, 1);
}

/* 悬停：徽标放大并轻轻转一下，光晕变亮，7 字微微前倾 */
.site-nav__brand:hover .site-nav__mark,
.site-nav__brand:focus-visible .site-nav__mark {
  transform: scale(1.08) rotate(-8deg);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 0 22px rgba(255, 255, 255, .55), inset 0 0 12px rgba(255, 255, 255, .42);
}

.site-nav__brand:hover .site-nav__mark svg,
.site-nav__brand:focus-visible .site-nav__mark svg {
  transform: scale(1.06);
}

.site-nav__name {
  display: inline-block;
  font-family: "syne", "space grotesk", "museo sans", sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(80, 70, 60, .2), 0 0 14px rgba(255, 255, 255, .5);
  transition: transform .25s ease, text-shadow .25s ease;
}

.site-nav__name span {
  font-family: "space grotesk", "museo sans", sans-serif;
  font-weight: 500;
  font-size: .55em;
  letter-spacing: .06em;
  opacity: .92;
}

.site-nav__brand:hover .site-nav__name,
.site-nav__brand:focus-visible .site-nav__name {
  transform: translateY(-1px);
  text-shadow: 0 1px 2px rgba(80, 70, 60, .18), 0 0 18px rgba(255, 255, 255, .85);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 8px);
  margin-right: -8px;
}

.site-nav__links a {
  position: relative;
  z-index: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: "museo sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  opacity: .95;
  text-shadow: 0 1px 3px rgba(70, 60, 50, .25);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .18s ease, transform .22s ease, text-shadow .22s ease;
}

/* 悬停时从中心弹出一枚柔光胶囊，代替下划线 */
.site-nav__links a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, .26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42);
  opacity: 0;
  transform: scale(.72);
  transition: opacity .2s ease, transform .3s cubic-bezier(.2, 1.35, .4, 1);
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  text-shadow: 0 1px 3px rgba(70, 60, 50, .18), 0 0 12px rgba(255, 255, 255, .65);
}

.site-nav__links a:hover::before,
.site-nav__links a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.site-nav__links a:active {
  transform: translateY(0) scale(.97);
}

.site-nav__brand:focus-visible,
.site-nav__links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .95);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .site-nav__name {
    display: none;
  }

  .site-nav__links a {
    padding: 6px 9px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav__mark,
  .site-nav__mark svg,
  .site-nav__name,
  .site-nav__links a,
  .site-nav__links a::before {
    transition: none;
  }

  .site-nav__brand:hover .site-nav__mark,
  .site-nav__brand:hover .site-nav__mark svg,
  .site-nav__brand:hover .site-nav__name,
  .site-nav__links a:hover {
    transform: none;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #333;
  color: #ccc;
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    background: #1e1e1e;
    color: #bbb;
  }
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 24px;
  font-family: "museo sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.site-footer__inner p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: inherit;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
  display: inline-block;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.site-footer__links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .8);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__links a {
    transition: none;
  }

  .site-footer__links a:hover {
    transform: none;
  }
}

/* ---------- 页面标题 ----------
   右上角「皮肤 / 全屏 / 音效 / 震动」是一个白色托盘：1px 浅描边、12px 顶圆角、
   底边与棋盘卡片同色并压住它 1px，看上去和下面的卡片是一整块。
   左侧标题照同样的做法，做成同一块白色的“标签”，两边与下方卡片连成一体。 */
.game-head .game-title {
  display: flex;
  align-self: flex-end;
  z-index: 1;                /* 与右侧 .stage-tools 同层：让白色底边盖住卡片顶边 */
  position: relative;
  min-width: 0;
  margin: 0 0 -1px 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-bottom-color: var(--bg-card);
  border-radius: 12px 12px 0 0;
  background: var(--bg-card);
}

.game-head h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 37px;              /* 37 + 上下 1px 描边 = 39，与右侧托盘等高 */
  margin: 0;
  padding: 0 17px 0 14px;
  color: #2b2118;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  text-indent: .08em;        /* 抵消末字后多出的字距，让左右留白相等 */
  white-space: nowrap;
}

/* 标题左侧的黑白两子 */
.t-stones {
  position: relative;
  flex: none;
  width: 21px;
  height: 17px;
}

.t-stones::before,
.t-stones::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.t-stones::before {
  top: 0;
  left: 0;
  background: radial-gradient(circle at 34% 28%, #6f6053 0, #2b2118 62%);
}

.t-stones::after {
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 34% 28%, #fff 0, #f3ecdd 74%);
  box-shadow: 0 0 0 1.4px #2b2118;
}

@media (max-width: 620px) {
  .game-head h1 {
    height: 37px;
    padding: 0 14px 0 11px;
    font-size: 15px;
    gap: 7px;
  }

  .t-stones {
    width: 18px;
    height: 15px;
  }

  .t-stones::before,
  .t-stones::after {
    width: 10px;
    height: 10px;
  }
}

/* ---------- 棋盘状态行 ---------- */
.ggomoku .g-status,
.ggomoku .g-record {
  text-align: left;
  text-wrap: wrap;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.game-stage.is-fs .ggomoku .g-cloud {
  display: none;
}

.game-stage.is-fs .ggomoku .g-status {
  margin-top: 4px;
  margin-bottom: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 96%;
  overflow: hidden;
}

.g-side > .g-status {
  text-align: left;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.g-play.is-side .g-side > .g-stat {
  min-width: 64px;
}

/* ---------- 菜单里的「音效 / 语音」开关 ---------- */
.g-menu > .g-voice-opt {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.g-voice-opt input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.g-ui .g-menu .g-voice-opt {
  border: 2px solid var(--gui-ink);
  border-radius: 10px;
  background: #fff;
  color: var(--gui-ink);
  font-weight: 800;
  box-shadow: 0 2px 0 var(--gui-ink);
}

.g-ui .g-menu .g-voice-opt:has(input:checked) {
  border-color: var(--gui-ink);
  background: var(--gui-soft);
  color: var(--gui-ink);
}

.g-ui .g-menu .g-voice-opt input {
  accent-color: var(--gui-ink);
}

/* ---------- 屏蔽清单 ----------
   原站运行时还会创建这几种「有后端才可用」的元素：邀请好友弹窗、结果页里的
   邀请条、注册/付费闸门、外链推广。本地静态版没有对应接口，一律隐藏。
   其中 option[value="net"] 是模式下拉里的「双人联机」（需要 WebSocket 服务端）。
   如需恢复某个组件，删掉对应的一条选择器即可。 */
.invite-top,
.g-pop-inv,
.g-rb-inv,
a[href*="doubao"],
a[href*="/go/"],
option[value="net"],
dialog.pt-gate:not(.skin-dlg) {
  display: none !important;
}
