/* ==========================================================================
   168mjbot.com — 基础层
   只含：重置 / 变量 / 顶部导航 / 页脚 / 通用按钮
   6 个关键词内页各自拥有独立骨架 CSS，互不共用同一模板。
   ========================================================================== */

:root {
  --ink: #0c1020;
  --ink-2: #33405c;
  --muted: #6c7893;
  --line: rgba(12, 16, 32, .1);
  --paper: #ffffff;
  --mist: #f4f5fb;
  --night: #0a0e1c;
  --brand: #6d28d9;
  --brand-2: #4c1d95;
  --neon: #ff2d95;
  --cyan: #22d3ee;
  --lime: #a3e635;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-s: 0 2px 10px rgba(12, 16, 32, .06);
  --shadow-m: 0 18px 48px rgba(12, 16, 32, .13);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --container: 1180px;
  --header-h: 70px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--ink);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(12, 16, 32, .08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

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

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #8b5cf6, #6d28d9 55%, #4c1d95);
  color: #f5f3ff;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 6px 18px rgba(109, 40, 217, .3);
}

.brand-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
}

.brand-text em {
  font-style: normal;
  color: var(--brand);
  margin-left: 1px;
  font-size: 15px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.site-nav a {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.site-nav a:hover { color: var(--ink); background: rgba(109, 40, 217, .07); }

.site-nav a.is-active {
  color: var(--brand);
  background: rgba(109, 40, 217, .1);
  font-weight: 700;
}

.btn-login {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 9px;
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(109, 40, 217, .28);
  transition: transform .2s, box-shadow .2s;
}

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(109, 40, 217, .36); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 25px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9 60%, #4c1d95);
  color: #fff;
  box-shadow: 0 10px 26px rgba(109, 40, 217, .3);
}

.btn-primary:hover { box-shadow: 0 14px 32px rgba(109, 40, 217, .4); }

.btn-dark {
  background: linear-gradient(135deg, #1b2237, #0c1020);
  color: #e7e3ff;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(12, 16, 32, .22);
}

.btn-outline:hover { border-color: var(--ink); background: rgba(12, 16, 32, .04); }

.btn:focus-visible,
.site-nav a:focus-visible,
.btn-login:focus-visible,
.nav-toggle:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(139, 92, 246, .75);
  outline-offset: 3px;
}

/* 房间号按钮：无链接 */
.btn-room {
  cursor: default;
  user-select: all;
  background: rgba(255, 255, 255, .08);
  color: inherit;
  border-color: rgba(34, 211, 238, .5);
  border-style: dashed;
  box-shadow: none;
}

.btn-room:hover { transform: none; }

.btn-room b { color: var(--cyan); letter-spacing: 1px; }

/* 通用 Telegram 链接 */
.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(12, 16, 32, .16);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s, background .2s, transform .2s;
}

.tg-link:hover { border-color: #229ed9; background: rgba(34, 158, 217, .07); transform: translateY(-1px); }

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.crumb a:hover { color: var(--brand); }
.crumb span { opacity: .5; }

/* ---------- 动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #070a14;
  color: #a2aebf;
  padding: 54px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) 1.15fr;
  gap: 30px;
}

.footer-brand .brand-text { color: #fff; }
.footer-brand .brand-mark { box-shadow: none; }

.footer-about {
  margin-top: 13px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #74839a;
  max-width: 310px;
}

.footer-col h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: #74839a;
  transition: color .2s;
}

.footer-col a:hover { color: #c4b5fd; }

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  transition: border-color .2s, background .2s;
}

.footer-contact a:hover { border-color: #c4b5fd; background: rgba(196, 181, 253, .08); }

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #5d6b80;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .site-nav a { padding: 7px 7px; font-size: 12.5px; }
  .brand-text { font-size: 15.5px; }
}

@media (max-width: 1060px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 22px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(12, 16, 32, .14);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .22s ease, opacity .22s ease, visibility .22s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .site-nav a { padding: 11px 12px; font-size: 15px; border-radius: 9px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .brand-text { font-size: 14.5px; }
  .brand-text em { font-size: 13.5px; }
  .brand-mark { width: 34px; height: 34px; font-size: 11.5px; }
  .btn-login { padding: 8px 11px; font-size: 12px; }
  .container { padding-inline: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-about { max-width: none; }
}
