/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */
html,
body {
  scroll-behavior: smooth;
}

@font-face {
  font-family: Fusion-Pixel-12-proportional-zh_cn;
  src: url("/fonts/fusion-pixel-12px-monospaced-zh_hans.woff2");
  font-display: swap;
}

@font-face {
  font-family: AlibabaPuHuiTi-3-55-Regular;
  src: url("/fonts/AlibabaPuHuiTi-3-55-Regular.woff2");
  font-display: swap;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Fusion-Pixel-12-proportional-zh_cn, sans-serif;
}

.markdown {
  font-family: AlibabaPuHuiTi-3-55-Regular, sans-serif;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  font-family: AlibabaPuHuiTi-3-55-Regular, sans-serif;
}

body {
  --header-height: 4rem;
  font-family: Fusion-Pixel-12-proportional-zh_cn, sans-serif;
}

/* You can override the default Infima variables here. */
:root {
  --border: hsl(214.3 31.8% 91.4%);
  --background: 0 0% 100%;
  --muted: hsl(210 40% 96.1%);
  --ifm-color-primary: hsl(221.2 83.2% 53.3%);
  --ifm-color-primary-dark: hsl(221.2 83.2% 43.3%);
  --ifm-color-primary-darker: hsl(221.2 83.2% 33.3%);
  --ifm-color-primary-darkest: hsl(221.2 83.2% 23.3%);
  --ifm-color-primary-light: hsl(221.2 83.2% 63.3%);
  --ifm-color-primary-lighter: hsl(221.2 83.2% 73.3%);
  --ifm-color-primary-lightest: hsl(221.2 83.2% 83.3%);
  --ifm-code-font-size: 95%;
  --ifm-font-size-base: 95%;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);

  /* 滚动条变量 */
  --scrollbar-width: 6px;
  --scrollbar-track-bg: transparent;
  --scrollbar-thumb-bg: rgba(0, 0, 0, 0.1);
  --scrollbar-thumb-hover-bg: rgba(0, 0, 0, 0.2);
  --scrollbar-thumb-active-bg: rgba(0, 0, 0, 0.3);
  --scrollbar-border-radius: 3px;

  /* 表格样式变量 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --border-color: var(--border);
  --border-color-light: hsl(240deg 2.5% 90%);
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --table-header-bg: var(--muted);
  --table-stripe-bg: hsl(240deg 2.5% 97%);
  --table-hover-bg: hsl(240deg 2.5% 94%);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
  --border: hsl(240deg 2.5% 20%);
  /* 修复：仅存储 HSL 数值，供 hsl(var(--background) / X) 使用 */
  --background: 240deg 2.5% 15.69%;
  --muted: hsl(240deg 2.5% 18%);
  --ifm-color-primary: hsl(217.2 91.2% 59.8%);
  --ifm-color-primary-dark: hsl(217.2 91.2% 49.8%);
  --ifm-color-primary-darker: hsl(217.2 91.2% 39.8%);
  --ifm-color-primary-darkest: hsl(217.2 91.2% 29.8%);
  --ifm-color-primary-light: hsl(217.2 91.2% 69.8%);
  --ifm-color-primary-lighter: hsl(217.2 91.2% 79.8%);
  --ifm-color-primary-lightest: hsl(217.2 91.2% 89.8%);
  --ifm-code-font-size: 95%;
  --ifm-font-size-base: 95%;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);

  /* 暗色模式滚动条变量 */
  --scrollbar-track-bg: transparent;
  --scrollbar-thumb-bg: rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover-bg: rgba(255, 255, 255, 0.22);
  --scrollbar-thumb-active-bg: rgba(255, 255, 255, 0.32);

  /* 暗色模式表格变量 */
  --border-color-light: hsl(240deg 2.5% 22%);
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.4);
  --table-header-bg: hsl(240deg 2.5% 18%);
  --table-stripe-bg: hsl(240deg 2.5% 13%);
  --table-hover-bg: hsl(240deg 2.5% 20%);
}

/* 全局滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-track-bg);
}

/* 哼哼啊啊啊啊啊啊啊啊啊啊 */
[class*="logo_"] {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background-color: var(--ifm-color-primary) !important;
  color: white !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transform: none !important;
  transition: box-shadow 0.2s ease-in-out !important;
}

[class*="logo_"]:hover {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}

/* Chrome/Edge/Safari 滚动条样式 */
*::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

*::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track-bg);
  border-radius: var(--scrollbar-border-radius);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-bg);
  border-radius: var(--scrollbar-border-radius);
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: all 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-bg);
}

