/* CSS 自定义属性（颜色令牌） */
:root {
  --on-primary: #ffffff;
  --surface-container-low: #f2f5e2;
  --secondary-fixed: #d1eabf;
  --outline: #72796b;
  --primary-container: #a0d880;
  --on-secondary: #ffffff;
  --on-background: #191d11;
  --primary-fixed: #b9f29c;
  --surface-dim: #d9dcc9;
  --secondary: #4f6442;
  --on-surface: #191d11;
  --surface-container-lowest: #ffffff;
  --on-secondary-container: #536946;
  --surface-variant: #e1e4d1;
  --surface-tint: #396a24;
  --secondary-container: #cfe7bc;
  --surface-container: #edf0dc;
  --on-surface-variant: #42493c;
  --surface-container-highest: #e1e4d1;
  --surface-bright: #fbfeea;
  --surface: #fbfeea;
  --error: #ba1a1a;
  --primary: #396a24;
  --surface-container-high: #e7ead7;
  --inverse-surface: #2e3225;
  --on-primary-container: #2f5f1a;
  --tertiary: #884a6b;
  --outline-variant: #c2c9b8;
  --background: #fbfeea;

  /* 系统字体栈（替代远程字体） */
  --font-headline: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-label: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-modern: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 重置与基础样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--primary-container);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

table {
  border-collapse: collapse;
}

/* 图标替代样式（替代 Material Symbols） */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  line-height: 1;
}

/* ===== 导航栏 ===== */
.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(57, 106, 36, 0.15);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 2.2rem;
  margin-right: auto;
}

.nav-logo img {
  height: 100%;
  width: auto;
  display: block;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 1.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: #57534e;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-link:hover {
  color: #166534;
  border-bottom: 1px solid #166534;
}

.nav-link-active {
  color: #166534;
  border-bottom: 1px solid #166534;
  padding-bottom: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
}

.auth-state {
  align-items: center;
}

/* 默认显示未登录状态；给 body 加 is-logged-in 切换为已登录状态 */
.auth-state-logged-out {
  display: inline-flex;
  gap: 0.4rem;
}

body.is-logged-in .auth-state-logged-in {
  display: inline-flex;
  gap: 0.5rem;
}

.auth-field {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cdd7c4;
  background-color: #ffffff;
  height: 2rem;
  padding: 0 0.45rem;
  gap: 0.35rem;
}

.auth-input {
  width: 78px;
  height: 100%;
  border: none;
  background-color: transparent;
  color: #2b3326;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  outline: none;
}

.auth-field:focus-within {
  border-color: #7aa164;
  box-shadow: 0 0 0 2px rgba(57, 106, 36, 0.12);
}

.btn-login {
  background-color: var(--primary);
  color: var(--on-primary);
  padding: 0.375rem 1rem;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
  background-color: #14532d;
  box-shadow: 0 2px 8px rgba(57, 106, 36, 0.25);
}

