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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(123, 47, 247, 0.12), transparent 45%),
    radial-gradient(ellipse at 15% 90%, rgba(0, 255, 136, 0.05), transparent 40%),
    var(--c-bg-deep);
  color: var(--c-text);
  font-family: "Roboto", "Noto Sans SC", "Source Han Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:root {
  --c-bg-deep: #0A1128;
  --c-bg-card: #1C1C1C;
  --c-glass: rgba(255, 255, 255, 0.08);
  --c-glass-strong: rgba(255, 255, 255, 0.14);
  --c-green: #00FF88;
  --c-green-dim: rgba(0, 255, 136, 0.25);
  --c-gold: #FFD700;
  --c-purple: #7B2FF7;
  --c-text: #F5F5F5;
  --c-text-dim: rgba(245, 245, 245, 0.72);
  --c-text-mute: rgba(245, 245, 245, 0.48);
  --c-red: #FF3B30;
  --c-line: rgba(255, 255, 255, 0.1);
  --font-heading: "Orbitron", "Rajdhani", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Roboto", "Noto Sans SC", "Source Han Sans", sans-serif;
  --font-index: "Courier New", "Roboto Mono", monospace;
  --header-w: 280px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;
  --radius: 4px;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 18px 52px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 136, 0.18);
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

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

a {
  color: var(--c-green);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
  color: var(--c-green);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

ul,
ol {
  list-style: none;
}

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

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ===== Skip Link ===== */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  z-index: 2000;
  padding: var(--space-2) var(--space-4);
  background: var(--c-green);
  color: var(--c-bg-deep);
  font-weight: 700;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
  text-decoration: none;
}

/* ===== Scroll Progress ===== */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: transparent;
  z-index: 3000;
  pointer-events: none;
}

.progress-track::after {
  content: "";
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-green), var(--c-gold));
  transition: width 0.05s linear;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-w);
  height: 100vh;
  z-index: 1000;
  background:
    linear-gradient(160deg, rgba(123, 47, 247, 0.12), transparent 38%),
    rgba(10, 17, 40, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
}

.header-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-5) var(--space-4);
}

.brand-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: var(--space-4);
  position: relative;
}

.brand-box::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 64px;
  height: 2px;
  background: var(--c-green);
}

.brand-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--c-text);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green-dim);
  flex-shrink: 0;
}

a.brand-logo:hover {
  color: var(--c-text);
  text-decoration: none;
}

.brand-badge {
  font-family: var(--font-index);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--c-gold);
  border: 1px solid rgba(255, 215, 0, 0.45);
  padding: 0.1rem 0.6rem;
  border-radius: 2px;
  width: fit-content;
  background: rgba(255, 215, 0, 0.06);
}

.nav-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--c-text);
  font-size: 0.98rem;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.site-nav a:hover {
  color: var(--c-green);
  background: rgba(0, 255, 136, 0.06);
  border-left-color: var(--c-green);
  padding-left: 1rem;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--c-green);
  border-left-color: var(--c-green);
  background: rgba(0, 255, 136, 0.08);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.header-coord {
  margin-top: auto;
  padding-top: var(--space-4);
  font-family: var(--font-index);
  font-size: 0.68rem;
  color: var(--c-text-mute);
  letter-spacing: 0.08em;
  line-height: 1.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--c-line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-line);
  margin-top: var(--space-4);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--c-green);
  color: var(--c-bg-deep);
  font-weight: 700;
  border: 1px solid var(--c-green);
}

.btn-primary:hover {
  background: #4dffad;
  border-color: #4dffad;
  box-shadow: 0 4px 18px rgba(0, 255, 136, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-line);
}

.btn-ghost:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--c-gold);
  color: #0A1128;
  font-weight: 700;
  border: 1px solid var(--c-gold);
}

.btn-gold:hover {
  background: #ffe14d;
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.25);
  transform: translateY(-1px);
}

.btn-remind {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--c-text-dim);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.search-trigger:hover {
  color: var(--c-green);
  border-color: var(--c-green);
  background: rgba(0, 255, 136, 0.06);
}

/* ===== Mobile Nav Toggle ===== */
.nav-toggle {
  display: none;
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-glass);
  z-index: 5;
}

.nav-toggle-line {
  width: 20px;
  height: 2px;
  background: var(--c-text);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-toggle-label {
  font-family: var(--font-index);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--c-text-dim);
}

/* ===== Footer ===== */
.site-footer {
  background:
    linear-gradient(345deg, rgba(123, 47, 247, 0.12), transparent 30%),
    rgba(10, 17, 40, 0.96);
  border-top: 1px solid var(--c-line);
  padding: var(--space-7) var(--space-5) var(--space-4);
  margin-left: var(--header-w);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green) 0%, var(--c-purple) 60%, transparent 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--space-5);
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: var(--space-5);
}

