/* 全站样式 - 南京与月同星文化传媒 信息发布平台 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #1A1F2E;
  background: #F7F8FA;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #17325C; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 设计 token */
:root {
  --primary: #17325C;
  --primary-dark: #0F2240;
  --primary-soft: #EEF2F8;
  --accent: #B8862B;
  --accent-soft: #FBF3E2;
  --text: #1A1F2E;
  --muted: #5A6472;
  --faint: #8A95A8;
  --line: #E2E7EE;
  --bg: #F7F8FA;
  --bg-card: #FFFFFF;
  --success: #2F8A5A;
  --warning: #B8862B;
  --danger: #B45A4D;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 50, 92, 0.04), 0 6px 18px rgba(23, 50, 92, 0.06);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============= 顶部导航 ============= */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .bar {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand img { width: 36px; height: 36px; }
.brand .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.nav a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  transition: all .15s;
}
.nav a:hover { background: var(--primary-soft); color: var(--primary); }
.nav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 500; }
.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  font-size: 14px;
  color: var(--text);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: #8E6519; color: #fff; border-color: #8E6519; }
.btn-danger { color: var(--danger); border-color: #E9C8C2; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 0; }
.btn-link:hover { background: none; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.user-menu { position: relative; }
.user-menu .menu {
  position: absolute;
  right: 0;
  top: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 160px;
  display: none;
}
.user-menu.open .menu { display: block; }
.user-menu .menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.user-menu .menu a:hover { background: var(--primary-soft); color: var(--primary); }
.user-menu .menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }

/* ============= 通用 ============= */
.page { padding: 24px 0 64px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--primary); margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar .sep { color: var(--faint); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.badge-success { background: #E6F4ED; color: var(--success); }
.badge-warn { background: var(--accent-soft); color: var(--accent); }
.badge-danger { background: #F8E5E2; color: var(--danger); }
.badge-gray { background: #EEF1F6; color: var(--muted); }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #F2F4F8;
  color: var(--muted);
  margin-right: 6px;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); }
.textarea { resize: vertical; min-height: 120px; }
.form-row { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-hint { color: var(--faint); font-size: 12px; margin-top: 4px; }
.form-err { color: var(--danger); font-size: 12px; margin-top: 6px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}
.checkbox-row input { margin-top: 4px; }
.checkbox-row a { color: var(--primary); }
.checkbox-row a:hover { text-decoration: underline; }

/* ============= 首页 ============= */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(184, 134, 43, 0.08), transparent 60%),
    radial-gradient(1000px 400px at 10% 0%, rgba(23, 50, 92, 0.07), transparent 60%),
    linear-gradient(180deg, #FFFFFF, #F7F8FA);
  border-bottom: 1px solid var(--line);
}
.hero .container { padding: 56px 20px 64px; }
.hero h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}
.hero .lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 26px;
  max-width: 720px;
  line-height: 1.8;
}
.search-box {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  max-width: 720px;
  box-shadow: 0 4px 16px rgba(23, 50, 92, 0.06);
}
.search-box select { border: none; background: transparent; padding: 8px 10px; color: var(--muted); }
.search-box input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  background: transparent;
}
.search-box input:focus { outline: none; }
.search-box button { padding: 10px 24px; border-radius: 8px; }

.section { padding: 48px 0; }
.section h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 6px;
}
.section .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

/* 类目卡片 */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .15s;
  cursor: pointer;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.cat-card .name { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 14px; }
.cat-card .desc { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* 信息卡片（列表） */
.listing-card {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: all .15s;
}
.listing-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.listing-card .cover {
  flex: 0 0 200px;
  background: var(--primary-soft);
  position: relative;
}
.listing-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .body { flex: 1; padding: 18px 22px; min-width: 0; }
.listing-card .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.listing-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.listing-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.listing-card .summary {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--faint);
}

@media (max-width: 700px) {
  .listing-card { flex-direction: column; }
  .listing-card .cover { width: 100%; height: 180px; flex: none; }
}

/* 信息列表页 */
.list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.list-filter { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; height: fit-content; }
.list-filter h3 { margin: 0 0 10px; font-size: 14px; color: var(--primary); }
.list-filter .item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.list-filter .item:hover { background: var(--primary-soft); color: var(--primary); }
.list-filter .item.active { background: var(--primary-soft); color: var(--primary); font-weight: 500; }

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.list-toolbar .left { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.list-toolbar .right { display: flex; gap: 8px; align-items: center; }
.list-results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.list-results .listing-card .cover { flex: 0 0 130px; }
@media (max-width: 900px) {
  .list-layout { grid-template-columns: 1fr; }
  .list-results { grid-template-columns: 1fr; }
}
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--faint);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty .icon-box { display: inline-flex; padding: 16px; background: var(--primary-soft); border-radius: 999px; margin-bottom: 12px; }
.empty p { margin: 6px 0; }

