/* ==========================================================================
   玖零奇迹官网 · 全局样式表（浅色专业游戏风）
   站点：90qjkj.com | 版本：v1.3.1
   目录：
     01 设计变量      02 重置样式      03 基础样式
     04 布局与版块    05 按钮组件      06 顶部导航（含搜索框）
     07 页脚          08 动效偏好适配
   ========================================================================== */

/* ============================ 01 设计变量 ============================ */
:root {
  --bg-base:     #f5f7fc;
  --bg-card:     #ffffff;
  --bg-soft:     #edf0f9;
  --bg-tint:     #f8f6ff;

  --text-primary:   #1c2340;
  --text-secondary: #56617e;
  --text-muted:     #8a94ad;

  --primary:       #6a45f5;
  --primary-hover: #5836d8;
  --accent:        #00a8c6;
  --gold:          #b07a1e;
  --gold-bg:       #fdf6e3;
  --danger:        #e5484d;

  --gradient-brand: linear-gradient(135deg, #6a45f5 0%, #00c6e0 100%);
  --border:       rgba(106, 69, 245, .28);
  --border-light: rgba(28, 35, 64, .10);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 10px 34px rgba(28, 35, 64, .09);
  --shadow-glow: 0 8px 26px rgba(106, 69, 245, .32);

  --header-h:    72px;
  --container-w: 1200px;

  --font-base: "PingFang SC", "HarmonyOS Sans SC", "MiSans",
               "Microsoft YaHei", "Noto Sans CJK SC",
               "WenQuanYi Micro Hei", sans-serif;
}

/* ============================ 02 重置样式 ============================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================ 03 基础样式 ============================ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-soft);
}
body {
  font-family: var(--font-base);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
img    { max-width: 100%; display: block; }
a      { color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; }

::selection { background: rgba(106, 69, 245, .20); color: var(--text-primary); }

::-webkit-scrollbar       { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary), var(--accent)); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

body.nav-locked { overflow: hidden; }

/* ============================ 04 布局与版块 ============================ */
.container { width: 92%; margin: 0 auto; }

.section { padding: 96px 0; position: relative; }

.section-head { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block;
  font-size: 12px; letter-spacing: 6px;
  color: var(--accent); text-transform: uppercase; font-weight: 600;
  margin-bottom: 14px;
}
.section-tag::before,
.section-tag::after {
  content: ""; display: inline-block;
  width: 36px; height: 2px;
  background: var(--gradient-brand);
  vertical-align: middle; margin: 0 12px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: 6px; margin-bottom: 14px; color: var(--text-primary); }
.section-head p  { color: var(--text-secondary); font-size: 15px; letter-spacing: 2px; }

.page-main-offset { padding-top: var(--header-h); }

/* ============================ 05 按钮组件（切角游戏风） ============================ */
.btn {
  --cut: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 30px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: 2px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform .22s ease, filter .22s ease, color .22s ease,
              border-color .22s ease, background .22s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  filter: drop-shadow(0 6px 16px rgba(106, 69, 245, .35));
}
.btn-primary:hover { transform: translateY(-2px); filter: drop-shadow(0 10px 22px rgba(106, 69, 245, .45)); color: #fff; }

.btn-ghost { border-color: var(--border); color: var(--primary); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-hover); transform: translateY(-2px); }

.btn-sm { --cut: 8px; padding: 8px 20px;  font-size: 13px; }
.btn-lg { --cut: 14px; padding: 18px 56px; font-size: 17px; letter-spacing: 3px; }

/* ============================ 06 顶部导航（v1.3 含搜索框） ============================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--border-light);
  box-shadow: 0 6px 26px rgba(28, 35, 64, .08);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border-light); box-shadow: 0 4px 12px rgba(106, 69, 245, .18); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--text-primary); font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.brand-text em     { color: var(--accent); font-size: 10px; font-style: normal; letter-spacing: 3px; font-weight: 600; }
.brand.no-logo::before {
  content: "90";
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient-brand);
  color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.main-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 14.5px; font-weight: 600; letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s;
}
.nav-ico { display: inline-flex; color: var(--primary); }
.nav-ico svg { display: block; }
.nav-link::after {
  content: ""; position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 3px; border-radius: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .25s ease;
}
.nav-link:hover         { color: var(--primary); }
.nav-link:hover::after  { transform: scaleX(1); }
.nav-link.active        { color: var(--primary); }
.nav-link.active::after { transform: scaleX(1); }

/* ---------- 站内搜索框 ---------- */
.search-box {
  --sb-h: 40px;
  position: relative;
  width: 190px;
  flex-shrink: 0;
  transition: width .3s cubic-bezier(.22, 1, .36, 1);
}
.search-box:focus-within { width: 246px; }
.search-box::before {
  content: "";
  position: absolute; inset: -1.5px;
  border-radius: 999px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity .25s ease;
}
.search-box:focus-within::before { opacity: 1; }

.sb-input {
  position: relative; z-index: 1;
  width: 100%; height: var(--sb-h);
  padding: 0 62px 0 40px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-soft);
  font-family: inherit; font-size: 13.5px; color: var(--text-primary);
  outline: none;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.sb-input::placeholder { color: var(--text-muted); letter-spacing: 1px; }
.search-box:focus-within .sb-input {
  border-color: transparent;
  background: #fff;
  box-shadow: 0 6px 20px rgba(106, 69, 245, .16);
}

.sb-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 2;
  display: flex; color: var(--text-muted);
  pointer-events: none;
  transition: color .25s;
}
.search-box:focus-within .sb-icon { color: var(--primary); }

