/* 每日大赛 - 吃瓜爆料每日大赛聚集地 mrds.fun - 靛蓝主题 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: #334155;
  background: #f8fafc;
  line-height: 1.65;
}

a {
  color: #4f46e5;
  text-decoration: none;
}

a:hover {
  color: #6366f1;
  text-decoration: underline;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 顶栏：白底 + 靛蓝 ========== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar .site-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
}

.top-bar .site-name .dot {
  color: #4f46e5;
}

.top-bar .site-name:hover {
  color: #4f46e5;
  text-decoration: none;
}

.top-bar .site-tag {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 8px;
  font-weight: 400;
}

.top-bar .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.top-bar .nav-links a {
  padding: 8px 14px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
}

.top-bar .nav-links a:hover,
.top-bar .nav-links a.active {
  background: #eef2ff;
  color: #4f46e5;
  text-decoration: none;
}

.top-bar .nav-toggle {
  display: none;
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
}

/* ========== 渐变条 Hero（无图） ========== */
.hero-band {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
  color: #fff;
  padding: 42px 20px 38px;
}

.hero-band .container {
  max-width: 720px;
  text-align: center;
}

.hero-band .hero-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 10px;
}

.hero-band h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hero-band p {
  font-size: 0.9375rem;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-band .hero-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 22px;
  background: #fff;
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
}

.hero-band .hero-cta:hover {
  background: #eef2ff;
  text-decoration: none;
  color: #4338ca;
}

/* ========== 区块 ========== */
.section {
  padding: 36px 0;
}

.section.white {
  background: #fff;
}

.section .section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.section .section-desc {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 20px;
}

/* ========== 四列卡片（每日大赛） ========== */
.card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.08);
}

.card-item a {
  display: block;
  color: inherit;
}

.card-item a:hover {
  text-decoration: none;
  color: inherit;
}

.card-item .card-img {
  aspect-ratio: 16/10;
  background: #eef2ff;
}

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

.card-item .card-body {
  padding: 14px;
}

.card-item .card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4f46e5;
  margin-bottom: 6px;
}

.card-item .card-body h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.card-item .card-body .card-time {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* ========== 主栏 + 侧栏 ========== */
.layout-main-side {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}

/* 主栏：缩略图 + 正文列表 */
.feed-list {
  list-style: none;
}

.feed-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item .feed-thumb {
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
}

.feed-item .feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-item .feed-body h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 4px;
}

.feed-item .feed-body h3 a {
  color: inherit;
}

.feed-item .feed-body h3 a:hover {
  color: #4f46e5;
  text-decoration: none;
}

.feed-item .feed-body .feed-excerpt {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 4px;
}

.feed-item .feed-body .feed-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* 侧栏 */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-box {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 18px;
  margin-bottom: 20px;
}

.sidebar-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4f46e5;
}

.sidebar-box .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-box .tag-list a {
  display: inline-block;
  padding: 5px 12px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
}

.sidebar-box .tag-list a:hover {
  background: #c7d2fe;
  text-decoration: none;
  color: #4338ca;
}

.sidebar-box .link-list {
  list-style: none;
}

.sidebar-box .link-list li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-box .link-list li:last-child {
  border-bottom: none;
}

.sidebar-box .link-list a {
  font-size: 0.875rem;
  color: #475569;
}

.sidebar-box .link-list a:hover {
  color: #4f46e5;
  text-decoration: none;
}

/* ========== 内容页 ========== */
.article-wrap {
  padding: 28px 0 44px;
}

.article-wrap .bread {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 16px;
}

.article-wrap .bread a {
  color: #64748b;
}

.article-wrap .bread a:hover {
  color: #4f46e5;
}

.article-wrap .article-head h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
  line-height: 1.35;
}

.article-wrap .article-head .meta {
  font-size: 0.875rem;
  color: #64748b;
}

.article-wrap .article-figure {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}

.article-wrap .article-figure img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.article-wrap .article-body {
  max-width: 680px;
}

.article-wrap .article-body p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.85;
  margin-bottom: 16px;
}

.article-wrap .article-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 12px;
}

.article-wrap .article-body h2:first-of-type {
  margin-top: 0;
}

.article-wrap .article-body .article-tags {
  margin-top: 24px;
}

.article-wrap .article-body .article-tags span {
  display: inline-block;
  padding: 4px 12px;
  margin-right: 8px;
  margin-bottom: 8px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.article-wrap .article-body .back-link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
}

/* ========== 列表页 ========== */
.list-wrap {
  padding: 28px 0 44px;
}

.list-wrap .bread {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 16px;
}

.list-wrap .list-head h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
}

.list-wrap .list-head p {
  font-size: 0.9rem;
  color: #64748b;
}

.list-wrap .back-link {
  display: inline-block;
  margin-top: 22px;
  font-weight: 600;
}

/* ========== 页脚 ========== */
.footer {
  margin-top: auto;
  background: #1e293b;
  color: #94a3b8;
  padding: 24px 20px 20px;
  font-size: 0.875rem;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer .footer-copy {
  font-size: 0.8125rem;
  color: #94a3b8;
}

.footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer .footer-links a {
  color: #94a3b8;
}

.footer .footer-links a:hover {
  color: #a5b4fc;
  text-decoration: none;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .card-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout-main-side {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .top-bar .nav-links {
    display: none;
  }

  .top-bar .nav-links.open {
    display: flex;
    width: 100%;
    flex-direction: column;
  }

  .top-bar .nav-toggle {
    display: block;
  }

  .card-row {
    grid-template-columns: 1fr;
  }

  .feed-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .hero-band h1 {
    font-size: 1.35rem;
  }
}
