:root {
  --bg-dark: #0a0a0a;
  /* 极深背景 */
  --panel-bg: #141414;
  /* 面板背景 */
  --input-bg: #252525;
  /* 输入框背景 */
  --accent-gold: #e2c585;
  /* 金色主色调 */
  --accent-gold-hover: #f0d58f;
  --text-main: #ffffff;
  --text-gray: #888888;
  --border-color: #333333;

  /* 字体定义 */
  --font-serif: "Songti SC", "SimSun", "Times New Roman", serif;
  /* 宋体/衬线 */
  --font-sans: "DengXian", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  /* 等线/无衬线 */
  --font-mono: "Consolas", "Monaco", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ================= Header ================= */
header {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  background: rgba(10, 10, 10, 0.9);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.header-left .back-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 14px;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.header-center {
  text-align: center;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff;
  margin-left: 160px;
}

.logo-subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  color: #fff;
  letter-spacing: 1px;
  margin-top: 2px;
  margin-left: 160px;
}

.header-right nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-gray);
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* 激活状态：金色背景 */
.nav-item.active {
  background-color: var(--accent-gold);
  color: #1a1a1a;
  font-weight: bold;
}

.nav-item:hover:not(.active) {
  color: #fff;
}


/* ================= Hero Section (双重背景) ================= */
.hero-section {
  text-align: center;
  padding: 60px 20px 40px;


  /* 底层图片 */
  background-size: cover;
  background-position: center;

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--accent-gold);
  /* 这里的标题是金色的 */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.description {
  font-family: var(--font-sans);
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ================= Main Content Layout ================= */
main {
  flex: 1;
  overflow-y: auto;
  /* 允许内容滚动 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-container {
  max-width: 1200px;
  width: 100%;
  padding: 40px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: #fff;
  text-align: center;
  margin-bottom: 40px;
  font-weight: normal;
}

/* 左右分栏布局 */
.split-layout {
  display: flex;
  gap: 80px;
  /* 栏间距 */
  align-items: flex-start;
}

/* 左侧面板 */
.left-panel {
  flex: 1.2;
}

.text-content p {
  font-size: 18px;
  color: #eee;
  line-height: 1.8;
  margin-bottom: 24px;
  text-align: justify;
}

/* 逻辑表样式 */
.logic-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.logic-table th {
  text-align: left;
  font-size: 20px;
  color: var(--accent-gold);
  padding: 10px 0;
  border-bottom: 1px solid #333;
  font-weight: normal;
}

.logic-table td {
  padding: 18px 0;
  font-size: 19px;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.font-mono {
  font-family: var(--font-mono);
  color: #ccc;
  font-size: 13px;
}

/* 右侧面板 */
.right-panel {
  flex: 0.8;
}

.panel-header {
  font-size: 20px;
  color: var(--accent-gold);
  margin-bottom: 15px;
  font-weight: normal;
}

/* 真值表网格 (CSS Grid) */
.truth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 4列 */
  gap: 8px;

}

.grid-header {
  text-align: center;
  font-size: 19px;
  color: var(--accent-gold);
  padding-bottom: 5px;
  font-family: var(--font-sans);
}

.grid-cell {
  aspect-ratio: 1;
  /* 保持正方形 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: 2px;
  color: #000;
}

/* 金色背景块  */
.bg-gold {
  background-color: var(--accent-gold);
  color: #1a1a1a;
  font-size: 20px;
}

/* 深色背景块*/
.bg-dark {
  background-color: #2a2a2a;
  /* 深灰背景 */
  color: #888;
  /* 灰色文字 */
  font-size: 20px;
}

/* 响应式适配 */
@media (max-width: 900px) {
  .split-layout {
    flex-direction: column;
    gap: 40px;
  }

  .right-panel {
    width: 100%;
    max-width: 400px;

  }
}

/* --- 响应式适配 (移动端: 屏幕宽度小于768px) --- */

@media (max-width: 768px) {

  body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  header {
    height: auto;
    flex-direction: column;
    padding: 15px 15px 10px 15px;
    gap: 15px;

    position: relative;
  }

  .header-left {
    position: absolute;
    left: 15px;
    top: 20px;
    /* 垂直对齐第一行的Logo */
  }

  .header-center {
    margin: 0;
  }

  .logo-title,
  .logo-subtitle {
    margin-left: 0;
    text-align: center;
  }

  .header-right {
    width: 100%;
    overflow-x: auto;
  }

  .header-right nav ul {
    justify-content: center;
    gap: 8px;
  }

  .nav-item {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;

  }

  /* 3. Hero 标题区缩小间距 */
  .hero-section {
    padding: 30px 15px 20px;
  }

  .main-title {
    font-size: 24px;
    margin-bottom: 8px;
  }
}