:root {
  --primary-color: #60a5fa;  /* 柔和的亮蓝色 */
  --accent-color: #3b82f6;   /* 深一点的蓝色用于交互 */
  --bg-color: #1a1d23;       /* 深灰黑色背景 */
  --card-bg: #22262e;       /* 卡片背景 */
  --inner-bg: #2a2f38;      /* 内部容器背景 */
  --text-main: #e4e7eb;     /* 浅灰色文字 */
  --text-muted: #a0a5b1;    /* 禁用/说明文字 */
  --border-color: #374151;  /* 边框颜色 */
  --cn-box-bg: #2a2f38;     /* 中文解析框背景 */
  --cn-box-text: #93c5fd;   /* 中文解析文字使用淡蓝色 */
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg-color);
  padding-bottom: 4rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background: var(--card-bg);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  text-align: center;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

/* Language Toggle */
.toggle-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--inner-bg);
  padding: 0.3rem;
  border-radius: 10px;
  width: fit-content;
  margin: 0 auto;
}

.toggle-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: #374151;
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Content Sections */
section, #theory-section {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #ffffff;
  border-left: 5px solid var(--primary-color);
  padding-left: 1.2rem;
}

h3 {
  font-size: 1.2rem;
  margin: 2rem 0 1.2rem;
  color: var(--primary-color);
  background: var(--inner-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

/* Linear Theory Items */
.theory-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.theory-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.term {
  font-weight: 600;
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.def {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.cn {
  display: block;
  padding: 1rem;
  background: var(--cn-box-bg);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--cn-box-text);
  border: 1px solid var(--border-color);
  line-height: 1.6;
}

/* Lists */
.simple-list {
  list-style: none;
}

.simple-list li {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.simple-list li:last-child {
  border-bottom: none;
}

.list-main {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
  color: #ffffff;
}

.list-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: block;
}

/* Links */
.link-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.link-group h4 {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-group ul {
  list-style: none;
}

.link-group li {
  margin-bottom: 0.6rem;
}

.link-group a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.2s;
}

.link-group a:hover {
  color: #ffffff;
  text-decoration: underline;
}

footer {
  text-align: center;
  color: var(--text-muted);
  margin-top: 3rem;
  padding-bottom: 2rem;
}

@media (max-width: 600px) {
  .link-section { grid-template-columns: 1fr; }
  section, #theory-section { padding: 1.5rem; }
  h1 { font-size: 1.6rem; }
}
