/* =========================================================
   99xxapp.com — i社游戏网站导航
   视觉方向：透视点阵波浪 / 深靛 · 浅青 · 低亮蓝紫
   ========================================================= */

:root{
  --ink-950:#05081c;
  --ink-900:#080c24;
  --ink-800:#0d1533;
  --ink-700:#132046;
  --ink-600:#1b2c5c;

  --cyan-300:#8ef0e6;
  --cyan-400:#5ad8d6;
  --cyan-500:#2fb6bd;

  --viol-300:#a79bf0;
  --viol-400:#7b6fd6;
  --viol-500:#5a4fae;

  --text-100:#e8f1ff;
  --text-300:#b6c6e6;
  --text-500:#8496bb;

  --line:rgba(140,168,224,.22);
  --line-soft:rgba(140,168,224,.12);

  --panel:rgba(8,13,36,.62);
  --panel-solid:rgba(8,13,36,.9);

  --radius-lg:18px;
  --radius-sm:10px;

  --shell:1120px;
  --gutter:clamp(14px, 4vw, 40px);
}

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

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

body{
  margin:0;
  min-height:100%;
  overflow-x:hidden;
  color:var(--text-100);
  background-color:var(--ink-950);
  background-image:
    radial-gradient(120% 70% at 50% -10%, #1a2a63 0%, rgba(11,17,46,0) 58%),
    radial-gradient(90% 55% at 12% 6%, rgba(90,79,174,.38) 0%, rgba(11,17,46,0) 60%),
    linear-gradient(180deg, #080c24 0%, #070b1f 46%, #05081c 100%);
  background-attachment:scroll;
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Heiti SC","Noto Sans CJK SC",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.75;
  letter-spacing:.01em;
}

/* ---------- 背景舞台：透视点阵波浪 ---------- */

.lattice-stage{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}

.lattice-stage::after{
  /* 上半部压暗，保证正文可读；下半部留给波浪 */
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,
    rgba(5,8,28,.82) 0%,
    rgba(5,8,28,.58) 26%,
    rgba(5,8,28,.12) 44%,
    rgba(5,8,28,0) 56%,
    rgba(5,8,28,.34) 100%);
}

#lattice-canvas{
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
}

/* 动画不可用时的静态兜底背景（与页面配色一致的点阵） */
body.lattice-off .lattice-stage{
  background-image:
    radial-gradient(60% 40% at 50% 52%, rgba(90,216,214,.16) 0%, rgba(5,8,28,0) 70%),
    repeating-linear-gradient(180deg, rgba(167,155,240,.16) 0 1px, rgba(5,8,28,0) 1px 22px),
    repeating-linear-gradient(90deg, rgba(90,216,214,.12) 0 1px, rgba(5,8,28,0) 1px 26px);
  background-position:center 60%, center 62%, center 62%;
  background-size:auto, 100% 46%, 100% 46%;
  background-repeat:no-repeat;
}
body.lattice-off #lattice-canvas{display:none;}

/* ---------- 页面骨架 ---------- */

.page{
  position:relative;
  z-index:1;
  width:100%;
  max-width:var(--shell);
  margin:0 auto;
  padding:0 var(--gutter) 56px;
}

.section-title{
  margin:0 0 22px;
  font-size:clamp(1.12rem,2.4vw,1.42rem);
  font-weight:700;
  letter-spacing:.06em;
  color:var(--text-100);
  display:flex;
  align-items:center;
  gap:14px;
}

.section-title::before{
  content:"";
  flex:0 0 auto;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--cyan-400);
  box-shadow:0 0 0 4px rgba(90,216,214,.16), 0 0 18px rgba(90,216,214,.75);
}

.section-title::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:linear-gradient(90deg, rgba(90,216,214,.5), rgba(123,111,214,.32) 42%, rgba(140,168,224,0) 100%);
}

/* ---------- 顶部 ---------- */

.masthead{
  padding:clamp(22px,4vw,40px) 0 clamp(26px,4vw,42px);
}

.masthead__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.masthead__logo{
  display:block;
  width:clamp(54px,9vw,72px);
  height:auto;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow:0 12px 34px rgba(5,8,28,.7), 0 0 0 5px rgba(13,21,51,.55);
}

.motion-toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:9px 18px 9px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel-solid);
  color:var(--text-300);
  font:inherit;
  font-size:.86rem;
  line-height:1.4;
  letter-spacing:.06em;
  cursor:pointer;
  transition:border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

.motion-toggle:hover,
.motion-toggle:focus-visible{
  border-color:rgba(90,216,214,.6);
  color:var(--text-100);
  background:rgba(19,32,70,.92);
}

.motion-toggle:active{transform:translateY(1px);}

.motion-toggle__dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--cyan-400);
  box-shadow:0 0 12px rgba(90,216,214,.9);
}

.motion-toggle[aria-pressed="true"] .motion-toggle__dot{
  background:var(--viol-400);
  box-shadow:0 0 0 3px rgba(123,111,214,.2);
}

.masthead__copy{
  margin-top:clamp(26px,5vw,48px);
  max-width:760px;
}

