@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #000000;
  color: #00ff80;
}

body {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.6;
  background: #000000;
  color: #00ff80;
  overflow-x: hidden;
}

a {
  color: #00ff80;
  text-decoration: none;
  transition: none;
}

a:hover, a:focus {
  color: #ffffff;
  background: #0000ff;
  outline: 2px solid #00ff80;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syncopate', 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: #ffffff;
}

p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 1rem;
}

small {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0000ff;
  background: #00ff80;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 6px;
}

div {
  scroll-margin-top: 100px;
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */
.site-wrapper {
  min-height: 100vh;
  border: 3px solid #00ff80;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  border-bottom: 4px solid #00ff80;
  background: #000000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 64px;
  border-bottom: 2px solid #0000ff;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  outline: none;
  background: none;
}

.brand-link:hover, .brand-link:focus {
  background: none;
  outline: 2px solid #00ff80;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  font-family: 'Syncopate', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid #00ff80;
}

.search-input {
  background: #000000;
  color: #00ff80;
  border: none;
  padding: 8px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  width: 200px;
  outline: none;
}

.search-input::placeholder {
  color: #006633;
}

.search-btn {
  background: #00ff80;
  color: #000000;
  border: none;
  padding: 8px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
  transition: none;
}

.search-btn:hover, .search-btn:focus {
  background: #0000ff;
  color: #ffffff;
  outline: 2px solid #00ff80;
}

/* Nav row */
.header-nav-row {
  background: #0000ff;
  padding: 0 24px;
}

.nav-aside {
  width: 100%;
}

.nav-aside > nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-aside > nav > ul > li > a {
  display: block;
  padding: 14px 18px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-right: 2px solid #00ff80;
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: none;
}

.nav-aside > nav > ul > li > a:hover,
.nav-aside > nav > ul > li > a:focus {
  background: #00ff80;
  color: #000000;
  outline: none;
}

.nav-aside > nav > ul > li:first-child > a {
  border-left: 2px solid #00ff80;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-block {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  border-bottom: 4px solid #00ff80;
  overflow: hidden;
  background: #000000;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#00ff8015 1px, transparent 1px),
    linear-gradient(90deg, #00ff8015 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 70vh;
}

.hero-media {
  border-right: 4px solid #00ff80;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  min-height: 70vh;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #0000ff 0px,
    #0000ff 10px,
    #000 10px,
    #000 20px
  );
}

.hero-img-placeholder span {
  font-family: 'Syncopate', monospace;
  font-size: 48px;
  font-weight: 700;
  color: #00ff80;
  opacity: 0.5;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  text-align: center;
  gap: 20px;
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #000;
  background: #00ff80;
  padding: 4px 12px;
  display: inline-block;
}

.hero-text h1 {
  font-size: clamp(24px, 4vw, 56px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  word-break: break-all;
}

.hero-desc {
  font-size: 16px;
  color: #00ff80;
  line-height: 1.6;
  max-width: 360px;
  margin-bottom: 0;
}

.hero-cta {
  display: inline-block;
  background: #0000ff;
  color: #ffffff;
  border: 3px solid #00ff80;
  padding: 14px 32px;
  font-family: 'Syncopate', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 48px;
  transition: none;
}

.hero-cta:hover, .hero-cta:focus {
  background: #00ff80;
  color: #000000;
  outline: 3px solid #ffffff;
}

/* ============================================================
   CONTENT LAYOUT
   ============================================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  min-height: 60vh;
  border-bottom: 4px solid #00ff80;
}

.site-main {
  border-right: 3px solid #00ff80;
}

.main-article {
  padding: 0;
}

.main-article > div {
  padding: 40px 40px;
  border-bottom: 2px solid #0000ff;
}

/* ============================================================
   PAGE CONTENT (从 S3 注入的 HTML)
   ============================================================ */
.page-content-section {
  color: #00ff80;
}

.page-content-section h2 {
  font-size: clamp(20px, 2.5vw, 32px);
  border-left: 6px solid #0000ff;
  padding-left: 16px;
  margin: 40px 0 16px;
  color: #ffffff;
}

.page-content-section h3 {
  font-size: clamp(16px, 2vw, 24px);
  color: #00ff80;
  margin: 28px 0 12px;
  border-bottom: 1px solid #00ff8040;
  padding-bottom: 6px;
}

.page-content-section p {
  color: #ccffdd;
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.page-content-section ul,
.page-content-section ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 1rem;
  color: #ccffdd;
}

.page-content-section li {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.6;
}

.page-content-section a {
  color: #00ff80;
  border-bottom: 1px solid #00ff80;
}

.page-content-section a:hover,
.page-content-section a:focus {
  color: #000;
  background: #00ff80;
}

.page-content-section strong {
  color: #ffffff;
  font-weight: 700;
}

.page-content-section div {
  margin-bottom: 0;
  padding: 32px 0;
  border-bottom: 2px solid #00ff8030;
}

.page-content-section div:last-child {
  border-bottom: none;
}

.page-content-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 15px;
}

.page-content-section th {
  background: #0000ff;
  color: #ffffff;
  padding: 10px 14px;
  text-align: left;
  border: 2px solid #00ff80;
  font-family: 'Syncopate', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.page-content-section td {
  padding: 10px 14px;
  border: 1px solid #00ff8040;
  color: #ccffdd;
  vertical-align: top;
}

.page-content-section tr:nth-child(even) td {
  background: #00ff8008;
}

/* ============================================================
   ASIDE (右侧边栏)
   ============================================================ */
.content-aside {
  background: #000;
  padding: 0;
}

.aside-block {
  padding: 28px 24px;
  border-bottom: 2px solid #00ff80;
}

.aside-eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  background: #0000ff;
  color: #fff;
  padding: 3px 8px;
  margin-bottom: 8px;
  display: inline-block;
}

.aside-title {
  font-size: 16px;
  margin-bottom: 16px;
  color: #ffffff;
}

.aside-subtitle {
  font-size: 14px;
  margin-bottom: 12px;
  color: #00ff80;
}

.aside-block nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-block nav ul li a {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  color: #00ff80;
  border: 1px solid #00ff8030;
  border-left: 3px solid #0000ff;
  transition: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-block nav ul li a:hover,
.aside-block nav ul li a:focus {
  background: #0000ff;
  color: #fff;
  border-color: #0000ff;
  outline: none;
}

.aside-notice {
  background: #0000ff10;
}

.aside-notice p {
  font-size: 13px;
  color: #aaccaa;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #000000;
  border-top: 4px solid #00ff80;
}

.footer-cta-block {
  background: #0000ff;
  border-bottom: 4px solid #00ff80;
  padding: 48px 40px;
  text-align: center;
}

.footer-cta-inner small {
  font-size: 11px;
  letter-spacing: 0.2em;
  background: #00ff80;
  color: #000;
  padding: 3px 10px;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-cta-inner h2 {
  font-size: clamp(20px, 3vw, 36px);
  color: #ffffff;
  margin: 12px 0 24px;
}

.footer-cta-btn {
  display: inline-block;
  background: #00ff80;
  color: #000000;
  border: 3px solid #ffffff;
  padding: 16px 40px;
  font-family: 'Syncopate', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 52px;
  transition: none;
}

.footer-cta-btn:hover, .footer-cta-btn:focus {
  background: #ffffff;
  color: #0000ff;
  outline: 3px solid #00ff80;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 2px solid #00ff8040;
}

.footer-col {
  padding: 32px 32px;
  border-right: 1px solid #00ff8030;
}

.footer-col:last-child {
  border-right: none;
}

.footer-brand {
  font-family: 'Syncopate', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-address {
  font-style: normal;
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.7;
}

.footer-address a {
  color: #00ff80;
}

.footer-col-title {
  font-family: 'Syncopate', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #0000ff;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col ul li a {
  font-size: 14px;
  color: #00ff80;
  padding: 6px 0;
  display: inline-block;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #00ff8020;
  width: 100%;
}

.footer-col ul li a:hover,
.footer-col ul li a:focus {
  color: #000;
  background: #00ff80;
  padding-left: 8px;
  outline: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-top: 1px solid #00ff8040;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: #666666;
}

.footer-bottom-links ul {
  display: flex;
  gap: 16px;
}

.footer-bottom-links ul li a {
  font-size: 13px;
  color: #666666;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-bottom-links ul li a:hover,
.footer-bottom-links ul li a:focus {
  color: #00ff80;
  background: none;
  outline: none;
}

/* ============================================================
   CARD STYLES (如果 content 有卡片)
   ============================================================ */
.card {
  border: 2px solid #00ff80;
  border-radius: 0;
  background: #000;
  box-shadow: 4px 4px 0 #00ff80;
  padding: 20px;
  transition: none;
}

.card:hover {
  box-shadow: 8px 8px 0 #0000ff;
}

/* ============================================================
   STAGGER LIST ANIMATION
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .stagger-list li {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.4s forwards;
  }
  .stagger-list li:nth-child(1) { animation-delay: 0.05s; }
  .stagger-list li:nth-child(2) { animation-delay: 0.10s; }
  .stagger-list li:nth-child(3) { animation-delay: 0.15s; }
  .stagger-list li:nth-child(4) { animation-delay: 0.20s; }
  .stagger-list li:nth-child(5) { animation-delay: 0.25s; }
  .stagger-list li:nth-child(6) { animation-delay: 0.30s; }
  .stagger-list li:nth-child(7) { animation-delay: 0.35s; }

  @keyframes staggerIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .site-main {
    border-right: none;
    border-bottom: 3px solid #00ff80;
  }

  .content-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-media {
    border-right: none;
    border-bottom: 4px solid #00ff80;
    min-height: 40vh;
  }

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

  .footer-col:nth-child(3) {
    border-top: 1px solid #00ff8030;
    grid-column: span 2;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE 375px
   ============================================================ */
@media (max-width: 600px) {
  html {
    scroll-behavior: smooth;
  }

  .site-wrapper {
    border-width: 2px;
  }

  .header-brand-row {
    padding: 0 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: auto;
  }

  .brand-text {
    font-size: 16px;
  }

  .search-input {
    width: 140px;
    font-size: 13px;
  }

  .header-nav-row {
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-aside > nav > ul {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .nav-aside > nav > ul > li > a {
    padding: 12px 14px;
    font-size: 11px;
    min-height: 44px;
    border-right-width: 1px;
  }

  .hero-block {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media {
    min-height: 240px;
    max-height: 320px;
  }

  .hero-text {
    padding: 32px 20px;
    gap: 16px;
  }

  .hero-text h1 {
    font-size: clamp(20px, 6vw, 32px);
  }

  .main-article > div {
    padding: 24px 20px;
  }

  .page-content-section h2 {
    font-size: 18px;
  }

  .page-content-section h3 {
    font-size: 16px;
  }

  .content-aside {
    display: block;
  }

  .aside-block {
    padding: 20px 16px;
  }

  .footer-cta-block {
    padding: 32px 20px;
  }

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

  .footer-col {
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid #00ff8030;
  }

  .footer-col:nth-child(3) {
    grid-column: auto;
    border-top: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 8px;
  }

  div {
    scroll-margin-top: 120px;
  }
}