.footer-brand .brand-logo {
  font-size: 1.3rem;
  margin-bottom: var(--space-3);
}

.footer-trust {
  font-size: 0.9rem;
  color: var(--c-text-dim);
  max-width: 44ch;
  line-height: 1.7;
}

.footer-nav ul,
.footer-contact ul {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a,
.footer-contact a {
  color: var(--c-text-dim);
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--c-green);
  padding-left: 0.2rem;
  text-decoration: none;
}

.footer-contact li {
  color: var(--c-text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

.index-label {
  font-family: var(--font-index);
  font-size: 0.78rem;
  color: var(--c-green);
  letter-spacing: 0.08em;
}

.footer-contact .index-label {
  color: var(--c-gold);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-family: var(--font-index);
  font-size: 0.78rem;
  color: var(--c-text-mute);
  letter-spacing: 0.04em;
}

/* ===== Main Content Shell ===== */
.content-shell {
  max-width: 1400px;
  margin-left: calc(var(--header-w) + var(--space-5));
  margin-right: var(--space-5);
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-index);
  font-size: 0.8rem;
  color: var(--c-text-mute);
  margin-bottom: var(--space-4);
}

.breadcrumbs a {
  color: var(--c-text-dim);
}

.breadcrumbs a:hover {
  color: var(--c-green);
}

.breadcrumbs [aria-current="page"] {
  color: var(--c-green);
}

/* ===== Panels & Cards ===== */
.panel {
  background: linear-gradient(150deg, rgba(28, 28, 28, 0.9), rgba(28, 28, 28, 0.72));
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 255, 136, 0.3);
}

.panel-accent {
  border-top: 3px solid var(--c-green);
}

.panel-accent-purple {
  border-top: 3px solid var(--c-purple);
}

.panel-accent-gold {
  border-top: 3px solid var(--c-gold);
}

.panel h1,
.panel h2,
.panel h3,
.panel h4 {
  font-family: var(--font-heading);
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--c-text);
  line-height: 1.25;
}

h1 {
  font-size: 2.4rem;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: 1.7rem;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-2);
}

p {
  color: var(--c-text-dim);
  margin-bottom: var(--space-3);
}

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

/* ===== Data Grid ===== */
.data-grid {
  display: grid;
  gap: var(--space-4);
}

.data-grid[data-cols="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-grid[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-grid[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ===== Image Containers ===== */
.image-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, var(--c-glass), rgba(28, 28, 28, 0.6));
  border: 1px solid var(--c-line);
  aspect-ratio: 16 / 9;
}

.image-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.image-frame:hover > img {
  transform: scale(1.03);
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 17, 40, 0.25), transparent 40%);
  pointer-events: none;
}

.image-frame[data-ratio="4/3"] {
  aspect-ratio: 4 / 3;
}

.image-frame[data-ratio="21/9"] {
  aspect-ratio: 21 / 9;
}

/* ===== Decor Lines ===== */
.speed-line {
  height: 1px;
  background: linear-gradient(90deg, var(--c-green), transparent);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.speed-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.5), transparent);
  animation: speed-sweep 3.2s ease-in-out infinite;
}

@keyframes speed-sweep {
  0% {
    left: -40%;
  }
  100% {
    left: 110%;
  }
}

/* ===== Motion Preferences ===== */
@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;
  }

  .speed-line::after {
    display: none;
  }

  .progress-track::after {
    transition: none;
  }
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 1280px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

@media (max-width: 992px) {
  :root {
    --header-w: 0px;
  }

  .site-header {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--c-line);
    background: rgba(10, 17, 40, 0.96);
  }

  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .brand-box {
    margin: 0;
    padding: 0;
    border: 0;
    flex: 1;
  }

  .brand-box::after {
    display: none;
  }

  .brand-badge {
    font-size: 0.62rem;
  }

  .nav-toggle {
    display: flex;
    position: static;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    order: 3;
    background: rgba(10, 17, 40, 0.98);
    border-top: 1px solid var(--c-line);
    padding-top: var(--space-3);
    margin-top: var(--space-2);
  }

  .site-header[data-open] .nav-panel {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
  }

  .site-nav a {
    padding: 0.7rem var(--space-3);
    border-left: 2px solid transparent;
    border-radius: 0 2px 2px 0;
  }

  .header-coord {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
  }

  .header-actions {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    margin: 0;
  }

  .search-trigger {
    display: none;
  }

  .content-shell {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    padding-top: var(--space-4);
  }

  .site-footer {
    margin-left: 0;
    padding: var(--space-5) var(--space-4) var(--space-4);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  .data-grid[data-cols="3"],
  .data-grid[data-cols="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .brand-logo {
    font-size: 1.2rem;
  }

  .brand-badge {
    display: none;
  }

  .btn-remind {
    font-size: 0.76rem;
    padding: 0.4rem 0.6rem;
  }

  .header-inner {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .header-actions {
    width: auto;
  }
}
