/* ==========================================================================
   51娱乐 (01 Entertainment) - 全局核心样式表
   标准规范：现代新闻门户风格、排版清晰、移动优先、SEO与无障碍友好
   ========================================================================== */

:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --primary-light: #ff6659;
  --accent: #f59e0b;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --text-light: #9ca3af;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1240px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "SimSun", "Noto Serif SC", serif;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--primary);
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ==========================================================================
   顶部实用信息条 (Utility Bar)
   ========================================================================== */
.top-bar {
  background-color: #111827;
  color: #9ca3af;
  font-size: 0.8125rem;
  border-bottom: 1px solid #1f2937;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  max-width: 520px;
  white-space: nowrap;
}

.ticker-link {
  color: #e5e7eb;
}
.ticker-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   主头部与导航 (Header & Navigation)
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo-badge {
  background: var(--primary);
  color: #ffffff;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 800;
}

.brand-text {
  color: #111827;
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-color);
  padding-left: 0.75rem;
  line-height: 1.25;
  display: none;
}

@media (min-width: 640px) {
  .brand-tagline {
    display: block;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-search-form {
  position: relative;
  display: none;
}

@media (min-width: 768px) {
  .header-search-form {
    display: block;
    width: 240px;
  }
}

.header-search-input {
  width: 100%;
  padding: 0.45rem 2.2rem 0.45rem 0.85rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  background: var(--bg-alt);
  outline: none;
  transition: all 0.2s ease;
}

.header-search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.header-search-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0;
}

.mobile-menu-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* 主导航条 */
.main-nav {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: rgba(211, 47, 47, 0.03);
}

/* 移动端抽屉导航 */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: #ffffff;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.6rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.mobile-nav-link.active, .mobile-nav-link:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

/* ==========================================================================
   页面结构与栅格布局
   ========================================================================== */
.site-content {
  flex: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.section-block {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.section-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 70px;
  height: 2px;
  background: var(--primary);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

.section-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.section-more:hover {
  color: var(--primary);
}

/* ==========================================================================
   首页第1屏：娱乐头条网格 (Top Headlines)
   ========================================================================== */
.headlines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .headlines-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.hero-headline-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111827;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  box-shadow: var(--shadow-md);
}

.hero-headline-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-headline-card:hover img {
  transform: scale(1.03);
}

.hero-headline-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  padding: 1.75rem;
}

.hero-headline-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

@media (min-width: 768px) {
  .hero-headline-title {
    font-size: 1.85rem;
  }
}

.hero-headline-desc {
  font-size: 0.9375rem;
  color: #e5e7eb;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sub-headlines-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sub-headline-card {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sub-headline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sub-headline-thumb {
  width: 130px;
  min-width: 130px;
  height: 95px;
  overflow: hidden;
  background: #e2e8f0;
}

.sub-headline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sub-headline-card:hover .sub-headline-thumb img {
  transform: scale(1.05);
}

.sub-headline-content {
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.sub-headline-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-category {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   第2屏：24小时即时快讯时间线 (Live Timeline)
   ========================================================================== */
.timeline-stream {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1.25rem;
  border-left: 2px solid var(--border-color);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
}

.timeline-time {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   标准新闻卡片网格 (News Grid 3/4 Columns)
   ========================================================================== */
.news-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .news-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-card-thumb {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #e2e8f0;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-thumb img {
  transform: scale(1.04);
}

.news-card-category-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(17, 24, 39, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.news-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: #111827;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   第9屏：明星与影视人物卡 (Star Profiles)
   ========================================================================== */
.stars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .stars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stars-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.star-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-align: center;
  padding: 1.25rem 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.star-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.star-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 0.75rem auto;
  overflow: hidden;
  border: 3px solid #f1f5f9;
  box-shadow: var(--shadow-sm);
}

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

.star-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.2rem;
}

.star-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.star-works-tag {
  display: inline-block;
  background: var(--bg-alt);
  color: #4b5563;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* ==========================================================================
   第10屏：娱乐专题卡片 (Topic Grid)
   ========================================================================== */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .topics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.topic-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  border: 1px solid #334155;
  transition: transform 0.2s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.topic-badge {
  align-self: flex-start;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.topic-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.topic-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.topic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.5rem;
}

/* ==========================================================================
   新闻正文详情页 (News Detail Layout)
   ========================================================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 8fr 4fr;
  }
}

.article-main {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .article-main {
    padding: 2.25rem;
  }
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb-separator {
  color: var(--text-light);
}

.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 2.25rem;
  }
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #4b5563;
}

.article-meta-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #bbf7d0;
}

.article-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-main);
}
.tool-btn:hover {
  background: var(--bg-alt);
}

.article-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #374151;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 500;
}

.article-cover {
  margin-bottom: 1.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.cover-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 0.5rem;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #1f2937;
}

.article-body p {
  margin-bottom: 1.5rem;
  text-align: justify;
  text-justify: inter-ideograph;
}

.article-tags-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.tag-badge {
  background: var(--bg-alt);
  color: #374151;
  font-size: 0.8125rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}
.tag-badge:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.correction-box {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #991b1b;
}

/* 侧边栏 (Sidebar) */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.sidebar-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: #e2e8f0;
  color: #475569;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rank-num.top-1 { background: #ef4444; color: #ffffff; }
.rank-num.top-2 { background: #f97316; color: #ffffff; }
.rank-num.top-3 { background: #f59e0b; color: #ffffff; }

.rank-text {
  line-height: 1.4;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   分类页面专有样式 (Category Page)
   ========================================================================== */
.category-hero {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.category-hero h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 0.6rem;
}

.category-hero p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   明星与影视作品详情页 (Star & Work Detail)
   ========================================================================== */
.star-profile-header {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .star-profile-header {
    grid-template-columns: 240px 1fr;
  }
}

.star-profile-photo {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.star-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.star-info-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.star-awards-list, .star-works-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.star-works-table th, .star-works-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.875rem;
}

.star-works-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: #111827;
}

/* ==========================================================================
   页脚 (Footer)
   ========================================================================== */
.site-footer {
  background: #111827;
  color: #9ca3af;
  margin-top: auto;
  border-top: 4px solid var(--primary);
  font-size: 0.875rem;
}

.footer-top {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col h3 {
  color: #f3f4f6;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8125rem;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   全局实用组件与交互效果
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease;
}

/* 打印样式支持 */
@media print {
  .top-bar, .site-header, .site-footer, .article-sidebar, .article-tools, .back-to-top {
    display: none !important;
  }
  .article-layout {
    display: block !important;
  }
  .article-main {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}
