/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0D0D0D;
  color: #E0E0E0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid #00F5D4; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto; } }

/* CSS Variables */
:root {
  --bg: #0D0D0D;
  --bg-light: #1A1A1A;
  --red: #E63946;
  --red-dark: #8B0000;
  --cyan: #00F5D4;
  --blue: #00B4D8;
  --accent: linear-gradient(135deg, #00F5D4, #00B4D8);
  --text: #E0E0E0;
  --text-high: #FFF5E1;
  --font-head: 'Impact', 'Oswald', sans-serif;
  --font-body: 'Inter', 'Roboto', -apple-system, sans-serif;
  --font-data: 'JetBrains Mono', 'Fira Code', monospace;
  --header-width: 260px;
  --transition: 0.3s ease;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--red);
  color: #fff;
  padding: 0.5rem 1.5rem;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Site Header (left sidebar) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-width);
  height: 100vh;
  background: var(--bg-light);
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}
.logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--text-high);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: inline-block;
}
.logo--footer { font-size: 1.2rem; margin-bottom: 1rem; }

.nav-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  z-index: 200;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.main-nav { width: 100%; }
.main-nav__list { display: flex; flex-direction: column; gap: 0.5rem; }
.main-nav__list a {
  display: block;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: 0.2s;
  position: relative;
}
.main-nav__list a:hover,
.main-nav__list a:focus-visible { color: var(--cyan); border-left-color: var(--cyan); background: rgba(0, 245, 212, 0.06); }
.main-nav__list a[aria-current="page"] {
  color: var(--red);
  border-left-color: var(--red);
  font-weight: 600;
}
.main-nav__cta-item { margin-top: 1rem; }
.main-nav__cta-item a { border-left: none; text-align: center; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: 0.2s;
}
.btn:hover, .btn:focus-visible { background: #c32e3a; transform: scale(1.02); }
.btn-cta {
  background: transparent;
  border: 2px solid;
  border-image: var(--accent) 1;
  color: var(--cyan);
  background: rgba(0,245,212,0.08);
}
.btn-cta:hover { background: rgba(0,245,212,0.2); border-image: none; border-color: var(--cyan); }

/* Mobile responsive */
@media (max-width: 768px) {
  .site-header {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-right: none;
    border-bottom: 1px solid #333;
    z-index: 100;
  }
  .logo { margin-bottom: 0; flex-shrink: 0; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(13,13,13,0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 99;
  }
  .main-nav__list { align-items: center; gap: 0.8rem; }
  .main-nav__list a { font-size: 1.2rem; padding: 0.6rem 1.5rem; }
  .main-nav[data-open] { transform: translateX(0); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .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: rotate(-45deg) translate(4px, -4px); }
}

/* Footer */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid #2a2a2a;
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer__brand { grid-column: 1 / 2; }
.footer__trust { font-size: 0.8rem; color: #aaa; line-height: 1.5; margin-top: 0.8rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__links a { color: var(--blue); font-size: 0.9rem; transition: 0.2s; }
.footer__links a:hover { color: var(--cyan); }
.footer__contact { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: #ccc; }
.footer__contact a { color: var(--cyan); }
.footer__address { font-size: 0.8rem; color: #888; margin-top: 0.5rem; grid-column: 1 / -1; }
.footer__copy { grid-column: 1 / -1; text-align: center; font-size: 0.85rem; color: #777; padding-top: 1rem; border-top: 1px solid #2a2a2a; margin-top: 1rem; }
@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__brand, .footer__links, .footer__contact { grid-column: 1; }
}

/* Common containers */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
#main-content { min-height: 60vh; }

/* Image placeholder base (for page-level use) */
.img-placeholder {
  background: var(--bg-light);
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 0.8rem;
  min-height: 120px;
}
.img-placeholder::before { content: attr(data-label) " (即将展示)"; }

/* Utility: data accent */
.data-highlight {
  font-family: var(--font-data);
  color: var(--cyan);
  background: rgba(0,245,212,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
}

/* Breadcrumbs (shared) */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--blue); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs .current { color: var(--text); }

/* Page heading */
.page-title {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-high);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
@media (max-width: 768px) {
  .page-title { font-size: 2rem; }
}

/* Scroll-to-top button (JS controlled) */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 90;
  cursor: pointer;
}
.scroll-top[data-visible] { opacity: 0.85; visibility: visible; }
.scroll-top:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .scroll-top { transition: none; }
}
