/* ============================================================
   萧门OL 全站公共样式
   ============================================================ */

/* ===== 字体 ===== */
@font-face {
  font-family: 'Unifont';
  src: url('../fonts/Unifont.woff') format('woff'),
       url('../fonts/Unifont.ttf') format('truetype'),
       url('../fonts/Unifont.otf') format('opentype');
  font-display: swap;
}

/* ===== 全局重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar { display: none; }

html, body {
  font-family: 'Unifont', 'Microsoft YaHei', sans-serif;
  color: #fff;
  -webkit-text-size-adjust: 100%;
}

body.no-scroll { overflow: hidden; }

/* ===== 背景与遮罩 ===== */
.bg {
  position: fixed;
  inset: 0;
  background: center/cover no-repeat;
  z-index: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* ===== 文字描边工具类 ===== */
.text-outline {
  text-shadow:
    -2px -2px 0 #000, 2px -2px 0 #000,
    -2px  2px 0 #000, 2px  2px 0 #000,
    -2px  0   0 #000, 2px  0   0 #000,
     0   -2px 0 #000, 0   2px 0 #000;
}

/* ============================================================
   侧边栏（所有页面共用）
   ============================================================ */

/* 顶部菜单按钮 */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  z-index: 100;
}

.menu-btn {
  width: 44px; height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-btn:hover { background: rgba(0, 0, 0, 0.5); }

.menu-btn span {
  display: block;
  width: 24px; height: 3px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 侧边栏主体 */
.sidebar {
  position: fixed;
  top: 0; right: -320px; bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: rgba(20, 20, 30, 0.92);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 99;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 80px 24px 40px;
  overflow-y: auto;
}

.sidebar.open { right: 0; }

.sidebar-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.sidebar h3 {
  color: #FFD700;
  font-size: 18px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.sidebar-section { margin-bottom: 32px; }

.sidebar ul { list-style: none; }

.sidebar li { margin-bottom: 10px; }

.sidebar a {
  color: #ccc;
  text-decoration: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.sidebar a:hover { color: #FFD700; }

.sidebar a .icon { font-size: 18px; }
.sidebar a .icon-image {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ============================================================
   子页面通用：顶部栏 + 内容区 + 卡片
   ============================================================ */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  z-index: 90;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar .back-btn {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.topbar .back-btn:hover { background: rgba(255, 255, 255, 0.2); }

.topbar .page-title {
  justify-self: center;
  font-size: 18px;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  white-space: nowrap;
}

/* 顶部栏右侧元素（菜单按钮 / 按钮组）靠右 */
.topbar .menu-btn,
.topbar > div:last-child {
  justify-self: end;
}

.topbar .spacer { width: 60px; }

/* topbar 内的菜单按钮 */
.topbar .menu-btn {
  width: 40px; height: 40px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.topbar .menu-btn:hover { background: rgba(255, 255, 255, 0.2); }
.topbar .menu-btn span {
  display: block; width: 22px; height: 3px;
  background: #fff; border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.topbar .menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.topbar .menu-btn.open span:nth-child(2) { opacity: 0; }
.topbar .menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.content {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 20px 100px;
}

.card {
  background: rgba(20, 20, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.card h2 {
  font-size: 22px;
  color: #FFD700;
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.card p {
  font-size: 15px;
  line-height: 1.8;
  color: #ddd;
  margin-bottom: 10px;
}

.card ul { list-style: none; }

.card li {
  font-size: 15px;
  line-height: 2;
  color: #ddd;
  padding-left: 20px;
  position: relative;
}

.card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #FFD700;
}

.highlight { color: #87CEEB; }

/* ============================================================
   响应式
   ============================================================ */

@media (min-width: 768px) {
  .card h2 { font-size: 24px; }
  .card p, .card li { font-size: 16px; }
}
