/* =============================================
   爱游戏体育 · Site Kit 共享样式
   文件位置 /assets/site.css
   ============================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --color-bg: #0B1D3A;
  --color-bg-dark: #0A1428;
  --color-bg-deep: #13294B;
  --color-accent: #FF4D00;
  --color-lime: #39D353;
  --color-electric: #00E5FF;
  --color-purple: #7A00E6;
  --color-light: #F5F7FA;
  --color-text: #FFFFFF;
  --color-muted: rgba(255, 255, 255, 0.62);
  --color-card: rgba(255, 255, 255, 0.07);
  --color-line: rgba(255, 255, 255, 0.12);
  --color-line-strong: rgba(0, 229, 255, 0.4);
  --font-headline: "Arial Black", "Impact", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "Courier New", monospace;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --header-top-h: 44px;
  --nav-h: 58px;
  --content-max: 1200px;
  --content-pad: 32px;
  --dur: 0.3s;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- 2. Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-light);
  background-color: var(--color-bg);
  background-image: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg) 40%, var(--color-bg-deep) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-electric);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--color-accent);
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

p {
  margin-bottom: 1em;
}

strong {
  color: var(--color-text);
  font-weight: 700;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

#main-content {
  min-height: 60vh;
}

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

/* ---------- 3. 中文排版 ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
}

h4 {
  font-size: 18px;
}

.code,
.data {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.95em;
}

.caption {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

/* ---------- 4. 布局原语 ---------- */
.container {
  width: min(calc(100% - var(--content-pad) * 2), var(--content-max));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

.section {
  position: relative;
  padding: 88px 0;
}

.section-head {
  margin-bottom: 44px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-headline);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  color: var(--color-text);
}

.section-desc {
  margin-top: 12px;
  max-width: 640px;
  color: var(--color-muted);
}

/* ---------- 5. 头部 ---------- */
.skip-link {
  position: fixed;
  top: -72px;
  left: 20px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 40, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-line);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(6, 13, 29, 0.97);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-electric) 55%, var(--color-lime) 100%);
  border-radius: 0 2px 2px 0;
  z-index: 10;
  pointer-events: none;
}

.header-top {
  position: relative;
  height: var(--header-top-h);
  background: rgba(10, 20, 40, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  font-family: var(--font-headline);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent) 0%, #FF6A2A 100%);
  padding: 4px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 77, 0, 0.3);
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 16px;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-slogan {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  line-height: 1.2;
  border-left: 2px solid var(--color-accent);
  padding-left: 10px;
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--color-muted);
  border: 1px solid var(--color-line);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.header-search:hover {
  color: var(--color-electric);
  border-color: var(--color-line-strong);
  background: rgba(0, 229, 255, 0.08);
}

.header-nav {
  position: relative;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
}

.header-nav::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0, transparent 10px,
    var(--color-accent) 10px, var(--color-accent) 14px,
    transparent 14px, transparent 22px,
    var(--color-electric) 22px, var(--color-electric) 26px,
    transparent 26px, transparent 34px
  );
  opacity: 0.4;
  pointer-events: none;
}

.header-nav-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 6. 导航 ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-accent);
  box-shadow: 0 4px 16px rgba(255, 77, 0, 0.35);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-line-strong);
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  margin: 2px 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

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

  .header-nav-inner {
    justify-content: flex-start;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--color-bg-dark);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  .site-nav[data-open] {
    display: flex;
    animation: nav-pop var(--dur) var(--ease);
  }

  .nav-link {
    justify-content: flex-start;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
  }
}

@keyframes nav-pop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--color-bg) 0%, #060D1D 100%);
  border-top: 1px solid var(--color-line);
  padding-top: 60px;
  margin-top: 80px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 600px;
  height: 240px;
  background: radial-gradient(ellipse, rgba(122, 0, 230, 0.15) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.footer-desc {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-heading::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.footer-contact-item {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
}

.footer-link {
  font-size: 14px;
  color: var(--color-muted);
  padding: 4px 0;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--color-electric);
  padding-left: 6px;
}

.footer-bottom {
  position: relative;
  border-top: 1px solid var(--color-line);
  padding: 18px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
}

.btn-primary:hover {
  background: #FF6A2A;
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 77, 0, 0.4);
}

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

.btn-ghost:hover {
  border-color: var(--color-electric);
  color: var(--color-electric);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(0, 229, 255, 0.1);
  color: var(--color-electric);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.badge-lime {
  background: rgba(57, 211, 83, 0.1);
  color: var(--color-lime);
  border-color: rgba(57, 211, 83, 0.25);
}

.badge-orange {
  background: rgba(255, 77, 0, 0.12);
  color: var(--color-accent);
  border-color: rgba(255, 77, 0, 0.3);
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-line-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(122, 0, 230, 0.18) 0%, rgba(0, 229, 255, 0.1) 55%, rgba(57, 211, 83, 0.08) 100%);
  border: 1px solid var(--color-line);
  aspect-ratio: 16 / 10;
  min-height: 180px;
}

.media-frame.wide {
  aspect-ratio: 21 / 9;
}

.media-frame.square {
  aspect-ratio: 1 / 1;
}

.media-frame > img,
.media-frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 9. 内页首屏与面包屑 ---------- */
.page-hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(122, 0, 230, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: 40%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-title {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.page-desc {
  margin-top: 14px;
  max-width: 640px;
  color: var(--color-muted);
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--color-muted);
  position: relative;
  z-index: 1;
}

.crumb a {
  color: var(--color-muted);
  transition: color var(--dur) var(--ease);
}

.crumb a:hover {
  color: var(--color-electric);
}

.crumb-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.crumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- 10. 交互状态与动画 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 900px) {
  .section {
    padding: 64px 0;
  }

  .col-span-3,
  .col-span-4 {
    grid-column: span 6;
  }

  .col-span-8 {
    grid-column: span 12;
  }
}

@media (max-width: 600px) {
  :root {
    --content-pad: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .col-span-3,
  .col-span-4,
  .col-span-6,
  .col-span-8,
  .col-span-12 {
    grid-column: span 12;
  }

  .card {
    padding: 20px;
  }

  .brand-name {
    font-size: 15px;
  }

  .header-slogan {
    display: none;
  }

  .page-hero {
    padding: 40px 0;
  }
}
