/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #f5f6fa;
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #1890ff; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

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

/* ===== Header ===== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 20px;
}

/* Back button */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f7fa;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.2s;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.back-btn:hover {
  background: #1890ff;
  color: #fff;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #1890ff;
  letter-spacing: 1px;
}
.logo span { color: #333; }
.search-box {
  flex: 1;
  max-width: 400px;
  margin: 0 30px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 9px 40px 9px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: #1890ff; }
.search-box .search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 16px;
}
.header-actions a {
  margin-left: 20px;
  color: #666;
  font-size: 14px;
}
.header-actions a:hover { color: #1890ff; }

/* Header nav buttons (replace header-actions) */
.header-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-nav-btns a {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: #555;
  background: #f5f7fa;
  transition: all 0.2s;
  white-space: nowrap;
}
.header-nav-btns a:hover {
  background: #1890ff;
  color: #fff;
}

/* Nav menu button (right side) */
.nav-menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f7fa;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  transition: all 0.2s;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}
.nav-menu-btn:hover {
  background: #1890ff;
  color: #fff;
}

/* ===== Navigation ===== */
.main-nav {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  display: none;
}
.nav-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 24px;
}
.nav-list li a {
  display: block;
  padding: 14px 20px;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}

/* ===== Main Content ===== */
.main-content {
  padding: 24px 0;
  min-height: calc(100vh - 200px);
}
.content-wrapper {
  display: flex;
  gap: 24px;
}
.content-main {
  flex: 1;
  min-width: 0;
}
.content-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* ===== News Grid (3 columns) ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== News Card ===== */
.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef0f4;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(24, 144, 255, 0.12);
  border-color: transparent;
}
.news-card .card-image {
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f0f0;
}
.news-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .card-image img {
  transform: scale(1.05);
}
.news-card .card-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-card .card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .card-summary {
  color: #666;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.news-card .card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999;
  font-size: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}
.news-card .card-meta .category-tag {
  background: linear-gradient(135deg, #1890ff, #36cfc9);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.news-card .card-meta .views-count {
  margin-left: auto;
  color: #bbb;
  font-size: 12px;
}

/* ===== Featured News ===== */
.featured-section {
  margin-bottom: 24px;
}
.featured-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  height: 360px;
}
.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-card .featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}
.featured-card .featured-overlay h2 {
  font-size: 26px;
  margin-bottom: 8px;
  line-height: 1.3;
}
.featured-card .featured-overlay p {
  font-size: 14px;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card .featured-meta {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.8;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 4px solid #1890ff;
}

/* ===== Sidebar Widget ===== */
.widget {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.hot-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  gap: 10px;
  cursor: pointer;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list .rank {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #e0e0e0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hot-list li:nth-child(1) .rank { background: #f5222d; }
.hot-list li:nth-child(2) .rank { background: #fa8c16; }
.hot-list li:nth-child(3) .rank { background: #faad14; }
.hot-list .hot-title {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-list li:hover .hot-title { color: #1890ff; }

/* ===== Category Tags ===== */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-tags a {
  padding: 6px 14px;
  background: #f5f5f5;
  border-radius: 16px;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
}
.category-tags a:hover,
.category-tags a.active {
  background: #1890ff;
  color: #fff;
}

/* ===== Detail Page ===== */
.detail-article {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
}
.detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  color: #222;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
}
.detail-meta .author { color: #1890ff; font-weight: 500; }
.detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}
.detail-content p { margin-bottom: 18px; }
.detail-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 16px 0;
}
.detail-content h2,
.detail-content h3 {
  margin: 24px 0 12px;
  font-weight: 600;
}
.detail-content blockquote {
  border-left: 4px solid #1890ff;
  padding: 10px 16px;
  margin: 16px 0;
  background: #f5faff;
  color: #555;
}

/* ===== Footer ===== */
.site-footer {
  background: #2c3e50;
  color: #bdc3c7;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-section h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 15px;
}
.footer-section ul li {
  margin-bottom: 8px;
  font-size: 13px;
}
.footer-section ul li a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #3d566e;
  font-size: 12px;
  color: #95a5a6;
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}
.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f0f0f0;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Error State ===== */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.retry-btn {
  margin-top: 16px;
  padding: 8px 24px;
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.retry-btn:hover { background: #40a9ff; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: #999;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #1890ff; }
.breadcrumb .separator { margin: 0 8px; }

/* ===== Privacy Page ===== */
.privacy-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
}
.privacy-content h1 {
  font-size: 28px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}
.privacy-content h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: #222;
}
.privacy-content p { margin-bottom: 14px; color: #555; }
.privacy-content ul { margin: 12px 0; padding-left: 24px; list-style: disc; }
.privacy-content ul li { margin-bottom: 6px; color: #555; }
.privacy-content h3 {
  font-size: 16px;
  margin: 18px 0 8px;
  color: #333;
}
.privacy-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
  color: #c7254e;
}
.privacy-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.privacy-content table th {
  background: #f5f5f5;
  padding: 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
  font-weight: 600;
  color: #333;
}
.privacy-content table td {
  padding: 10px;
  border: 1px solid #e0e0e0;
  color: #555;
}
.privacy-content table td a {
  color: #1890ff;
  text-decoration: none;
}
.privacy-content table td a:hover { text-decoration: underline; }
.privacy-content .last-updated {
  color: #999;
  font-size: 13px;
  margin-bottom: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .content-sidebar { display: none; }
  .featured-card { height: 280px; }
  .featured-card .featured-overlay h2 { font-size: 20px; }
  .header-nav-btns { display: none; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .header-top { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .search-box { order: 3; flex-basis: 100%; margin: 0; max-width: none; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
  .news-card .card-image { height: 180px; }
  .detail-article, .privacy-content { padding: 20px; }
  .detail-title { font-size: 22px; }
  .featured-card { height: 220px; }
  .featured-card .featured-overlay h2 { font-size: 18px; }
  .nav-list { padding: 0 16px; flex-direction: column; gap: 0; }
  .nav-list li a { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; border-left: 3px solid transparent; }
  .nav-list li a:hover,
  .nav-list li a.active { border-bottom-color: #f0f0f0; border-left-color: #1890ff; }
  .footer-content { flex-direction: column; gap: 24px; }
}