.auth-welcome {
  color: #3f4a37;
  font-size: 14px;
  white-space: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.auth-username {
  color: #1f5f38;
  font-weight: 700;
}

.auth-logout {
  color: #6b7465;
  font-size: 13px;
  white-space: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.auth-logout:hover {
  color: #14532d;
}

.register-link {
  color: #5f6d53;
  font-size: 13px;
  line-height: 2rem;
  white-space: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.register-link:hover {
  color: #14532d;
}

.auth-icon {
  font-size: 12px;
  line-height: 1;
}

.auth-field .auth-icon {
  color: #708066;
}

/* ===== 主内容区 ===== */
.main-content {
  background-color: #ffffcc;
  width: 1000px;
  margin-top: 3.5rem;
  min-height: 100vh;
  box-shadow: 0 10px 20px -3px rgba(25, 80, 17, 0.18), 0 4px 8px -4px rgba(25, 80, 17, 0.12);
  display: flex;
  flex-direction: column;
}

/* ===== 网站警告 ===== */
.site-warning {
  background-color: #000000;
  border-bottom: 1px solid #e6c200;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  text-align: center;
}

.site-warning p {
  margin: 0;
}

.site-warning-bottom {
  background-color: #000000;
  border-top: 1px solid #d4dbc8;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  text-align: center;
}

.site-warning-bottom p {
  margin: 0;
}

/* ===== 站点导航 ===== */
.site-nav-bar {
  background-color: #ffffcc;
  border-bottom: 1px solid #d4dbc8;
  padding: 8px 16px;
  font-size: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
}

.site-nav-links a {
  color: blue;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav-links a:first-child {
  font-weight: 600;
  color: var(--primary);
}

.site-nav-links a:hover {
  color: var(--primary);
}

.site-nav-actions {
  display: flex;
  gap: 16px;
}

.site-nav-actions a {
  color: #991b1b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav-actions a:hover {
  color: #cc0000;
  text-decoration: underline;
}

/* ===== 顶部横幅 ===== */
.top-banner {
  width: 100%;
  height: 5rem;
  background-color: var(--surface-dim);
  display: flex;
  align-items: center;
  justify-content:space-evenly;
}

.top-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.top-banner:hover .top-banner-inner {
  opacity: 0.6;
}

.top-banner-icon {
  font-size: 1.875rem;
  margin-bottom: 4px;
}

.top-banner-label {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ===== 存档分类 ===== */
.categories-section {
  background: #ffffcc;
  border: 1px solid #c8d1bc;
  padding: 16px;
  border-left: none;
  border-right: none;
}

.cat-layout {
  display: flex;
  gap: 16px;
}

.cat-left {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-right {
  flex: 1 1 0;
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-ad-img {
  flex: 1;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid #99CC00;
  min-height: 226px;
  box-shadow: 0 4px 12px rgba(25, 29, 17, 0.10);
  text-align:center;
  padding:15px;
}

.cat-ad-img .category-item {
  margin-top:10px;
}

.category-item {
  background: #ffffee;
  border: 1px solid #99CC00;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.5;
  gap: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(25, 29, 17, 0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.category-item:hover {
  background: #eef2e8;
  border-color: #a8b89a;
  border-left-color: var(--primary);
  box-shadow: 0 2px 8px rgba(25, 29, 17, 0.10);
}

.category-tag {
  font-weight: 600;
  color: #000000;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
}

.category-desc {
  color: #000000;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-left .category-desc {
  color: #000000;
}

.category-link {
  color: #990000;
  font-weight: normal;
  white-space: nowrap;
  margin-left: auto;
}

.cat-left .category-link {
  color: #990000;
  font-weight: normal;
  letter-spacing: 0.01em;
}

.category-item:hover .category-link {
  color: #396a24;
}

@media (max-width: 1024px) {
  .cat-layout {
    flex-direction: column;
  }

  .cat-right {
    width: 100%;
  }

  .cat-ad-img {
    min-height: 280px;
  }
}

/* ===== 特色区块 ===== */
.features-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-tile {
  background-color: #ffffff;
  padding: 1rem;
  border: 1px solid rgba(194, 201, 184, 0.3);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(25, 29, 17, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-tile:hover {
  box-shadow: 0 4px 12px rgba(25, 29, 17, 0.12);
  transform: translateY(-1px);
}

.feature-img-wrapper {
  width: 100%;
  height: 7rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(194, 201, 184, 0.1);
}

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s;
}

.feature-img:hover {
  filter: grayscale(0%);
}

.feature-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 0.25rem;
}

.feature-desc {
  color: var(--on-surface-variant);
  font-size: 14px;
  line-height: 1.625;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 页中广告 ===== */
.mid-ad {
  width: 100%;
  height: 8rem;
  background-color: var(--surface-container-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(194, 201, 184, 0.2);
}

.mid-ad-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.mid-ad-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.mid-ad-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mid-ad-icon {
  color: var(--primary);
  font-size: 1.5rem;
}

.mid-ad-label {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--on-surface-variant);
  margin-top: 0.375rem;
}

/* ===== 分隔横幅 ===== */
.section-break {
  width: 100%;
  background-color: var(--surface-dim);
  display: flex;
  flex-direction: column; /* 垂直排列 */
  align-items: center;    /* 水平居中 */
  padding:10px;
  height:550px;
}

.section-break-label {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(66, 73, 60, 0.5);
}

/* ===== 表格与侧栏区 ===== */
.lower-title {
  width: 100%;
  background-color: var(--primary);
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: none;
  box-shadow: 0 2px 4px rgba(25, 29, 17, 0.10);
}

.lower-title-text {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--on-primary);
  letter-spacing: 0.06em;
}

.lower-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  margin-bottom: 2rem;
}

.table-section {
}

.table-wrapper {
  overflow: hidden;
  border: 1px solid rgba(194, 201, 184, 0.35);
  border-right: none;
  background-color: #fbfeea;
  padding: 0.75rem 0;
  box-shadow: 0 1px 4px rgba(25, 29, 17, 0.04);
}

/* ===== 帖子列表 ===== */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  padding: 5px 15px;
  font-size: 14px;
}

.post-item:hover {
  background-color: #f5f7f1;
}

.post-num {
  color: rgba(66, 73, 60, 0.45);
}

.post-category {
  color: #000000;
  text-decoration: none;
}

.post-category:hover {
  color: var(--primary);
}

.post-hot {
  color: #cc0000;
  font-style: italic;
  font-weight: 700;
  margin: 0 4px;
}

.post-title {
  color: var(--on-surface);
  text-decoration: none;
}

.post-title:hover {
  color: #991b1b;
  text-decoration: underline;
}

.post-sep {
  color: rgba(66, 73, 60, 0.4);
  margin: 0 4px;
}

.post-author {
  font-style: italic;
  color: rgba(66, 73, 60, 0.55);
  text-decoration: none;
}

.post-author:hover {
  color: var(--primary);
}

/* ===== 侧边广告 ===== */
.side-ad {
  width: 200px;
  min-height: 380px;
  background-color: #f5f7f1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(194, 201, 184, 0.5);
  border-left: none;
  text-align: center;
}

.side-ad-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.side-ad-icon {
  color: var(--primary);
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.side-ad-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 16px;
  color: var(--on-surface);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.side-ad-desc {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-bottom: 1rem;
  letter-spacing: 0;
  line-height: 1.625;
}

.btn-apply {
  width: 100%;
  padding: 0.5rem 0;
  background-color: var(--secondary);
  color: var(--on-secondary);
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-apply:hover {
  background-color: #166534;
  box-shadow: 0 2px 8px rgba(57, 106, 36, 0.25);
}

.side-ad-bottom {
  opacity: 0.3;
}

.side-ad-bottom span {
  font-family: var(--font-label);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: block;
}

.side-ad-bottom span + span {
  margin-top: 0.25rem;
}

/* ===== 关于页面 ===== */
.about-page {
  padding: 32px 40px;
}

.about-section {
  margin-bottom: 32px;
}

.about-section-en {
  border-top: 1px solid #d4dbc8;
  padding-top: 32px;
}

.about-title {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.about-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--on-surface);
  margin-top: 20px;
  margin-bottom: 12px;
}

.about-page p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 12px;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.about-list li {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid #f0f2ec;
  position: relative;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--primary);
}

.about-list li strong {
  color: var(--on-surface);
}

/* ===== 页脚 ===== */
.site-footer {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid rgba(57, 106, 36, 0.12);
  background-color: #ffffff;
}

.footer-inner {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
  }
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  height: 2rem;
}

.footer-logo img {
  height: 100%;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-link {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #78716c;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #15803d;
  text-decoration: underline;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a8a29e;
}
