/* ==========================================================
   雷火竞技场 / Thunderfire Arena — 全站共享样式 site.css
   ========================================================== */

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

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

body {
  min-height: 100vh;
  background: var(--tf-bg);
  color: var(--tf-text);
  font-family: var(--tf-f-body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tf-f-disp);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}

p, li, td { text-rendering: optimizeLegibility; }

ul, ol { list-style: none; }

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

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

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

button { cursor: pointer; }

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

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

/* ---------- 2. Theme Variables ---------- */
:root {
  --tf-bg: #0a0e27;
  --tf-bg-card: #0d1330;
  --tf-bg-deep: #070b1d;
  --tf-primary: #ff5a1e;
  --tf-primary-dark: #d94a12;
  --tf-accent: #f9d342;
  --tf-purple: #8a2be2;
  --tf-text: #f5f7fa;
  --tf-text-dim: #aab3c5;
  --tf-border: #1f2a4a;
  --tf-success: #00e5a0;
  --tf-danger: #ff477e;
  --tf-f-disp: 'Orbitron', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', ui-sans-serif, sans-serif;
  --tf-f-body: 'Noto Sans SC', 'Inter', 'PingFang SC', 'Microsoft YaHei', ui-sans-serif, sans-serif;
  --tf-radius: 8px;
  --tf-radius-lg: 14px;
  --tf-transition: .25s cubic-bezier(.4, 0, .2, 1);
  --tf-content: 1320px;
}

/* ---------- 3. Utility & Accessibility ---------- */
.container {
  width: 100%;
  max-width: var(--tf-content);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip-link {
  position: absolute;
  left: 14px;
  top: -120px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--tf-accent);
  color: var(--tf-bg);
  font-family: var(--tf-f-disp);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: top .2s ease;
}

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

/* ---------- 4. Typography System ---------- */
.tf-display {
  font-family: var(--tf-f-disp);
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: .05em;
}

.tf-h1 {
  font-family: var(--tf-f-disp);
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: .03em;
}

.tf-h2 {
  font-family: var(--tf-f-disp);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: .02em;
}

.tf-h3 {
  font-family: var(--tf-f-disp);
  font-size: 1.5rem;
  line-height: 1.4;
}

.tf-caption {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--tf-text-dim);
}

.tf-lede {
  max-width: 720px;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--tf-text-dim);
}

.tf-prose {
  max-width: 760px;
  margin-inline: auto;
  color: var(--tf-text-dim);
  font-size: 1rem;
  line-height: 1.9;
}

.tf-prose p { margin-bottom: 1.25em; }

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

.tf-prose h2, .tf-prose h3 { margin-top: 2em; margin-bottom: .6em; color: var(--tf-text); }

/* ---------- 5. Layout Components ---------- */
.main-content { min-height: 60vh; }

.tf-section { padding: 80px 0; }

.tf-section--tight { padding: 48px 0; }

.tf-section--hero { padding: 96px 0 120px; }

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

.tf-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tf-section-head {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.tf-kicker {
  font-family: var(--tf-f-disp);
  font-size: .75rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tf-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tf-kicker::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--tf-primary);
  transform: skewX(-20deg);
}

/* ---------- 6. Panels, Metrics, Tags ---------- */
.tf-panel {
  background: linear-gradient(135deg, var(--tf-bg-card), rgba(13, 19, 48, .92));
  border: 1px solid var(--tf-border);
  padding: 26px;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.tf-panel:hover {
  border-color: rgba(255, 90, 30, .6);
  box-shadow: 0 0 28px rgba(255, 90, 30, .12);
}

.tf-metric {
  display: block;
  font-family: var(--tf-f-disp);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--tf-accent);
}

.tf-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--tf-accent);
  background: rgba(249, 211, 66, .08);
  border: 1px solid rgba(249, 211, 66, .28);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

/* ---------- 7. Image Containers ---------- */
.img-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(138, 43, 226, .18) 0%, rgba(10, 14, 39, .25) 50%, rgba(249, 211, 66, .12) 100%),
    var(--tf-bg-card);
  border: 1px solid var(--tf-border);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.img-shell::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}

.img-shell--wide::before { padding-bottom: 40%; }

.img-shell--portrait::before { padding-bottom: 120%; }

