@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-green: #00ff80;
  --c-blue: #0000ff;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-yellow: #ffff00;
  --c-dark-bg: #050510;
  --c-card-bg: rgba(0, 0, 255, 0.08);
  --nav-h: 64px;
  --font-main: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --scroll-mt: 80px;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  background: var(--c-dark-bg);
  color: var(--c-white);
  font-family: var(--font-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-dark-bg);
}

a {
  color: var(--c-green);
  text-decoration: none;
  transition: none;
}

a:hover {
  color: var(--c-yellow);
  text-decoration: underline;
}

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

ol, ul {
  list-style: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

/* ===== 底部固定导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--c-black);
  border-top: 3px solid var(--c-green);
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
}

.bottom-nav > ol {
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.bottom-nav > ol::-webkit-scrollbar {
  display: none;
}

.bottom-nav > ol > li {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.bottom-nav > ol > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-white);
  border-right: 2px solid #111;
  white-space: nowrap;
  min-height: 48px;
  height: 100%;
  letter-spacing: 0.03em;
  font-family: var(--font-main);
}

.bottom-nav > ol > li > a:hover {
  background: var(--c-blue);
  color: var(--c-green);
  text-decoration: none;
}

.bottom-nav > ol > li.brand-item {
  border-right: 3px solid var(--c-green);
}

.brand-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  min-height: 48px;
  height: 100%;
}

.brand-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-text-icon {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-green);
  font-family: var(--font-main);
  letter-spacing: -1px;
}

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

/* 搜索框 */
.search-item {
  margin-left: auto;
  border-left: 2px solid #222;
  display: flex;
  align-items: stretch;
}

.nav-search-form {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  gap: 6px;
}

.nav-search-input {
  background: #111;
  border: 2px solid var(--c-blue);
  color: var(--c-white);
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  border-radius: 0;
  width: 130px;
  min-height: 40px;
  height: 40px;
}

.nav-search-input:focus {
  border-color: var(--c-green);
}

.nav-search-btn {
  background: var(--c-green);
  border: 2px solid var(--c-black);
  color: var(--c-black);
  cursor: pointer;
  padding: 0 10px;
  font-size: 1rem;
  min-height: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-weight: 700;
}

.nav-search-btn:hover {
  background: var(--c-yellow);
}

/* ===== Hero ===== */
.hero-wrap {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 40px 32px 120px;
  background: var(--c-dark-bg);
}

/* 点阵底纹 */
.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--c-blue) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.35;
  z-index: 0;
}

/* 双图错位拼贴 */
.hero-images-collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-img {
  position: absolute;
  object-fit: cover;
  border: 4px solid var(--c-black);
}

.hero-img-1 {
  width: 52%;
  height: 62%;
  top: 6%;
  left: 2%;
  border-color: var(--c-green);
  filter: saturate(1.3) contrast(1.1);
  z-index: 2;
}

.hero-img-2 {
  width: 44%;
  height: 55%;
  top: 22%;
  left: 30%;
  border-color: var(--c-blue);
  filter: saturate(0.7) contrast(1.2) hue-rotate(200deg);
  z-index: 3;
  opacity: 0.85;
}

/* 文案右对齐 */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: right;
  max-width: 520px;
  background: rgba(5, 5, 16, 0.82);
  border: 3px solid var(--c-green);
  padding: 28px 28px 28px 32px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.15;
  margin-bottom: 14px;
  font-family: var(--font-main);
  text-shadow: 3px 3px 0 var(--c-blue);
}

.hero-sub {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 28px;
  min-height: 48px;
  border: 3px solid var(--c-black);
  border-radius: 4px;
  letter-spacing: 0.05em;
  font-family: var(--font-main);
  box-shadow: 4px 4px 0 var(--c-black);
}

.hero-cta:hover {
  background: var(--c-yellow);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--c-blue);
}

/* ===== 主体布局 ===== */
.main-content {
  padding-bottom: calc(var(--nav-h) + 40px);
  padding-top: 40px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* ===== 侧边栏（左侧） ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

.sidebar-inner {
  background: var(--c-card-bg);
  border: 3px solid var(--c-blue);
  border-radius: 4px;
  padding: 20px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  border-bottom: 2px solid var(--c-blue);
  padding-bottom: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  counter-reset: sidebar-cnt;
}

.sidebar-nav li {
  counter-increment: sidebar-cnt;
}

.sidebar-nav li a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-white);
  padding: 6px 8px;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.sidebar-nav li a::before {
  content: counter(sidebar-cnt, decimal-leading-zero) " ";
  color: var(--c-green);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.sidebar-nav li a:hover {
  border-left-color: var(--c-green);
  background: rgba(0, 255, 128, 0.07);
  color: var(--c-green);
  text-decoration: none;
}

.sidebar-badge {
  margin-top: 18px;
  border-top: 2px solid var(--c-blue);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.badge-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-green);
  font-family: var(--font-main);
  line-height: 1;
}

.badge-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.1em;
}

/* ===== 正文内容区 ===== */
.content-section {
  flex: 1;
  min-width: 0;
}

.content-article {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  color: #e8e8e8;
}

/* div 区块 */
.content-article div,
div {
  scroll-margin-top: var(--scroll-mt);
  padding: 40px 0;
  border-bottom: 2px solid #111;
  position: relative;
}

div:last-child {
  border-bottom: none;
}

/* h1 */
h1 {
  font-family: var(--font-main);
  font-weight: 700;
}

/* h2 标题 */
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 20px;
  font-family: var(--font-main);
  line-height: 1.25;
  position: relative;
  display: inline-block;
}

