/* ========== 新闻模块样式 ========== */

/* 新闻区块（首页内嵌） */
.news-section {
  padding: 6rem 0;
  background: rgba(14, 45, 39, 0.4);
  border-top: 1px solid rgba(45, 212, 191, 0.1);
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}

.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  background: linear-gradient(135deg, rgba(14, 45, 39, 0.8) 0%, rgba(10, 31, 28, 0.6) 100%);
  border: 1px solid rgba(45, 212, 191, 0.12);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.news-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  transform: translateX(4px);
}
.news-card.pinned::before {
  content: '📌 置顶';
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  font-size: 0.7rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.news-date {
  flex-shrink: 0;
  width: 70px;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(16, 185, 129, 0.1));
  border-radius: 0.5rem;
  border: 1px solid rgba(45, 212, 191, 0.2);
  height: fit-content;
}
.news-date .day {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2dd4bf, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.news-date .month {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.5);
  margin-top: 0.25rem;
}
.news-content { flex: 1; min-width: 0; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.5);
  margin-bottom: 0.5rem;
}
.news-cat {
  padding: 0.15rem 0.6rem;
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border-radius: 4px;
  font-weight: 600;
}
.news-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-summary {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 侧边栏 */
.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-card {
  background: rgba(10, 31, 28, 0.6);
  border: 1px solid rgba(45, 212, 191, 0.12);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.cat-item:hover {
  background: rgba(45, 212, 191, 0.08);
  color: #2dd4bf;
}
.cat-count {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.news-more {
  text-align: center;
  margin-top: 2rem;
}

/* ========== 列表页 /cqs/news/ ========== */
.news-page {
  padding: 8rem 0 4rem;
  min-height: 100vh;
}
.news-page-header {
  text-align: center;
  margin-bottom: 3rem;
}
.news-page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2dd4bf 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.news-page-header p { color: rgba(226, 232, 240, 0.6); }

.news-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(10, 31, 28, 0.6);
  border: 1px solid rgba(45, 212, 191, 0.12);
  border-radius: 0.75rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.7);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, #14b8a6, #10b981);
  color: white;
  border-color: transparent;
}

.news-list-full {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(226, 232, 240, 0.5);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* ========== 详情页 /cqs/news/post.html?id=xxx ========== */
.post-page {
  padding: 8rem 0 4rem;
  min-height: 100vh;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(226, 232, 240, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.post-back:hover { color: #2dd4bf; }

.post-article {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(10, 31, 28, 0.6);
  border: 1px solid rgba(45, 212, 191, 0.12);
  border-radius: 1rem;
  padding: 3rem;
}
.post-header {
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}
.post-title {
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.5);
  align-items: center;
}
.post-meta .news-cat { font-size: 0.8rem; }

.post-content {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(226, 232, 240, 0.85);
}
.post-content h1, .post-content h2, .post-content h3 {
  color: #f1f5f9;
  font-weight: 700;
  margin: 2rem 0 1rem;
  line-height: 1.4;
}
.post-content h1 { font-size: 1.75rem; }
.post-content h2 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(45, 212, 191, 0.15);
}
.post-content h3 { font-size: 1.2rem; color: #2dd4bf; }
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol {
  margin: 1rem 0 1rem 1.5rem;
}
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 3px solid #2dd4bf;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: rgba(20, 184, 166, 0.05);
  color: rgba(226, 232, 240, 0.8);
  border-radius: 0 0.5rem 0.5rem 0;
}
.post-content code {
  background: rgba(20, 184, 166, 0.1);
  color: #2dd4bf;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
}
.post-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.post-content pre code {
  background: transparent;
  color: #e2e8f0;
  padding: 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.post-content th, .post-content td {
  border: 1px solid rgba(45, 212, 191, 0.2);
  padding: 0.6rem 0.9rem;
  text-align: left;
}
.post-content th {
  background: rgba(20, 184, 166, 0.1);
  color: #2dd4bf;
  font-weight: 700;
}
.post-content a {
  color: #2dd4bf;
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, 0.3);
}
.post-content a:hover { border-bottom-color: #2dd4bf; }
.post-content hr {
  border: none;
  border-top: 1px solid rgba(45, 212, 191, 0.15);
  margin: 2rem 0;
}
.post-content strong { color: #f1f5f9; font-weight: 700; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: rgba(10, 31, 28, 0.4);
  border: 1px solid rgba(45, 212, 191, 0.1);
  border-radius: 0.75rem;
}
.page-btn {
  padding: 0.5rem 1.25rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #2dd4bf;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-family: inherit;
}
.page-btn:hover:not(:disabled) {
  background: rgba(20, 184, 166, 0.2);
  border-color: #2dd4bf;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#pageInfo {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
  .post-article { padding: 1.5rem; }
  .post-title { font-size: 1.5rem; }
  .form-row, .form-row.col-3 { grid-template-columns: 1fr; }
  .admin-table { font-size: 0.85rem; }
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) { display: none; }
}