.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.pager button {
  min-width: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.pager button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 详情页 */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-main { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.detail-cover { width: 100%; aspect-ratio: 16/8; background: var(--primary-soft); object-fit: cover; }
.detail-body { padding: 28px 32px; }
.detail-body h1 { font-size: 26px; margin: 0 0 12px; color: var(--primary); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; margin: 8px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.detail-content { color: #2A3142; line-height: 1.9; white-space: pre-wrap; word-wrap: break-word; }
.detail-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.detail-images img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.detail-aside { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; height: fit-content; }
.detail-aside h3 { font-size: 14px; color: var(--primary); margin: 0 0 14px; }
.contact-block { background: var(--primary-soft); padding: 14px; border-radius: 10px; }
.contact-block .name { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.contact-block .phone { font-size: 20px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.contact-block .hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.contact-block .login-cta { margin-top: 12px; }

.aside-list { list-style: none; padding: 0; margin: 0; }
.aside-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.aside-list li:last-child { border-bottom: none; }
.aside-list .t { font-size: 13px; color: var(--text); display: block; margin-bottom: 4px; }
.aside-list .m { font-size: 12px; color: var(--faint); }

/* 关于页 */
.about-hero { background: linear-gradient(135deg, #17325C 0%, #1F456F 100%); color: #fff; padding: 48px 0; }
.about-hero h1 { font-size: 30px; margin: 0 0 8px; }
.about-hero p { margin: 0; opacity: 0.85; font-size: 15px; }
.about-section { padding: 36px 0; }
.about-section h2 { font-size: 20px; color: var(--primary); margin: 0 0 14px; }
.about-section p { color: #2A3142; line-height: 1.9; margin: 0 0 12px; }
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-year { color: var(--accent); font-weight: 600; margin-right: 12px; }
.timeline-text { color: #2A3142; }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 700px) { .numbers { grid-template-columns: repeat(2, 1fr); } }
.number-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; text-align: center; }
.number-card .v { font-size: 32px; font-weight: 700; color: var(--primary); }
.number-card .l { color: var(--muted); font-size: 13px; margin-top: 4px; }

.business-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.business-card h3 { margin: 0 0 8px; color: var(--primary); font-size: 16px; }
.business-card p { color: var(--muted); margin: 0; line-height: 1.8; }

/* 表单（login/register/publish/my） */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 920px; margin: 0 auto; }
@media (max-width: 760px) { .auth-layout { grid-template-columns: 1fr; } }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.auth-card h2 { margin: 0 0 16px; color: var(--primary); font-size: 18px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: none;
  background: transparent;
  padding: 10px 18px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 14px;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* 信息管理台 */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.admin-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tabs button .count { background: rgba(255,255,255,0.18); padding: 1px 8px; border-radius: 999px; margin-left: 6px; font-size: 12px; }
.admin-tabs button:not(.active) .count { background: var(--primary-soft); color: var(--primary); }

.admin-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.admin-row .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-row .head .left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.admin-row .title { font-size: 15px; font-weight: 500; color: var(--text); }
.admin-row .meta { font-size: 12px; color: var(--faint); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.admin-row .summary { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.admin-row .reject { background: #F8E5E2; color: var(--danger); padding: 6px 10px; border-radius: 6px; font-size: 12px; margin-top: 8px; }
.admin-row .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 我的发布 */
.my-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.my-row .l { flex: 1; min-width: 0; }
.my-row .t { font-weight: 500; color: var(--text); }
.my-row .m { color: var(--faint); font-size: 12px; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.my-row .r { display: flex; gap: 6px; flex-wrap: wrap; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 50, 92, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.modal h3 { margin: 0 0 12px; color: var(--primary); font-size: 16px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 300;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* 页脚 */
.site-footer {
  background: #15243F;
  color: #C9D2E0;
  padding: 40px 0 24px;
  font-size: 13px;
  margin-top: 60px;
}
.site-footer .grid-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .site-footer .grid-foot { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.site-footer a { color: #C9D2E0; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-block .name { color: #fff; font-size: 15px; font-weight: 600; }
.site-footer .icp { margin-top: 24px; padding-top: 16px; border-top: 1px solid #233358; color: #8E97AB; font-size: 12px; line-height: 1.8; }
.site-footer .icp a { color: #C9D2E0; display: inline; }
.site-footer .icp a:hover { color: #fff; }

/* 杂项 */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.flex { display: flex; gap: 8px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.hr { height: 1px; background: var(--line); margin: 20px 0; }