.sb-kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  z-index: 2;
  font-style: normal;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 2px 8px;
  background: #fff;
  pointer-events: none;
  transition: color .25s, border-color .25s, opacity .25s;
}
.search-box:focus-within .sb-kbd { color: var(--primary); border-color: var(--border); }
.sb-input:not(:placeholder-shown) ~ .sb-kbd { opacity: 0; }

.sb-suggest {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  margin: 0; padding: 6px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(28, 35, 64, .18);
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 1200;
}
.sb-suggest::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-brand);
}
.sb-suggest.show { opacity: 1; visibility: visible; transform: translateY(0); }

.sb-suggest li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.sb-suggest li em {
  font-style: normal;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 15px;
  flex-shrink: 0;
}
.sb-suggest li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-suggest mark { background: none; color: var(--primary); font-weight: 800; }
.sb-suggest li .go {
  font-style: normal; color: var(--primary);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
}
.sb-suggest li:hover, .sb-suggest li.cur { background: var(--bg-tint); color: var(--primary); }
.sb-suggest li:hover .go, .sb-suggest li.cur .go { opacity: 1; transform: translateX(0); }
.sb-suggest li.sb-empty { color: var(--text-muted); cursor: default; justify-content: center; }
.sb-suggest li.sb-empty:hover { background: none; }
.sb-suggest li.sb-foot {
  justify-content: center;
  font-size: 11px; color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  border-radius: 0;
  margin-top: 4px; padding: 8px 0 4px;
  cursor: default; background: none;
}
.sb-suggest li.sb-foot:hover { color: var(--text-muted); }

.sb-suggest.show li[data-url] { animation: sbItem .28s ease both; }
.sb-suggest.show li[data-url]:nth-child(2) { animation-delay: .04s; }
.sb-suggest.show li[data-url]:nth-child(3) { animation-delay: .08s; }
.sb-suggest.show li[data-url]:nth-child(4) { animation-delay: .12s; }
.sb-suggest.show li[data-url]:nth-child(5) { animation-delay: .16s; }
.sb-suggest.show li[data-url]:nth-child(6) { animation-delay: .20s; }
@keyframes sbItem {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-drawer-actions { display: none; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px; padding: 8px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px;
  border-radius: 2px; background: var(--text-primary);
  margin: 5px 0;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) and (min-width: 1025px) {
  .nav-link { padding: 10px 11px; font-size: 14px; }
  .nav-link::after { left: 11px; right: 11px; }
  .search-box { width: 150px; }
  .search-box:focus-within { width: 190px; }
  .btn-sm { padding: 8px 14px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 60px; }

  .brand-text strong { font-size: 16px; }
  .header-actions    { display: none; }
  .nav-toggle        { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-h); right: 0; z-index: 999;
    width: min(78vw, 320px);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px 20px 32px;
    background: rgba(255, 255, 255, .99);
    border-left: 1px solid var(--border-light);
    box-shadow: -12px 0 40px rgba(28, 35, 64, .12);
    transform: translateX(105%);
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }

  .main-nav .search-box,
  .main-nav .search-box:focus-within { width: 100%; margin: 4px 0 14px; }
  .main-nav .sb-kbd { display: none; }
  .main-nav .sb-input { padding-right: 16px; background: #fff; }
  .main-nav .sb-suggest { position: absolute; left: 0; right: 0; }

  .nav-link { padding: 13px 12px; font-size: 15px; border-bottom: 1px solid var(--border-light); }
  .nav-link::after { display: none; }
  .nav-link.active { background: var(--bg-tint); border-radius: var(--radius-sm); }

  .nav-drawer-actions { display: flex; gap: 12px; margin-top: 24px; }
  .nav-drawer-actions .btn { flex: 1; }
}

/* ============================ 07 页脚 ============================ */
.site-footer {
  position: relative;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-light);
  overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 480px; max-width: 80%; height: 3px;
  background: var(--gradient-brand);
  opacity: .7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-logo-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border-light); }
.footer-logo-row strong { display: block; color: var(--text-primary); font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.footer-logo-row em     { display: block; color: var(--accent); font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: 2px; margin-top: 3px; }

.footer-intro { color: var(--text-secondary); font-size: 14px; line-height: 1.9; margin-bottom: 20px; max-width: 460px; }

.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact li { color: var(--text-muted); font-size: 13px; }
.footer-contact a  { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.footer-contact a:hover { color: var(--primary); }

.footer-col h4 {
  position: relative;
  color: var(--text-primary); font-size: 15px; font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 24px; padding-bottom: 12px;
}
.footer-col h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 26px; height: 3px; border-radius: 2px;
  background: var(--gradient-brand);
}
.footer-col a {
  display: block;
  color: var(--text-secondary); font-size: 14px;
  text-decoration: none; padding: 7px 0;
  transition: color .2s ease, padding-left .2s ease;
}
.footer-col a:hover { color: var(--primary); padding-left: 6px; }

.footer-health {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--gold-bg);
  text-align: center;
  padding: 22px 24px;
  color: var(--gold);
  font-size: 13px; line-height: 2; letter-spacing: 1.5px; font-weight: 600;
}
.footer-health i {
  display: block; font-style: normal;
  font-size: 11px; letter-spacing: 6px;
  opacity: .75; margin-bottom: 8px;
}

.footer-copyright {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  padding: 24px 16px 32px;
  color: var(--text-muted); font-size: 13px;
}
.footer-copyright a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-copyright a:hover { color: var(--primary); }
.footer-sep { margin: 0 12px; opacity: .45; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 36px; }
  .footer-health { font-size: 12px; }
}

/* ============================ 08 动效偏好适配 ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