.img-shell--square::before { padding-bottom: 100%; }

.img-shell img,
.img-shell picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  font-family: var(--tf-f-disp);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease, color .25s ease;
}

.btn-label { display: inline-block; }

.btn-primary {
  background: linear-gradient(135deg, var(--tf-primary), var(--tf-primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 90, 30, .35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 6px 26px rgba(255, 90, 30, .5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--tf-accent);
  box-shadow: inset 0 0 0 1px var(--tf-accent);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(249, 211, 66, .08);
  box-shadow: inset 0 0 0 2px var(--tf-accent);
}

.btn-header-cta {
  min-height: 36px;
  padding: 0 16px;
  background: var(--tf-primary);
  border: none;
  color: #fff;
  font-size: .8125rem;
  box-shadow: 0 2px 12px rgba(255, 90, 30, .4);
}

.btn-header-cta:hover {
  box-shadow: 0 4px 18px rgba(255, 90, 30, .55);
  transform: translateY(-1px);
}

/* ---------- 9. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 18px 0;
  font-size: .85rem;
  color: var(--tf-text-dim);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

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

.breadcrumb-item::after {
  content: '/';
  color: var(--tf-border);
}

.breadcrumb-item:last-child::after { display: none; }

.breadcrumb-item a {
  color: var(--tf-text-dim);
  transition: color .2s ease;
}

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

.breadcrumb-item[aria-current="page"] { color: var(--tf-text); }

/* ---------- 10. Header — Framework Navigation ---------- */
.tfc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tf-border);
}

.tfc-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tf-primary) 0 22%, var(--tf-accent) 42% 62%, var(--tf-purple) 80% 100%);
  z-index: 3;
}

.header-topline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.topline-clip {
  display: block;
  width: 16%;
  min-width: 120px;
  height: 100%;
  background: var(--tf-accent);
  animation: topline-slide 6s ease-in-out infinite;
}

@keyframes topline-slide {
  0% { transform: translateX(-145%) skewX(-22deg); }
  55% { transform: translateX(640%) skewX(-22deg); }
  100% { transform: translateX(-145%) skewX(-22deg); }
}

.scroll-progress {
  position: absolute;
  top: 4px;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  z-index: 3;
}

.scroll-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--tf-primary), var(--tf-accent));
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

/* Framework side rails */
.header-shell::before,
.header-shell::after {
  content: '';
  position: absolute;
  top: 28%;
  bottom: 0;
  width: 2px;
  pointer-events: none;
  z-index: 0;
  opacity: .7;
}

.header-shell::before {
  left: 8px;
  background: linear-gradient(180deg, var(--tf-accent) 0%, transparent 100%);
}

.header-shell::after {
  right: 8px;
  background: linear-gradient(180deg, var(--tf-primary) 0%, var(--tf-purple) 70%, transparent 100%);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  z-index: 1;
}

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

.brand-symbol {
  position: relative;
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  background: linear-gradient(135deg, var(--tf-primary), var(--tf-purple));
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  display: grid;
  place-items: center;
}

.brand-symbol-inner {
  width: 55%;
  height: 55%;
  background: var(--tf-accent);
  clip-path: polygon(60% 0, 100% 60%, 55% 50%, 35% 100%, 50% 40%, 0 40%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-cn {
  font-family: var(--tf-f-disp);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .1em;
  color: var(--tf-text);
}

.brand-en {
  display: block;
  font-family: var(--tf-f-disp);
  font-size: .55rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--tf-text-dim);
  margin-top: 3px;
}

.header-tagline {
  display: none;
  font-family: var(--tf-f-disp);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--tf-text-dim);
  padding-left: 18px;
  border-left: 1px solid var(--tf-border);
  white-space: nowrap;
}

.primary-nav {
  margin-left: 4px;
  z-index: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 10px 13px;
  font-family: var(--tf-f-disp);
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--tf-text-dim);
  transition: color .2s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--tf-primary);
  transform: translateX(-50%) skewX(-22deg);
  transition: width .25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--tf-text);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  width: 70%;
}

.nav-link[aria-current="page"] {
  color: var(--tf-accent);
}

.nav-link[aria-current="page"]::before {
  width: 70%;
  background: var(--tf-accent);
}