h2 > span {
  display: block;
  position: relative;
  z-index: 1;
}

h2::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--c-green);
  border-radius: 0;
}

/* h3 */
h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-green);
  margin: 24px 0 10px;
  font-family: var(--font-main);
}

h3 > span {
  display: inline;
}

/* 段落 */
p {
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

/* 列表 */
.content-article ul,
.content-article ol {
  margin: 14px 0 14px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.content-article ul li,
.content-article ol li {
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.content-article ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-weight: 700;
}

.content-article ol {
  counter-reset: ol-cnt;
}

.content-article ol li {
  counter-increment: ol-cnt;
}

.content-article ol li::before {
  content: counter(ol-cnt) ".";
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* 强调 */
strong, b {
  color: var(--c-green);
  font-weight: 700;
}

em {
  color: var(--c-yellow);
  font-style: normal;
  font-weight: 600;
}

/* 玻璃拟态卡片 */
.glass-card {
  background: rgba(0, 0, 255, 0.08);
  border: 2px solid rgba(0, 255, 128, 0.3);
  border-radius: 4px;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 255, 0.15);
}

/* blockquote */
blockquote {
  border-left: 4px solid var(--c-blue);
  background: rgba(0, 0, 255, 0.1);
  padding: 14px 18px;
  margin: 18px 0;
  border-radius: 4px;
  font-style: normal;
  color: #d0d0d0;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.9rem;
}

th {
  background: var(--c-blue);
  color: var(--c-white);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border: 2px solid var(--c-black);
}

td {
  padding: 8px 14px;
  border: 1px solid #222;
  color: #ddd;
  vertical-align: top;
}

tr:nth-child(even) td {
  background: rgba(0, 0, 255, 0.06);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-black);
  border-top: 4px solid var(--c-green);
  padding-bottom: var(--nav-h);
}

.footer-top-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  border-bottom: 1px solid #222;
  padding-bottom: 8px;
}

.footer-col-title > span {
  display: inline;
}

.footer-contact-col p,
.footer-about-col p {
  font-size: 0.88rem;
  color: #aaa;
  margin-bottom: 6px;
  line-height: 1.5;
}

.footer-contact-col a {
  color: var(--c-green);
  font-size: 0.88rem;
}

.footer-nav-col nav ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-col nav ol li a {
  font-size: 0.85rem;
  color: #bbb;
  font-weight: 500;
}

.footer-nav-col nav ol li a:hover {
  color: var(--c-green);
  text-decoration: none;
}

/* 订阅表单 */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscribe-input {
  background: #111;
  border: 2px solid var(--c-blue);
  color: var(--c-white);
  padding: 10px 12px;
  font-size: 0.88rem;
  border-radius: 0;
  outline: none;
  min-height: 42px;
}

.subscribe-input:focus {
  border-color: var(--c-green);
}

.subscribe-btn {
  background: var(--c-green);
  border: 2px solid var(--c-black);
  color: var(--c-black);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 18px;
  cursor: pointer;
  border-radius: 4px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
}

.subscribe-btn:hover {
  background: var(--c-yellow);
}

.subscribe-note {
  font-size: 0.75rem;
  color: #555;
  margin-top: 4px;
}

/* 页脚底栏 */
.footer-bottom {
  border-top: 2px solid #181818;
}

.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
}

.footer-brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-green);
  font-family: var(--font-main);
  letter-spacing: 0.05em;
}

.footer-bottom-nav ol {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom-nav ol li a {
  font-size: 0.8rem;
  color: #666;
}

.footer-bottom-nav ol li a:hover {
  color: var(--c-green);
  text-decoration: none;
}

.footer-copyright {
  margin-left: auto;
  font-size: 0.78rem;
  color: #444;
  white-space: nowrap;
}

/* ===== Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Carousel / Auto-Rotation ===== */
.carousel-wrap {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 0;
}

.carousel-track .carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .footer-top-block {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .wrap {
    flex-direction: column;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-nav li a {
    font-size: 0.75rem;
    padding: 4px 6px;
  }

  .sidebar-badge {
    display: none;
  }

  .hero-wrap {
    min-height: 60vh;
    padding: 20px 16px 100px;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .hero-content {
    text-align: left;
    max-width: 100%;
    padding: 18px 16px;
  }

  .hero-img-1 {
    width: 60%;
    height: 50%;
    top: 4%;
    left: 0;
  }

  .hero-img-2 {
    width: 50%;
    height: 42%;
    top: 30%;
    left: 25%;
  }

  .footer-top-block {
    grid-template-columns: 1fr;
    padding: 32px 16px 24px;
    gap: 24px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-copyright {
    margin-left: 0;
  }

  .bottom-nav > ol > li > a {
    font-size: 0.78rem;
    padding: 0 12px;
    min-height: 48px;
  }

  .nav-search-input {
    width: 80px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .bottom-nav > ol > li > a {
    padding: 0 10px;
    font-size: 0.75rem;
    min-height: 48px;
  }

  .nav-search-form {
    padding: 0 6px;
  }

  .nav-search-input {
    width: 60px;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .nav-search-btn {
    min-height: 40px;
    min-width: 40px;
  }
}

/* ===== 工具类 ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* div 内部排版辅助 */
.content-article div {
  position: relative;
  overflow: hidden;
}

.content-article div::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 40px;
  background: var(--c-blue);
  opacity: 0.4;
}

/* 强制 tap area — 统一所有可点击元素最小高度 */
.bottom-nav > ol > li > a,
.brand-icon-link,
.hero-cta,
.subscribe-btn,
.nav-search-btn {
  min-height: 48px;
}
