/* ============ K1竞界 Shared Site CSS ============ */

:root {
  --c-deep: #0A0E17;
  --c-electric: #00A8FF;
  --c-neon: #39FF14;
  --c-night: #1A2233;
  --c-text: #F0F4F8;
  --c-ice: #E0F7FF;
  --c-violet: #7B61FF;
  --c-amber: #FFB800;
  --f-head: Impact, "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-mono: "Roboto Mono", Consolas, "Courier New", monospace;
  --f-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --content-max: 1440px;
  --radius: 6px;
  --time: 0.4s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

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

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

body {
  background:
    radial-gradient(ellipse at 75% -10%, rgba(0, 168, 255, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(123, 97, 255, 0.05) 0%, transparent 40%),
    var(--c-deep);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

input {
  font: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--c-electric);
  color: var(--c-deep);
}

:focus-visible {
  outline: 2px solid var(--c-neon);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 900;
  font-style: italic;
  line-height: 1.15;
  color: var(--c-ice);
  letter-spacing: -0.5px;
}

h4, h5, h6 {
  font-family: var(--f-body);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-ice);
}

h1 { font-size: clamp(48px, 8vw, 96px); }
h2 { font-size: clamp(30px, 5vw, 56px); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin: 0 0 1rem; }

/* ---------- Layout ---------- */

.container {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
}

.section {
  padding: 72px 0;
}

#main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  position: relative;
}

/* ---------- Grid ---------- */

.grid {
  display: grid;
  gap: 24px;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid var(--c-electric);
  border-radius: var(--radius);
  color: var(--c-electric);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}

.btn:hover {
  background: var(--c-electric);
  color: var(--c-deep);
  box-shadow: 0 0 24px rgba(0, 168, 255, 0.25);
}

.btn--primary {
  background: var(--c-electric);
  color: var(--c-deep);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.2);
}

.btn--primary:hover {
  background: var(--c-ice);
  box-shadow: 0 0 32px rgba(0, 168, 255, 0.35);
}

.btn--ghost {
  border-color: rgba(240, 244, 248, 0.2);
  color: rgba(240, 244, 248, 0.8);
}

.btn--ghost:hover {
  background: rgba(240, 244, 248, 0.08);
  color: var(--c-text);
  border-color: rgba(240, 244, 248, 0.4);
  box-shadow: none;
}

.btn--neon {
  border-color: var(--c-neon);
  color: var(--c-neon);
}

.btn--neon:hover {
  background: var(--c-neon);
  color: var(--c-deep);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.3);
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(240, 244, 248, 0.5);
  padding: 20px 0;
}

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

.breadcrumb__sep {
  color: rgba(240, 244, 248, 0.25);
}

/* ---------- Panel & Tags ---------- */

.panel-card {
  background: var(--c-night);
  border: 1px solid rgba(240, 244, 248, 0.08);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.panel-card:hover {
  border-color: rgba(0, 168, 255, 0.35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.data-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.data-tag--blue {
  background: rgba(0, 168, 255, 0.12);
  color: var(--c-electric);
}

.data-tag--green {
  background: rgba(57, 255, 20, 0.12);
  color: var(--c-neon);
}

.data-tag--amber {
  background: rgba(255, 184, 0, 0.12);
  color: var(--c-amber);
}

/* ---------- Media Placeholders ---------- */

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--c-night) 0%, var(--c-deep) 100%);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

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

/* ============ Header ============ */

.site-header {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.skip-link,
.site-sidebar,
.top-bar,
.nav-toggle {
  pointer-events: auto;
}

.frame-corner,
.scroll-progress {
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: -200px;
  left: var(--sidebar-w);
  z-index: 1000;
  background: var(--c-electric);
  color: var(--c-deep);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 16px rgba(0, 168, 255, 0.4);
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.frame-corner {
  position: fixed;
  width: 22px;
  height: 22px;
  z-index: 260;
}

.frame-corner--tl {
  top: 0;
  left: 0;
  border-top: 3px solid rgba(0, 168, 255, 0.85);
  border-left: 3px solid rgba(0, 168, 255, 0.85);
}

.frame-corner--bl {
  bottom: 0;
  left: 0;
  border-bottom: 3px solid rgba(57, 255, 20, 0.8);
  border-left: 3px solid rgba(57, 255, 20, 0.8);
}

/* ---------- Sidebar ---------- */

.site-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background:
    linear-gradient(rgba(0, 168, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, var(--c-deep) 0%, var(--c-night) 130%);
  background-size: 32px 32px, 32px 32px, auto;
  border-right: 1px solid rgba(0, 168, 255, 0.18);
  z-index: 210;
  transition: transform 0.45s var(--ease);
}

.site-sidebar::after {
  content: "";
  position: absolute;
  bottom: 64px;
  right: -40px;
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 97, 255, 0.45), transparent);
  transform: rotate(-45deg);
  pointer-events: none;
}

.site-sidebar__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 20px 20px;
  overflow-y: auto;
  scrollbar-width: none;
}

.site-sidebar__panel::-webkit-scrollbar {
  display: none;
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  flex-shrink: 0;
}

.brand__mark {
  font-family: var(--f-head);
  font-style: italic;
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  color: var(--c-electric);
  text-shadow: 0 0 24px rgba(0, 168, 255, 0.45);
  letter-spacing: -1px;
}

.brand__word {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 5px;
  transform: translateY(-1px);
}

/* ---------- Nav ---------- */

.site-nav {
  margin-top: 26px;
}

.site-nav__item {
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-left: 2px solid transparent;
  color: rgba(240, 244, 248, 0.62);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
}

