/* ==========================================================================
   爱游戏CN 站点共享样式 /assets/site.css
   设计体系：编辑部战报 · 命令栏导航 · 蓝紫电竞渐变
   ========================================================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --ayx-deep-purple: #2A1A5E;
  --ayx-electric-blue: #3B82F6;
  --ayx-violet: #8B5CF6;
  --ayx-orange: #FF5A36;
  --ayx-yellow: #D9F821;
  --ayx-ink: #0E0E1A;
  --ayx-paper: #F5F5FA;
  --ayx-text-primary: #FFFFFF;
  --ayx-text-secondary: #A0A0B8;

  --ayx-grad-main: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #2A1A5E 100%);
  --ayx-grad-accent: linear-gradient(135deg, #FF5A36 0%, #FF8A5C 100%);
  --ayx-grad-progress: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 60%, #FF5A36 100%);

  --ayx-font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --ayx-font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;

  --ayx-container-max: 1280px;
  --ayx-space-sm: 8px;
  --ayx-space-md: 16px;
  --ayx-space-lg: 24px;
  --ayx-space-xl: 48px;
  --ayx-space-xxl: 80px;

  --ayx-border-radius: 12px;
  --ayx-border-width: 2px;
  --ayx-shadow-sm: 4px 4px 0 rgba(0, 0, 0, 0.25);
  --ayx-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3);
}

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

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

body {
  margin: 0;
  font-family: var(--ayx-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ayx-text-primary);
  background:
    radial-gradient(ellipse 85% 55% at 90% -10%, rgba(139, 92, 246, 0.20), transparent 60%),
    radial-gradient(ellipse 65% 45% at 0% 100%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--ayx-deep-purple);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-weight: 900;
  line-height: 1.25;
}
p { margin: 0 0 1em; }
ul, ol { padding-left: 0; }
a { color: var(--ayx-electric-blue); }

button {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 3px solid var(--ayx-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 通用容器与区块 ---------- */
.ayx-container {
  max-width: var(--ayx-container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.ayx-section {
  padding: var(--ayx-space-xxl) 0;
}

.ayx-section--tight {
  padding: var(--ayx-space-xl) 0;
}

.ayx-divider {
  height: 2px;
  border: 0;
  margin: 32px 0;
  background: linear-gradient(90deg, var(--ayx-electric-blue) 0%, var(--ayx-violet) 50%, transparent 100%);
}

/* ---------- 页面标题 ---------- */
.ayx-page-title {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ayx-text-primary);
  margin-bottom: 12px;
  transform: skewX(-4deg);
}

.ayx-page-lead {
  font-size: 18px;
  color: var(--ayx-text-secondary);
  max-width: 680px;
  margin-bottom: 32px;
}

/* ---------- 章节头部 ---------- */
.ayx-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(139, 92, 246, 0.35);
}

.ayx-section-head__index {
  font-family: var(--ayx-font-mono);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--ayx-violet);
  letter-spacing: -0.04em;
}

.ayx-section-head__title {
  font-size: 24px;
  font-weight: 900;
  color: var(--ayx-text-primary);
  margin: 0;
}

/* ---------- 按钮 ---------- */
.ayx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ayx-btn--primary {
  background: var(--ayx-orange);
  border-color: var(--ayx-orange);
  color: #FFFFFF;
  box-shadow: var(--ayx-shadow-sm);
}

.ayx-btn--primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--ayx-shadow);
}

.ayx-btn--primary:active {
  transform: translate(0, 0);
  box-shadow: var(--ayx-shadow-sm);
}

.ayx-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--ayx-text-primary);
}

.ayx-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ayx-text-primary);
}

/* ---------- 卡片 ---------- */
.ayx-card {
  background: var(--ayx-paper);
  color: var(--ayx-ink);
  border: var(--ayx-border-width) solid rgba(14, 14, 26, 0.85);
  border-radius: var(--ayx-border-radius);
  padding: 28px;
  box-shadow: var(--ayx-shadow-sm);
}

.ayx-card--dark {
  background: rgba(14, 14, 26, 0.75);
  color: var(--ayx-text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--ayx-shadow);
}

.ayx-card--glow {
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.25), var(--ayx-shadow-sm);
}

/* ---------- 标签 ---------- */
.ayx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--ayx-yellow);
  color: var(--ayx-ink);
  font-family: var(--ayx-font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px 12px 4px 12px;
  text-transform: uppercase;
}

/* ---------- 栅格 ---------- */
.ayx-grid {
  display: grid;
  gap: var(--ayx-space-lg);
}

.ayx-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ayx-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ayx-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 面包屑 ---------- */
.ayx-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-family: var(--ayx-font-mono);
  font-size: 14px;
  color: var(--ayx-text-secondary);
}

.ayx-breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.ayx-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--ayx-violet);
}

.ayx-breadcrumb a {
  color: var(--ayx-electric-blue);
  text-decoration: none;
}

.ayx-breadcrumb a:hover {
  text-decoration: underline;
}

.ayx-breadcrumb [aria-current="page"] {
  color: var(--ayx-yellow);
}

/* ---------- 媒体容器 ---------- */
.ayx-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--ayx-border-radius);
  border: var(--ayx-border-width) solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(ellipse at 70% 20%, rgba(139, 92, 246, 0.35), transparent 65%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(42, 26, 94, 0.45));
}

.ayx-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.ayx-media::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 60%;
  height: 140%;
  background: linear-gradient(135deg, transparent 40%, rgba(217, 248, 33, 0.18) 100%);
  transform: rotate(18deg);
  pointer-events: none;
}