.masthead__title{
  margin:0;
  font-size:clamp(2rem,6.4vw,3.35rem);
  line-height:1.2;
  font-weight:800;
  letter-spacing:.04em;
  background:linear-gradient(96deg, #ffffff 0%, var(--cyan-300) 44%, var(--viol-300) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.masthead__title::after{
  content:"";
  display:block;
  width:76px;
  height:3px;
  margin-top:18px;
  border-radius:3px;
  background:linear-gradient(90deg, var(--cyan-400), var(--viol-400));
}

.masthead__lead{
  margin:20px 0 0;
  font-size:clamp(.95rem,2.2vw,1.04rem);
  color:var(--text-300);
  max-width:66ch;
}

/* ---------- 站点入口 ---------- */

.main{display:block;}

.entries{
  position:relative;
  padding:clamp(20px,3.4vw,30px) clamp(16px,3vw,30px) clamp(24px,3.4vw,32px);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-lg);
  background:var(--panel);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
  box-shadow:0 26px 60px rgba(3,6,20,.5);
}

.entries__grid{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(248px, 1fr));
  gap:10px;
}

.entry{min-width:0;}

.entry__link{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  min-height:60px;
  padding:12px 16px;
  border:1px solid var(--line-soft);
  border-radius:var(--radius-sm);
  background:linear-gradient(120deg, rgba(19,32,70,.72), rgba(10,16,42,.5));
  color:var(--text-100);
  text-decoration:none;
  overflow:hidden;
  transition:border-color .22s ease, transform .22s ease, background-color .22s ease;
}

.entry__link::before{
  content:"";
  position:absolute;
  left:0;
  top:12%;
  bottom:12%;
  width:2px;
  border-radius:2px;
  background:linear-gradient(180deg, var(--cyan-400), var(--viol-400));
  opacity:.5;
  transition:opacity .22s ease, top .22s ease, bottom .22s ease;
}

.entry__link:hover,
.entry__link:focus-visible{
  transform:translateY(-2px);
  border-color:rgba(90,216,214,.5);
  background:linear-gradient(120deg, rgba(27,44,92,.9), rgba(14,22,56,.68));
}

.entry__link:hover::before,
.entry__link:focus-visible::before{opacity:1;top:0;bottom:0;}

.entry__no{
  flex:0 0 auto;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.12em;
  color:var(--cyan-400);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  opacity:.85;
}

.entry__name{
  flex:1 1 auto;
  min-width:0;
  font-size:1rem;
  font-weight:600;
  letter-spacing:.02em;
  word-break:break-word;
}

.entry__rule{
  flex:0 0 auto;
  width:22px;
  height:8px;
  background-image:radial-gradient(circle, var(--viol-300) 40%, rgba(0,0,0,0) 42%);
  background-size:7px 8px;
  background-repeat:repeat-x;
  opacity:.5;
  transition:opacity .22s ease;
}

.entry__link:hover .entry__rule,
.entry__link:focus-visible .entry__rule{opacity:1;}

/* ---------- 要点 ---------- */

.notes{margin-top:clamp(34px,5vw,54px);}

.notes__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}

.note{
  position:relative;
  padding:22px 20px 22px 22px;
  border:1px solid var(--line-soft);
  border-top:1px solid rgba(90,216,214,.34);
  border-radius:var(--radius-sm);
  background:rgba(8,13,36,.56);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}

.note__mark{
  display:block;
  width:34px;
  height:8px;
  margin-bottom:14px;
  background-image:radial-gradient(circle, var(--cyan-400) 38%, rgba(0,0,0,0) 40%);
  background-size:8px 8px;
  background-repeat:repeat-x;
  opacity:.8;
}

.note__text{
  margin:0;
  font-size:.95rem;
  color:var(--text-300);
}

.note__text strong{
  display:block;
  margin-bottom:4px;
  color:var(--text-100);
  font-weight:700;
  letter-spacing:.04em;
}

/* ---------- 页脚 ---------- */

.footer{
  margin-top:clamp(40px,6vw,66px);
  padding-top:22px;
  border-top:1px solid var(--line-soft);
}

.footer__note{
  margin:0;
  font-size:.88rem;
  color:var(--text-500);
  max-width:72ch;
}

.footer__copy{
  margin:12px 0 0;
  font-size:.82rem;
  letter-spacing:.06em;
  color:var(--text-500);
}

/* ---------- 焦点可见 ---------- */

a:focus-visible,
button:focus-visible{
  outline:2px solid var(--cyan-300);
  outline-offset:3px;
}

/* ---------- 响应式 ---------- */

@media (max-width:760px){
  .lattice-stage::after{
    background:linear-gradient(180deg,
      rgba(5,8,28,.86) 0%,
      rgba(5,8,28,.62) 30%,
      rgba(5,8,28,.18) 48%,
      rgba(5,8,28,0) 60%,
      rgba(5,8,28,.4) 100%);
  }
  .entries__grid{grid-template-columns:1fr;}
}

@media (max-width:420px){
  body{font-size:15px;}
  .page{padding-bottom:44px;}
  .masthead__bar{gap:12px;}
  .motion-toggle{padding:8px 14px 8px 12px;font-size:.8rem;}
  .entries{padding:18px 12px 20px;border-radius:14px;}
  .entry__link{gap:10px;padding:11px 12px;min-height:56px;}
  .entry__name{font-size:.95rem;}
  .entry__rule{width:15px;}
  .note{padding:18px 16px;}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}
