/* ========================================================
   本地分类信息门户 - 高保真原型全局样式
   设计理念：现代、简约、商务、年轻、有质感
   ======================================================== */

:root {
  /* 主色板 */
  --color-primary: #1677FF;
  --color-primary-dark: #0958D9;
  --color-primary-light: #4096FF;
  --color-primary-bg: #E6F4FF;
  --color-secondary: #722ED1;
  --color-accent: #FF7A45;
  --color-danger: #FF4D4F;
  --color-success: #52C41A;
  --color-warning: #FAAD14;

  /* 中性色 - 9级灰阶 */
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* 语义色 */
  --color-text: var(--gray-800);
  --color-text-secondary: var(--gray-600);
  --color-text-tertiary: var(--gray-400);
  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F9FC;
  --color-border: var(--gray-200);
  --color-border-light: var(--gray-100);

  /* 尺寸 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.12);
  --shadow-xl: 0 16px 48px rgba(15,23,42,0.16);

  /* 容器 */
  --container-max: 1280px;
  --header-height: 72px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html, body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg-soft);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary); }

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

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== 容器 ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 顶部公告栏 ===== */
.topbar {
  background: linear-gradient(90deg, #0E2A4F 0%, #1E4A8C 100%);
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 16px; align-items: center; }
.topbar-links .sep { color: rgba(255,255,255,0.3); }

/* ===== 主导航 ===== */
.header {
  background: #fff;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border-light);
}
.header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--color-text);
  letter-spacing: -0.3px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677FF 0%, #722ED1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(22,119,255,0.35);
}
.logo-text small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  margin-top: -2px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-item {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.2s;
}
.nav-item:hover { background: var(--color-primary-bg); color: var(--color-primary); }
.nav-item.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 600;
}
.nav-item .hot {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: top;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--color-text-tertiary);
  width: 220px;
  cursor: pointer;
  transition: all 0.2s;
}
.search-trigger:hover { border-color: var(--color-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #1677FF 0%, #4096FF 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22,119,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22,119,255,0.4);
  color: #fff;
}
.btn-outline {
  background: #fff;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-ghost { color: var(--color-text); }
.btn-ghost:hover { background: var(--color-bg-soft); }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ===== 用户头像 / 菜单 ===== */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  background: var(--color-bg-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.user-chip:hover { background: var(--color-primary-bg); }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677FF, #722ED1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* ===== 通用区块 ===== */
.section { padding: 56px 0; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-title h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  padding-left: 16px;
}
.section-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: linear-gradient(180deg, #1677FF, #722ED1);
  border-radius: 2px;
}
.section-title .more {
  color: var(--color-text-secondary);
  font-size: 14px;
}
.section-title .more:hover { color: var(--color-primary); }

/* ===== 分类入口 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
  background: #fff;
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}
.category-item:hover {
  background: var(--color-primary-bg);
  transform: translateY(-2px);
}
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1677FF, #4096FF);
  box-shadow: 0 4px 12px rgba(22,119,255,0.25);
}
.category-icon.cyan   { background: linear-gradient(135deg,#13C2C2,#08979C); box-shadow: 0 4px 12px rgba(19,194,194,0.3);}
.category-icon.purple { background: linear-gradient(135deg,#722ED1,#9254DE); box-shadow: 0 4px 12px rgba(114,46,209,0.3);}
.category-icon.orange { background: linear-gradient(135deg,#FF7A45,#FFA940); box-shadow: 0 4px 12px rgba(255,122,69,0.3);}
.category-icon.green  { background: linear-gradient(135deg,#52C41A,#73D13D); box-shadow: 0 4px 12px rgba(82,196,26,0.3);}
.category-icon.pink   { background: linear-gradient(135deg,#EB2F96,#F759AB); box-shadow: 0 4px 12px rgba(235,47,150,0.3);}
.category-icon.gold   { background: linear-gradient(135deg,#FAAD14,#FFC53D); box-shadow: 0 4px 12px rgba(250,173,20,0.3);}
.category-icon.red    { background: linear-gradient(135deg,#FF4D4F,#FF7875); box-shadow: 0 4px 12px rgba(255,77,79,0.3);}
.category-icon.teal   { background: linear-gradient(135deg,#36CFC9,#5CDBD3); box-shadow: 0 4px 12px rgba(54,207,201,0.3);}
.category-icon.blue   { background: linear-gradient(135deg,#2F54EB,#85A5FF); box-shadow: 0 4px 12px rgba(47,84,235,0.3);}
.category-name {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
}

/* ===== 卡片 - 帖子 ===== */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-bg);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.post-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-bg);
}
.post-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.post-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title:hover { color: var(--color-primary); }
.post-card-title .pin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #FF7A45, #FF4D4F);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}
.post-card-title .new {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.post-card-salary {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-danger);
  white-space: nowrap;
}
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  margin-bottom: 12px;
}
.post-card-meta .dot { color: var(--color-text-tertiary); }
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-bg-soft);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.tag.primary { background: var(--color-primary-bg); color: var(--color-primary); }
.tag.warning { background: #FFF7E6; color: #D46B08; }
.post-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  font-size: 12px;
  color: var(--color-text-tertiary);
}
.company {
  display: flex;
  align-items: center;
  gap: 8px;
}
.company-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1677FF, #722ED1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ===== 标签条 ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--color-bg-soft);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
}
.tab {
  padding: 6px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab.active {
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}
.form-label .required { color: var(--color-danger); margin-right: 4px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  transition: all 0.2s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(180deg, #1E2A4A 0%, #0E1A38 100%);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.footer-links a:hover { color: #fff; }
.footer-brand p { font-size: 13px; line-height: 1.8; margin: 12px 0 16px; }
.footer-qr {
  display: flex;
  gap: 12px;
}
.footer-qr-item {
  text-align: center;
  font-size: 12px;
}
.footer-qr-item .qr {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 10px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ===== 工具类 ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.text-primary { color: var(--color-primary); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-bold { font-weight: 700; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .post-list { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