.nav-item-cta { display: none; }

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  width: 220px;
  padding-inline: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--tf-border);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  color: var(--tf-text-dim);
  transition: border-color .2s ease;
}

.header-search:focus-within {
  border-color: rgba(249, 211, 66, .55);
}

.search-glyph {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.search-glyph::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: var(--tf-text);
  font-size: .875rem;
}

.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-input::placeholder { color: var(--tf-text-dim); opacity: .8; }

.search-input:focus { outline: none; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--tf-border);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--tf-accent);
  transition: transform .25s ease, opacity .25s ease;
}

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

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

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

/* ---------- 11. Header Responsive ---------- */
@media (min-width: 1500px) {
  .header-tagline { display: block; }
}

@media (max-width: 1099px) {
  .header-shell::before,
  .header-shell::after { display: none; }

  .header-search { display: none; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-left: 0;
    background: linear-gradient(180deg, #0b1029 0%, #0a0e27 100%);
    border-top: 2px solid var(--tf-primary);
    border-bottom: 1px solid var(--tf-border);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height .32s ease, opacity .32s ease, transform .32s ease, visibility 0s linear .32s;
  }

  .primary-nav[data-open] {
    max-height: 500px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .32s ease, opacity .32s ease, transform .32s ease, visibility 0s;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
  }

  .nav-link {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(31, 42, 74, .55);
  }

  .nav-link::before { display: none; }

  .nav-link[aria-current="page"] {
    border-left: 3px solid var(--tf-primary);
    padding-left: 13px;
  }

  .nav-item-cta {
    display: block;
    padding-top: 14px;
  }

  .btn-mobile-cta {
    width: 100%;
    min-height: 44px;
  }

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

@media (max-width: 680px) {
  .btn-header-cta { display: none; }

  .brand-en { font-size: .48rem; letter-spacing: .22em; }

  .brand-cn { font-size: 1.2rem; letter-spacing: .08em; }
}

/* ---------- 12. Footer ---------- */
.tfc-footer {
  position: relative;
  background: var(--tf-bg-deep);
  border-top: 1px solid var(--tf-border);
  overflow: hidden;
}

.tfc-footer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(138, 43, 226, .14) 0%, transparent 72%);
  pointer-events: none;
}

.footer-angled {
  position: relative;
  z-index: 1;
  height: 6px;
  background: linear-gradient(90deg, var(--tf-primary) 0%, var(--tf-accent) 40%, var(--tf-purple) 75%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 140px) 100%, 0 100%);
}

.footer-shell {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: 48px;
  padding: 56px 0 42px;
}

.footer-brand .brand-logo { margin-bottom: 14px; }

.footer-tagline {
  font-family: var(--tf-f-disp);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tf-accent);
}

.footer-trust {
  margin-top: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--tf-purple);
  font-size: .85rem;
  line-height: 1.8;
  color: var(--tf-text-dim);
}

.footer-col-title {
  font-family: var(--tf-f-disp);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tf-accent);
  padding-bottom: 14px;
}

.footer-col-title::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  margin-top: 8px;
  background: var(--tf-primary);
  transform: skewX(-22deg);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--tf-text-dim);
  font-size: .9rem;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-link::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--tf-primary);
  transform: rotate(45deg);
  transition: background .2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--tf-text);
  padding-left: 4px;
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  background: var(--tf-accent);
}

.footer-contact-list li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: .9rem;
  color: var(--tf-text-dim);
}

.footer-contact-list li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--tf-primary);
  transform: translateY(9px) rotate(45deg);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding: 18px 0 30px;
  border-top: 1px solid var(--tf-border);
}

.footer-copy {
  font-size: .8rem;
  color: var(--tf-text-dim);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal-links a {
  font-size: .8rem;
  color: var(--tf-text-dim);
  transition: color .2s ease;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: var(--tf-accent);
}

.footer-icp {
  margin-left: auto;
  font-size: .8rem;
  color: var(--tf-text-dim);
}

/* ---------- 13. Footer Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

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

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-legal { gap: 12px 20px; }

  .footer-icp { margin-left: 0; }
}

/* ---------- 14. Reveal on Scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .55s ease, transform .55s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .topline-clip { display: none; }

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