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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  color: #1a1a2e;
  background: #f0f2f5;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== Header ========== */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #e91e8c 100%);
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-brand .icon { font-size: 1.6rem; }

.site-tagline {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.1rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
}

.header-btn:hover {
  background: #fff;
  color: #667eea;
  transform: translateY(-1px);
}

/* ========== Navigation ========== */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e8e8ef;
  overflow-x: auto;
}

.nav-inner {
  display: flex;
  gap: 0;
  padding: 0;
}

.nav-inner a {
  flex-shrink: 0;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: #e91e8c;
  border-bottom-color: #e91e8c;
}

/* ========== Hero Banner ========== */
.hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.85) 0%, rgba(26,26,46,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

.hero-overlay h2 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-overlay p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  max-width: 600px;
}

/* ========== Stats Bar ========== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-3px); }
.stat-card .num {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #e91e8c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .label {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.2rem;
}

/* ========== Forum Sections ========== */
.forum-section {
  margin-bottom: 2rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid #f0f0f5;
  background: linear-gradient(135deg, #fafbff, #fff5f9);
}

.section-title .emoji { font-size: 1.3rem; }
.section-title .more {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 400;
  color: #e91e8c;
}

.section-cover {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
}

.post {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f5f5fa;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: background 0.2s;
  cursor: pointer;
}

.post:hover { background: #fafbff; }

.post:last-child { border-bottom: none; }

.post-cover {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.post-info { flex: 1; min-width: 0; }

.post-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.post-info .meta {
  font-size: 0.78rem;
  color: #999;
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
}

.post-info .body {
  font-size: 0.85rem;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.post-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: linear-gradient(135deg, #667eea22, #e91e8c22);
  color: #e91e8c;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

/* ========== Featured Row (horizontal scroll) ========== */
.featured-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 1.25rem;
  scroll-snap-type: x mandatory;
}

.featured-row::-webkit-scrollbar { height: 4px; }
.featured-row::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.featured-card {
  flex-shrink: 0;
  width: 200px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.featured-card:hover { transform: translateY(-3px); }

.featured-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.featured-card .card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 0.8rem 0.8rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ========== Sidebar / Hot Ranking ========== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hot-sidebar {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  align-self: start;
  position: sticky;
  top: 80px;
}

.hot-sidebar .sidebar-title {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid #f0f0f5;
  background: linear-gradient(135deg, #fff5f9, #fafbff);
}

.hot-list { list-style: none; }

.hot-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f8f8fb;
  transition: background 0.2s;
  cursor: pointer;
}

.hot-list li:hover { background: #fafbff; }

.hot-list .rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  background: #f0f0f5;
  color: #999;
}

.hot-list li:nth-child(1) .rank { background: linear-gradient(135deg, #ff6b6b, #ee5a24); color: #fff; }
.hot-list li:nth-child(2) .rank { background: linear-gradient(135deg, #ffa502, #ff6348); color: #fff; }
.hot-list li:nth-child(3) .rank { background: linear-gradient(135deg, #ffd32a, #ffa502); color: #fff; }

.hot-list .hot-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-list .hot-count {
  font-size: 0.75rem;
  color: #ccc;
  flex-shrink: 0;
}

/* ========== Footer ========== */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 0;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about h3,
.footer-col h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-about p {
  font-size: 0.85rem;
  line-height: 1.7;
  opacity: 0.75;
}

.footer-about .brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea, #e91e8c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-col ul { list-style: none; }

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 1; color: #e91e8c; }

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer-tags span {
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s;
}

.footer-tags span:hover { background: rgba(233,30,140,0.3); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
  font-size: 0.8rem;
  opacity: 0.5;
}

.footer-disclaimer {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  line-height: 1.7;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a { opacity: 0.7; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* ========== Click Overlay (for msn.js js-download) ========== */
.click-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  text-decoration: none;
  color: transparent;
  cursor: pointer;
}

.has-overlay { position: relative; }

.footer-tags a.js-download {
  color: inherit;
  text-decoration: none;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .hot-sidebar { position: static; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-brand h1 { font-size: 1.2rem; }
  .hero { height: 220px; }
  .hero-overlay h2 { font-size: 1.3rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 0.9rem; }
  .stat-card .num { font-size: 1.3rem; }
  .post { flex-direction: column; }
  .post-cover { width: 100%; height: 160px; }
  .posts-grid { grid-template-columns: 1fr; }
  .featured-card { width: 160px; }
  .featured-card img { height: 210px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .header-inner { justify-content: center; text-align: center; }
  .nav-inner a { padding: 0.65rem 0.8rem; font-size: 0.82rem; }
}
