/* ==========================================================
   雷火电竞中文官方站 — 全站共享样式
   文件：/assets/site.css
   ========================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 60% at 85% -5%, rgba(139, 92, 246, 0.08), transparent 65%),
    radial-gradient(ellipse 50% 40% at 5% 105%, rgba(0, 212, 255, 0.05), transparent 55%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

/* ---------- 2. CSS 变量 ---------- */
:root {
  --bg-void: #0B0F1A;
  --bg-panel: #121A2D;
  --bg-elevated: #1B2740;
  --line-thin: rgba(255, 255, 255, 0.08);
  --accent-volt: #FF5C28;
  --accent-plasma: #8B5CF6;
  --accent-pulse: #00D4FF;
  --mineral-moss: #6BAE75;
  --mineral-terracotta: #D2694A;
  --text-primary: #F2E9E1;
  --text-secondary: #9AA7BD;

  --font-heading: 'DIN Alternate', 'Avenir Next Condensed', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'Roboto Mono', monospace;

  --space-section: clamp(4rem, 10vw, 7rem);
  --space-block: clamp(2rem, 5vw, 4rem);

  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-medium: 0.4s;
}

/* ---------- 3. 全局焦点与无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--accent-pulse);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -72px;
  left: 1rem;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(120deg, var(--accent-volt), #FF8A50);
  color: #0B0F1A;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(255, 92, 40, 0.35);
  transition: top 0.3s var(--ease-smooth);
}

.skip-link:focus {
  top: 1rem;
}

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

/* ---------- 4. 容器与布局 ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: var(--space-section);
}

.divider {
  height: 1px;
  border: none;
  background: var(--line-thin);
  margin-block: var(--space-block);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.breadcrumb li + li::before {
  content: '/';
  color: var(--text-secondary);
  opacity: 0.4;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-smooth);
}

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

.breadcrumb li:last-child {
  color: var(--text-primary);
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 26, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-thin);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-plasma) 0%, var(--accent-pulse) 50%, var(--accent-volt) 100%);
  z-index: 20;
  pointer-events: none;
}

.header-ticker {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), transparent 60%);
  border-bottom: 1px solid var(--line-thin);
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.header-ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

.header-ticker-left,
.header-ticker-right {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-main {
  background: transparent;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.header-wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  white-space: nowrap;
}

.header-signature {
  font-family: var(--font-data);
  font-size: 0.625rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-volt);
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-nav-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.header-nav-item a {
  display: inline-block;
  position: relative;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-smooth);
}

.header-nav-item a::after {
  content: '';
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.125rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-plasma), var(--accent-pulse));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-medium) var(--ease-smooth);
}

.header-nav-item a:hover,
.header-nav-item a:focus-visible {
  color: var(--text-primary);
}

.header-nav-item a:hover::after,
.header-nav-item a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-nav-item a[aria-current="page"] {
  color: var(--text-primary);
  text-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.375rem 0.625rem 1.5rem;
  background: linear-gradient(120deg, var(--accent-volt) 55%, #FF8A50);
  color: #0B0F1A;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
  transition: filter var(--duration-fast) var(--ease-smooth), box-shadow var(--duration-fast) var(--ease-smooth);
  flex-shrink: 0;
}

.header-cta:hover,
.header-cta:focus-visible {
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgba(255, 92, 40, 0.3);
}

.header-cta-arrow {
  display: inline-block;
  font-size: 1.125rem;
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.header-cta:hover .header-cta-arrow {
  transform: translateX(4px);
}

.header-cta-desktop {
  display: inline-flex;
}

.header-cta-mobile {
  display: none;
}

.header-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-thin);
  border-radius: 4px;
  background: var(--bg-panel);
  transition: border-color var(--duration-fast) var(--ease-smooth),
              background var(--duration-fast) var(--ease-smooth);
  flex-shrink: 0;
}

.header-toggle:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: var(--bg-elevated);
}

.header-toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--duration-medium) var(--ease-smooth),
              opacity var(--duration-medium) var(--ease-smooth);
}

.header-nav[data-open] ~ .header-toggle .header-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-nav[data-open] ~ .header-toggle .header-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header-nav[data-open] ~ .header-toggle .header-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--bg-void) 0%, #080C16 100%);
  border-top: 1px solid var(--line-thin);
  margin-top: var(--space-section);
  overflow: hidden;
}

.footer-sweep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-plasma) 0%, var(--accent-pulse) 50%, var(--accent-volt) 75%, transparent 95%);
  opacity: 0.65;
}

.footer-grid {
  display: grid;
  grid-template-columns: 4fr 2fr 3fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: calc(var(--space-block) * 0.8) 3rem;
}

.footer-wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.footer-signature {
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-volt);
  margin-top: 0.25rem;
}

.footer-trust {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 36ch;
  line-height: 1.8;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-list {
  display: grid;
  gap: 0.625rem;
}

.footer-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-list a {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-smooth),
              transform var(--duration-fast) var(--ease-smooth);
}

.footer-list a:hover {
  color: var(--accent-pulse);
  transform: translateX(4px);
}

.footer-service {
  margin-top: 1.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line-thin);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-thin);
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---------- 7. 按钮与徽章 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 2px;
  transition: background var(--duration-fast) var(--ease-smooth),
              color var(--duration-fast) var(--ease-smooth),
              border-color var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth),
              transform var(--duration-fast) var(--ease-smooth);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent-volt) 50%, #FF8A50);
  color: #0B0F1A;
  font-weight: 800;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 92, 40, 0.28);
}

.btn-outline {
  border: 1px solid var(--accent-plasma);
  color: var(--accent-plasma);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-plasma);
  box-shadow: inset 0 0 24px rgba(139, 92, 246, 0.12);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.badge-live {
  background: rgba(255, 92, 40, 0.14);
  color: var(--accent-volt);
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 1.6s ease-in-out infinite;
}

.badge-updated {
  background: rgba(107, 174, 117, 0.14);
  color: var(--mineral-moss);
}

.badge-alert {
  background: rgba(210, 105, 74, 0.14);
  color: var(--mineral-terracotta);
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ---------- 8. 标题组与面板 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-pulse);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--accent-plasma);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-secondary);
  max-width: 60ch;
}

.panel {
  position: relative;
  background: linear-gradient(165deg, var(--bg-panel) 0%, rgba(18, 26, 45, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  transition: border-color var(--duration-medium) var(--ease-smooth),
              box-shadow var(--duration-medium) var(--ease-smooth);
}

.panel:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25),
              inset 0 0 32px rgba(0, 212, 255, 0.03);
}

/* ---------- 9. 数据统计 ---------- */
.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  background: linear-gradient(160deg, var(--text-primary) 35%, var(--accent-plasma) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-label {
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

/* ---------- 10. 长文排版 ---------- */
.prose {
  max-width: 68ch;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.prose h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.prose h2 { font-size: 1.375rem; }
.prose h3 { font-size: 1.125rem; }

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.375rem;
}

.prose a {
  color: var(--accent-pulse);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

/* ---------- 11. 图片占位容器 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-panel));
  border: 1px solid var(--line-thin);
  border-radius: 4px;
}

.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    115deg,
    transparent 0px,
    transparent 14px,
    rgba(0, 212, 255, 0.028) 14px,
    rgba(0, 212, 255, 0.028) 15px
  );
}

.image-frame-16-9 { aspect-ratio: 16 / 9; }
.image-frame-21-9 { aspect-ratio: 21 / 9; }
.image-frame-4-3 { aspect-ratio: 4 / 3; }
.image-frame-1-1 { aspect-ratio: 1 / 1; }

/* ---------- 12. 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-smooth),
              transform 0.6s var(--ease-smooth);
}

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

/* ---------- 13. 响应式 ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-12 {
    grid-template-columns: repeat(6, 1fr);
  }

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

  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8,
  .col-span-9,
  .col-span-12 {
    grid-column: span 6;
  }

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

  .footer-brand-box {
    grid-column: span 2;
  }
}

@media (max-width: 1023px) {
  .header-main-inner {
    flex-wrap: wrap;
    position: relative;
    min-height: 68px;
  }

  .header-brand {
    margin-right: auto;
  }

  .header-cta-desktop {
    display: none;
  }

  .header-cta-mobile {
    display: inline-flex;
    margin: 1rem 1.5rem 1.5rem;
    justify-content: center;
  }

  .header-toggle {
    display: inline-flex;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(18, 26, 45, 0.98);
    border-bottom: 1px solid var(--line-thin);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }

  .header-nav[data-open] {
    display: block;
  }

  .header-nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 0 0.25rem;
  }

  .header-nav-item a {
    display: block;
    padding: 0.875rem 1.5rem;
    border-left: 3px solid transparent;
    font-size: 1rem;
  }

  .header-nav-item a::after {
    display: none;
  }

  .header-nav-item a[aria-current="page"] {
    border-left-color: var(--accent-volt);
    background: rgba(139, 92, 246, 0.06);
  }

  .header-nav-item a:hover {
    background: rgba(0, 212, 255, 0.04);
  }

  .header-ticker-left {
    font-size: 0.6875rem;
  }
}

@media (max-width: 767px) {
  .container {
    padding-inline: 1rem;
  }

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

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

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .header-ticker-right {
    display: none;
  }

  .header-ticker-inner {
    justify-content: center;
  }

  .header-wordmark {
    font-size: 1.125rem;
  }

  .header-signature {
    font-size: 0.5625rem;
  }
}

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

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

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