*::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-active-bg);
}

/* 去掉上下箭头按钮 */
*::-webkit-scrollbar-button {
  display: none;
}

/* 去掉角落和边框 */
*::-webkit-scrollbar-corner {
  background-color: transparent;
}

/* 针对Kether Explorer组件的滚动条优化 */
.ketherContainer *::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.ketherContainer *::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 2px;
}

.ketherContainer *::-webkit-scrollbar-thumb {
  background-color: var(--kether-border);
  border-radius: 2px;
  border: none;
  transition: all 0.2s ease;
}

.ketherContainer *::-webkit-scrollbar-thumb:hover {
  background-color: var(--kether-primary);
}

/* 同样去掉Kether组件的上下箭头 */
.ketherContainer *::-webkit-scrollbar-button {
  display: none;
}

.theme-doc-sidebar-menu {
  padding: 12px;
}

.navbar-sidebar,
.navbar-sidebar__backdrop {
  height: 100vh;
}

.navbar {
  border-color: var(--border);
  border-bottom-width: 1px;
  background-color: hsl(var(--background) / 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

nav {
  padding: 0 !important;
}

.navbar__inner {
  display: flex;
  justify-content: space-between;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  height: 4rem;
  max-width: 80rem;
  gap: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.navbar .links {
  display: none;
  justify-content: center;
  align-items: center;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
}

.navbar li button {
  border: none;
  cursor: pointer;
  background-color: transparent;
  background-image: none;
  text-transform: none;
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

.navbar button:disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

.navbar .links li a {
  color: inherit;
  text-decoration: none;
}

.navbar .links li {
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

.navbar .links li:hover {
  color: var(--ifm-color-primary);
}

@media (min-width: 640px) {
  .navbar:first-child {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.navbar__items {
  height: 100%;
}

.breadcrumbs__link {
  border-radius: 8px;
}

@media (min-width: 1024px) {
  .navbar__items--right {
    flex: 1 1 0;
  }

  .navbar__brand__wrapper {
    flex: 1 1 0;
  }

  .navbar .links {
    display: flex;
  }

  .navbar {
    border-width: 0;
    margin-bottom: 0;
  }

  .navbar:first-child {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.hero__title {
  font-size: 5rem;
  color: white;
}

.hero__subtitle {
  color: white;
}

.sidebar_re4s {
  padding-left: 1rem;
}

.sidebarItemTitle_pO2u {
  color: var(--ifm-color-primary);
}

.font-light {
  color: var(--ifm-color-primary-lightest);
}

.font-dark {
  color: var(--ifm-color-primary-dark);
}

.navbar__title {
  color: var(--ifm-color-primary);
  padding-left: 1rem;
}

.navbar__brand__wrapper {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar__brand {
  display: flex;
  border-radius: calc(0.5rem - 2px);
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: var(--ifm-color-primary);
  cursor: pointer;
}

.navbar__brand:hover {
  background-color: var(--muted);
}

.navbar__brand .light {
  font-weight: 600;
  opacity: 0.8;
}

.flex {
  display: flex;
}

.navbar__action__item {
  height: 2rem;
  width: 2rem;
  border-radius: 0.5rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.navbar__action__item svg {
  height: 1.2rem;
  width: 1.2rem;
}

.navbar__action__item:hover {
  background-color: var(--muted);
  color: inherit;
  border-color: var(--border);
}

.navbar__search-input {
  border-radius: 8px;
}

.navbar__items--right {
  gap: 0.25rem;
}

.navbar__items--right .actions {
  display: flex;
  gap: 0.25rem;
}

/* 桌面端右侧区域间距调整在下方媒体查询中定义 */

li[aria-current="page"] {
  color: var(--ifm-color-primary);
}

.navbar__item {
  padding-right: 1rem;
}

h1 {
  padding-top: 0.5rem;
}

.container {
  padding-left: 2rem;
  padding-right: 2rem;
}

#game_img {
  box-shadow: black 1px 1px 5px;
  border-radius: 8px;
  margin-bottom: 1rem
}

/* 删除侧边栏菜单箭头按钮的背景颜色 */
.clean-btn.menu__caret {
  background-color: transparent !important;
  background: none !important;
}

/* ===== 导航栏样式优化（增强悬停/激活态、可读性与可点击区域）===== */
/* .navbar 基础样式已在上方定义 */

/* 导航链接基础样式 */
.navbar .links .navbar__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  line-height: 1.2;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  color: inherit;
  text-decoration: none;
}

/* 悬停效果 */
.navbar .links .navbar__link:hover {
  background-color: var(--muted);
  color: var(--ifm-color-primary);
}

/* 激活态样式 */
.navbar .links .navbar__link--active,
.navbar .links .navbar__link[aria-current="page"] {
  color: var(--ifm-color-primary);
  background-color: var(--muted);
  font-weight: 600;
}

/* 激活态底部指示条 */
.navbar .links .navbar__link--active::after,
.navbar .links .navbar__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--ifm-color-primary);
  transform: translateX(-50%);
}

/* 焦点可见性 */
.navbar .links .navbar__link:focus-visible {
  outline: 2px solid var(--ifm-color-primary);
  outline-offset: 2px;
}

/* 右侧区域间距 */
@media (min-width: 1024px) {
  .navbar__items--right {
    gap: 0.5rem; /* 桌面端使用更大的间距 */
  }
}

/* 移动端侧边栏优化 */
.navbar-sidebar__brand {
  border-bottom: 1px solid var(--border);
}

.navbar-sidebar .menu__link {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar-sidebar .menu__link--active {
  background-color: var(--muted);
  color: var(--ifm-color-primary);
}

/* 暗色模式优化 */
[data-theme="dark"] .navbar {
  background-color: hsl(240deg 2.5% 15.69%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.3);
}

[data-theme="dark"] .navbar .links .navbar__link:hover {
  background-color: hsl(var(--background) / 0.6);
  color: var(--ifm-color-primary-light);
}

[data-theme="dark"] .navbar .links .navbar__link--active,
[data-theme="dark"] .navbar .links .navbar__link[aria-current="page"] {
  background-color: hsl(var(--background) / 0.8);
  color: var(--ifm-color-primary-light);
}

[data-theme="dark"] .navbar__action__item:hover {
  background-color: hsl(var(--background) / 0.6);
  border-color: hsl(var(--border) / 0.5);
}

/* 搜索框暗色模式 */
[data-theme="dark"] .navbar__search-input {
  background-color: hsl(240deg 3.63% 24.46%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 1rem 1rem;
  border-color: hsl(var(--border) / 0.3);
  color: var(--ifm-font-color-base);
}

[data-theme="dark"] .navbar__search-input:focus {
  border-color: var(--ifm-color-primary);
  box-shadow: 0 0 0 2px hsl(var(--ifm-color-primary) / 0.2);
}

/* ========================================
   表格样式系统
   ======================================== */

/* 基础表格样式 */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
  font-size: 0.875rem;
  background-color: transparent;
  box-shadow: none;
  table-layout: fixed;
  display: table;
}

/* Markdown 表格样式 */
.markdown table {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}

/* 为没有容器的表格添加容器样式 */
.markdown > table:not([class*="table"]) {
  margin: var(--space-xl) 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background-color: var(--ifm-background-color);
  overflow: hidden;
}

/* 表头样式 */
th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 600;
  background-color: var(--table-header-bg);
  color: var(--ifm-heading-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  border-left: none;
  border-right: none;
  border-top: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* 第一列和最后一列的特殊间距 */
th:first-child,
td:first-child {
  padding-left: var(--space-lg);
}

th:last-child,
td:last-child {
  padding-right: var(--space-lg);
}

/* 表格单元格样式 */
td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color-light);
  vertical-align: top;
  color: var(--ifm-font-color-base);
  border-left: none;
  border-right: none;
  border-top: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* 表格行样式 */
tr:last-child td {
  border-bottom: none;
}

/* 斑马纹效果 */
tr:nth-child(even) {
  background-color: var(--table-stripe-bg);
}

/* 悬停效果 */
tr:hover {
  background-color: var(--table-hover-bg);
}

/* ========================================
   响应式设计 - 平板设备
   ======================================== */
@media (max-width: 768px) {
  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: var(--space-sm);
  }
}

/* ========================================
   响应式设计 - 移动设备
   ======================================== */
@media (max-width: 576px) {
  /* 表格容器在小屏幕上的处理 */
  .table-wrapper,
  div[class*="table"],
  .markdown > table:not([class*="table"]) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    table-layout: fixed;
    width: 100%;
  }

  th,
  td {
    padding: var(--space-xs) var(--space-sm);
    word-break: break-word;
    hyphens: auto;
  }

  /* 移动端第一列和最后一列贴边 */
  th:first-child,
  td:first-child {
    padding-left: var(--space-sm);
  }

  th:last-child,
  td:last-child {
    padding-right: var(--space-sm);
  }
}