/* ========== Reset & Variables ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #0C1126;
  --bg-card: #1D2C6E;
  --bg-dark: #06080F;
  --line: #2B3A73;
  --green: #00FF9C;
  --gold: #F5B942;
  --cyan: #00D4FF;
  --white: #F0F4FF;
  --muted: #8A96BE;
  --red: #FF4D4D;
  --container: 1200px;
  --header-h: 72px;
  --font-display: 'DIN Alternate', 'Barlow Condensed', 'Noto Sans SC', sans-serif;
  --font-body: system-ui, 'Noto Sans SC', 'PingFang SC', sans-serif;
  --radius: 2px;
  --shadow: 0 18px 40px rgba(6, 8, 15, 0.5);
  --duration: 0.35s;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--white);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--duration) ease;
}

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

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

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

::selection {
  background: var(--green);
  color: #06080F;
}

/* ========== Accessibility ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10001;
  background: var(--green);
  color: #06080F;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

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

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

#scroll-progress div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  #scroll-progress {
    display: none;
  }
}

/* ========== Layout ========== */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ========== Button System ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 12px 24px;
  background: var(--green);
  color: #06080F;
  border-radius: var(--radius);
  transition: background var(--duration) ease, transform 0.2s ease, box-shadow var(--duration) ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  background: #8df5cf;
  color: #06080F;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 156, 0.2);
}

.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

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

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 185, 66, 0.06);
  box-shadow: none;
}

.btn-gold {
  background: var(--gold);
  color: #06080F;
}

.btn-gold:hover {
  background: #ffce70;
  color: #06080F;
}

/* ========== Tag ========== */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tag-green {
  color: var(--green);
  background: rgba(0, 255, 156, 0.08);
  border-color: rgba(0, 255, 156, 0.4);
}

.tag-gold {
  color: var(--gold);
  background: rgba(245, 185, 66, 0.08);
  border-color: rgba(245, 185, 66, 0.4);
}

.tag-cyan {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.3);
}

.tag-red {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

/* ========== Section Common ========== */
.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
  position: relative;
  text-transform: uppercase;
}

.section-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--green), transparent);
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

.section-title-light {
  color: #fff;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 12px;
  max-width: 640px;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 0;
}

.breadcrumb a {
  color: var(--cyan);
}

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

.breadcrumb span.separator {
  margin: 0 4px;
  color: var(--muted);
  opacity: 0.6;
}

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

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-h);
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(12, 17, 38, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(43, 58, 115, 0.4);
  box-shadow: 0 8px 30px rgba(6, 8, 15, 0.35);
}

.header-inner {
  max-width: var(--container);
  height: 100%;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand:hover {
  color: var(--white);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  color: var(--green);
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.15), rgba(0, 212, 255, 0.1));
  border: 1px solid rgba(0, 255, 156, 0.4);
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
}

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

.brand-cn {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.22em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 2px;
  align-items: center;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  border-radius: 2px;
  letter-spacing: 0.02em;
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.nav-list a:hover {
  color: var(--green);
}

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

.nav-list a[aria-current="page"] {
  color: var(--green);
  font-weight: 700;
}

.btn-header {
  font-size: 0.85rem;
  padding: 10px 18px;
  white-space: nowrap;
}

/* ========== Mobile Header ========== */
@media (max-width: 920px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    padding: 100px 32px 40px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: -20px 0 50px rgba(6, 8, 15, 0.6);
    overflow-y: auto;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
  }

  .nav-list a {
    display: block;
    padding: 14px 12px;
    font-size: 1.1rem;
    border-left: 3px solid transparent;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a[aria-current="page"] {
    border-left-color: var(--green);
    background: rgba(0, 255, 156, 0.06);
  }

  .btn-header {
    width: 100%;
    margin-top: auto;
  }
}

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--green) 0%, var(--cyan) 40%, var(--gold) 100%);
  opacity: 0.7;
}

.footer-top {
  max-width: var(--container);
  margin-inline: auto;
  padding: 64px 20px 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.brand-mark-large {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.footer-about {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 420px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  position: relative;
  padding-left: 12px;
}

.footer-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 3px;
  height: 14px;
  background: var(--gold);
}

.footer-links ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--green);
  padding-left: 4px;
}

.footer-contact li {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding: 24px 20px;
  border-top: 1px solid rgba(43, 58, 115, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-icp {
  letter-spacing: 0.08em;
}

/* ========== Card Grid ========== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-cards .card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.grid-cards .card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 156, 0.4);
  box-shadow: var(--shadow);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.card-price {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.card-note {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ========== Data Table ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(43, 58, 115, 0.5);
}

.data-table th {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(0, 255, 156, 0.05);
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td {
  color: var(--white);
}

/* ========== Tabs ========== */
.tab-system {
  margin-bottom: 32px;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 2px 2px 0 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab-button:hover {
  color: var(--green);
}

.tab-button[aria-selected="true"] {
  color: var(--green);
  border-bottom-color: var(--green);
  background: rgba(0, 255, 156, 0.05);
}

.tab-panel {
  display: none;
  animation: fade-in 0.3s ease;
}

.tab-panel[data-active="true"] {
  display: block;
}

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

@media (prefers-reduced-motion: reduce) {
  .tab-panel {
    animation: none;
  }
}

/* ========== Image Placeholder ========== */
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 60%), repeating-linear-gradient(0deg, transparent, transparent 20px, var(--line) 20px, var(--line) 21px), repeating-linear-gradient(90deg, transparent, transparent 20px, var(--line) 20px, var(--line) 21px);
  opacity: 0.3;
  pointer-events: none;
}

.image-frame .placeholder-label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

/* ========== Alert Live ========== */
.alert-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.alert-live::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 0 6px rgba(255, 77, 77, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .alert-live::before {
    animation: none;
  }
}

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

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

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .section {
    padding: 56px 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

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

  .header-inner {
    padding-inline: 16px;
  }

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

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 920px) and (prefers-reduced-motion: reduce) {
  .site-nav {
    transition: none;
  }
}