.site-nav__link:hover {
  color: var(--c-electric);
  border-left-color: var(--c-electric);
  background: linear-gradient(90deg, rgba(0, 168, 255, 0.08), transparent);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-ice);
  border-left-color: var(--c-neon);
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.07), transparent);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 8px var(--c-neon);
}

.site-nav__idx {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-electric);
  opacity: 0.7;
  width: 20px;
  flex-shrink: 0;
}

.site-nav__name {
  white-space: nowrap;
}

/* ---------- Sidebar Core Entry ---------- */

.sidebar-stats {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-stats__title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240, 244, 248, 0.35);
  padding: 0 8px;
}

.sidebar-stats__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--c-ice);
  background: rgba(57, 255, 20, 0.04);
  border: 1px solid rgba(57, 255, 20, 0.12);
  border-radius: 4px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: default;
}

.sidebar-stats__item:hover {
  background: rgba(57, 255, 20, 0.09);
  border-color: rgba(57, 255, 20, 0.3);
}

.sidebar-stats__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--c-neon);
}

/* ---------- Sidebar Live / Version ---------- */

.sidebar-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 12px;
  border-left: 2px solid var(--c-electric);
  background: rgba(0, 168, 255, 0.05);
  border-radius: 0 4px 4px 0;
}

.sidebar-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
  animation: pulse-dot 2s ease-out infinite;
}

.sidebar-live__text {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(240, 244, 248, 0.55);
}

.sidebar-version {
  display: block;
  margin-top: 8px;
  padding: 8px 12px 0;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(240, 244, 248, 0.2);
  border-top: 1px solid rgba(240, 244, 248, 0.05);
}

/* ---------- Top Bar ---------- */

.top-bar {
  position: absolute;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: rgba(10, 14, 23, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  z-index: 205;
}

.top-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, var(--c-neon), transparent);
  pointer-events: none;
}

.top-bar__section {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-left: 16px;
}

.top-bar__section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--c-electric), var(--c-neon));
}

.top-bar__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
  animation: pulse-dot 2.4s ease-out infinite;
}

.top-bar__title {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-ice);
  font-weight: 500;
  text-shadow: 0 0 12px rgba(0, 168, 255, 0.3);
}

/* ---------- Search ---------- */

.top-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--c-night);
  border: 1px solid rgba(240, 244, 248, 0.1);
  border-radius: var(--radius);
  padding: 8px 14px;
  width: min(340px, 28vw);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.top-search:focus-within {
  border-color: var(--c-electric);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.12);
}

.top-search__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: rgba(240, 244, 248, 0.45);
}

.top-search__input {
  width: 100%;
  font-size: 13px;
  color: var(--c-text);
  background: transparent;
}

.top-search__input::placeholder {
  color: rgba(240, 244, 248, 0.3);
  letter-spacing: 0.5px;
}

/* ---------- Scroll Progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--c-electric), var(--c-neon));
  z-index: 400;
}

/* ---------- Nav Toggle ---------- */

.nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 310;
  width: 40px;
  height: 34px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--c-night);
  border: 1px solid rgba(0, 168, 255, 0.35);
  border-radius: 5px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav-toggle:hover {
  background: rgba(0, 168, 255, 0.1);
  border-color: var(--c-electric);
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-electric);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

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

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

/* ============ Footer ============ */

.site-footer {
  margin-left: var(--sidebar-w);
  background:
    radial-gradient(ellipse at 20% -20%, rgba(0, 168, 255, 0.06) 0%, transparent 60%),
    var(--c-deep);
  border-top: 1px solid rgba(0, 168, 255, 0.15);
  position: relative;
  padding: 56px 48px 24px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-electric) 0%, var(--c-violet) 40%, transparent 100%);
  pointer-events: none;
}

.site-footer__body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(240, 244, 248, 0.06);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 340px;
}

.brand--footer {
  padding-bottom: 0;
  border-bottom: none;
}

.brand--footer .brand__mark {
  font-size: 32px;
}

.brand--footer .brand__word {
  font-size: 15px;
}

.site-footer__trust {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(240, 244, 248, 0.45);
  margin: 0;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer__heading {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240, 244, 248, 0.38);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 168, 255, 0.15);
}

.site-footer__link {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  color: rgba(240, 244, 248, 0.65);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.site-footer__link:hover {
  color: var(--c-electric);
  padding-left: 6px;
}

.site-footer__contact {
  display: block;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 2;
  color: rgba(240, 244, 248, 0.6);
  letter-spacing: 0.5px;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 20px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(240, 244, 248, 0.35);
}

.site-footer__copy {
  color: rgba(240, 244, 248, 0.55);
}

.site-footer__year {
  color: rgba(0, 168, 255, 0.7);
}

.site-footer__note {
  letter-spacing: 0.5px;
}

/* ============ Reveal Motion ============ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ============ Keyframes ============ */

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(57, 255, 20, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(57, 255, 20, 0);
  }
}

/* ============ Responsive ============ */

@media (max-width: 1280px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
    --topbar-h: 56px;
  }

  .site-sidebar {
    width: 280px;
    transform: translateX(-102%);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.45);
  }

  .site-sidebar[data-open] {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .top-bar {
    padding: 0 16px 0 64px;
  }

  .top-search {
    width: min(240px, 38vw);
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-left: 0;
    padding: 40px 24px 18px;
  }

  .site-footer__body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer__col:last-child {
    grid-column: auto;
  }

  .site-footer__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .top-search {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .container {
    width: min(100% - 32px, var(--content-max));
  }
}

/* ============ Reduced Motion ============ */

@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;
    transform: none;
    transition: none;
  }
}