.ayx-media--16-9 { aspect-ratio: 16 / 9; }
.ayx-media--4-3 { aspect-ratio: 4 / 3; }
.ayx-media--1-1 { aspect-ratio: 1 / 1; }

/* ---------- 跳转链接 ---------- */
.ayx-skip {
  position: absolute;
  top: 8px;
  left: -999px;
  background: var(--ayx-orange);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  z-index: 1000;
}

.ayx-skip:focus {
  left: 8px;
}

/* ---------- 头部 ---------- */
.ayx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ayx-ink);
  border-bottom: 2px solid rgba(139, 92, 246, 0.35);
}

.ayx-header__inner {
  max-width: var(--ayx-container-max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.ayx-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ayx-text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.ayx-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--ayx-yellow);
  color: var(--ayx-ink);
  font-family: var(--ayx-font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  border-radius: 6px;
  transform: skewX(-6deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.ayx-brand__text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.ayx-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.ayx-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ayx-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ayx-nav__idx {
  font-family: var(--ayx-font-mono);
  font-size: 11px;
  color: var(--ayx-yellow);
  opacity: 0.75;
  line-height: 1;
}

.ayx-nav__link:hover {
  color: var(--ayx-text-primary);
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.35);
}

.ayx-nav__link[aria-current="page"] {
  color: var(--ayx-text-primary);
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: inset 0 -3px 0 var(--ayx-orange);
}

.ayx-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  background: var(--ayx-orange);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ayx-orange);
  border-radius: 8px;
  box-shadow: var(--ayx-shadow-sm);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ayx-header__cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--ayx-shadow);
}

/* 导航切换按钮（默认隐藏） */
.ayx-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.ayx-nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ayx-text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ayx-nav-toggle[aria-expanded="true"] .ayx-nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.ayx-nav-toggle[aria-expanded="true"] .ayx-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.ayx-nav-toggle[aria-expanded="true"] .ayx-nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 头部滚动进度条 */
.ayx-header__progress {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(139, 92, 246, 0.18);
  overflow: hidden;
}

.ayx-header__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ayx-grad-progress);
  transition: width 0.1s linear;
}

/* ---------- 移动端导航 ---------- */
@media (max-width: 1024px) {
  .ayx-nav-toggle {
    display: inline-flex;
  }

  .ayx-header__cta {
    margin-left: auto;
  }

  .ayx-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    background: rgba(14, 14, 26, 0.98);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    border-bottom: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, border-color 0.3s ease;
  }

  .ayx-nav[data-open] {
    max-height: 560px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.45);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

  .ayx-nav__list {
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px;
  }

  .ayx-nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 16px;
  }
}

/* ---------- 页脚 ---------- */
.ayx-footer {
  background: var(--ayx-ink);
  border-top: 2px solid rgba(139, 92, 246, 0.35);
  margin-top: 0;
}

.ayx-footer__inner {
  max-width: var(--ayx-container-max);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
}

.ayx-footer__block--brand {
  padding-right: 16px;
}

.ayx-brand--footer .ayx-brand__mark {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.ayx-brand--footer .ayx-brand__text {
  font-size: 20px;
}

.ayx-footer__desc {
  margin: 18px 0 12px;
  color: var(--ayx-text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.ayx-footer__trust {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--ayx-violet);
  background: rgba(139, 92, 246, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.6;
  border-radius: 0 8px 8px 0;
}

.ayx-footer__title {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 900;
  color: var(--ayx-text-primary);
  margin-bottom: 16px;
}

.ayx-footer__title::before {
  content: "//";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ayx-violet);
  font-family: var(--ayx-font-mono);
  font-weight: 700;
}

.ayx-footer__links,
.ayx-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ayx-footer__links a {
  color: var(--ayx-text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.ayx-footer__links a:hover {
  color: var(--ayx-yellow);
  padding-left: 6px;
}

.ayx-footer__contact li {
  color: var(--ayx-text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.ayx-footer__note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(160, 160, 184, 0.8);
  font-size: 13px;
  line-height: 1.7;
}

.ayx-footer__bottom {
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ayx-footer__bottom-inner {
  max-width: var(--ayx-container-max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ayx-footer__copyright,
.ayx-footer__icp {
  margin: 0;
  color: rgba(160, 160, 184, 0.9);
  font-family: var(--ayx-font-mono);
  font-size: 13px;
}

/* ---------- 返回顶部 ---------- */
.ayx-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ayx-orange);
  border: 2px solid #FFFFFF;
  border-radius: 10px;
  box-shadow: var(--ayx-shadow-sm);
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  z-index: 90;
}

.ayx-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ayx-top:hover {
  box-shadow: var(--ayx-shadow);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .ayx-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .ayx-container {
    padding: 0 16px;
  }

  .ayx-header__inner {
    padding: 10px 16px;
    gap: 12px;
  }

  .ayx-header__cta {
    display: none;
  }

  .ayx-brand__text {
    font-size: 19px;
  }

  .ayx-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 16px 32px;
  }

  .ayx-footer__block--brand {
    padding-right: 0;
  }

  .ayx-footer__bottom-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .ayx-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .ayx-header__cta {
    display: none;
  }
}

/* ---------- 栅格响应式 ---------- */
@media (max-width: 1024px) {
  .ayx-grid--cols-3,
  .ayx-grid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ayx-grid--cols-2,
  .ayx-grid--cols-3,
  .ayx-grid--cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 减弱动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .ayx-nav,
  .ayx-nav-toggle__bar,
  .ayx-btn,
  .ayx-card,
  .ayx-header__cta,
  .ayx-top {
    transition: none !important;
  }
}

/* ---------- 滚入显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
