/* ===== 糖心Vlog 主样式文件 ===== */
:root {
  --primary: #e8315a;
  --primary-light: #ff6b8a;
  --primary-dark: #c0254a;
  --secondary: #ff9a3c;
  --accent: #ffd166;
  --bg: #f8f9fa;
  --bg-white: #ffffff;
  --text-main: #1a1a2e;
  --text-sub: #555577;
  --text-light: #888899;
  --border: #e8e8f0;
  --shadow: 0 2px 12px rgba(232,49,90,0.08);
  --shadow-hover: 0 8px 28px rgba(232,49,90,0.18);
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== 容器 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部公告栏 ===== */
.top-bar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
  text-align: center;
}
.top-bar a { color: #ffe0e8; }
.top-bar span { margin: 0 12px; }

/* ===== 页头 ===== */
.site-header {
  background: var(--bg-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.logo-text { line-height: 1.2; }
.logo-text .brand { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo-text .tagline { font-size: 11px; color: var(--text-light); }

/* ===== 主导航 ===== */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  transition: all .2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: #fff0f3;
  color: var(--primary);
}
.main-nav a.nav-hot {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 6px 16px;
}
.main-nav a.nav-hot:hover { background: var(--primary-dark); color: #fff; }

/* ===== 搜索框 ===== */
.search-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 0 16px;
  transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: var(--primary); }
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 9px 0;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font);
}
.search-input-wrap input::placeholder { color: var(--text-light); }
.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
}
.search-btn:hover { background: var(--primary-dark); }
.search-hot-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; justify-content: center; }
.search-hot-tags span { font-size: 12px; color: var(--text-light); }
.search-hot-tags a {
  font-size: 12px;
  color: var(--text-sub);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 10px;
  transition: all .2s;
}
.search-hot-tags a:hover { border-color: var(--primary); color: var(--primary); background: #fff0f3; }

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== 英雄区 ===== */
.hero-section {
  background: linear-gradient(135deg, #fff0f3 0%, #fff8f0 100%);
  padding: 0 0 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  padding-top: 24px;
}
.hero-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.hero-main img { width: 100%; height: 420px; object-fit: cover; }
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 40px 24px 24px;
  color: #fff;
}
.hero-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
.hero-title { font-size: 22px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.hero-meta { font-size: 13px; opacity: .85; display: flex; gap: 14px; align-items: center; }

.hero-sidebar { display: flex; flex-direction: column; gap: 14px; }
.hero-side-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.hero-side-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.hero-side-card img { width: 100px; height: 68px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.hero-side-info { flex: 1; min-width: 0; }
.hero-side-tag { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.hero-side-title { font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-side-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ===== 区块通用 ===== */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-white); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
}
.section-more {
  font-size: 13px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-more:hover { color: var(--primary-dark); }

/* ===== 视频卡片 ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.video-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .25s, transform .25s;
  cursor: pointer;
}
.video-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.video-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #1a1a2e;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 52px; height: 52px;
  background: rgba(232,49,90,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s, opacity .25s;
  opacity: 0;
}
.video-play-btn svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.video-card:hover .video-play-btn { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
.video-hd-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.video-info { padding: 12px; }
.video-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
}
.video-stats { display: flex; gap: 10px; align-items: center; }
.video-stats span { display: flex; align-items: center; gap: 3px; }
.video-author { font-size: 12px; color: var(--text-sub); font-weight: 500; }
.video-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.video-tag {
  font-size: 11px;
  color: var(--primary);
  background: #fff0f3;
  border-radius: 10px;
  padding: 2px 8px;
}

/* ===== 新闻列表 ===== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.news-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-card-img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.news-card-body { flex: 1; min-width: 0; }
.news-card-cat { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.news-card-title { font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.news-card-meta { font-size: 12px; color: var(--text-light); display: flex; gap: 10px; }

/* ===== 专题策划 ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.topic-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.topic-card img { width: 100%; height: 200px; object-fit: cover; transition: transform .35s; }
.topic-card:hover img { transform: scale(1.05); }
.topic-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 30px 16px 16px;
  color: #fff;
}
.topic-label { font-size: 11px; background: var(--secondary); color: #fff; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-bottom: 6px; font-weight: 600; }
.topic-title { font-size: 16px; font-weight: 800; line-height: 1.4; }
.topic-count { font-size: 12px; opacity: .8; margin-top: 4px; }

/* ===== 热门阅读排行 ===== */
.ranking-list { display: flex; flex-direction: column; gap: 0; }
.ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { background: #fff8fa; margin: 0 -16px; padding: 14px 16px; border-radius: 8px; }
.ranking-num {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.ranking-num.top1 { background: #e8315a; color: #fff; }
.ranking-num.top2 { background: #ff6b3d; color: #fff; }
.ranking-num.top3 { background: #ffa500; color: #fff; }
.ranking-num.other { background: #f0f0f5; color: var(--text-light); }
.ranking-info { flex: 1; min-width: 0; }
.ranking-title { font-size: 14px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.ranking-views { font-size: 12px; color: var(--text-light); flex-shrink: 0; }

/* ===== 作者卡片 ===== */
.author-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.author-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.author-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.author-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--primary-light);
}
.author-name { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.author-role { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.author-count { font-size: 13px; color: var(--primary); font-weight: 600; }
.author-follow-btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 6px 20px;
  border-radius: 20px;
  font-weight: 600;
  transition: background .2s;
}
.author-follow-btn:hover { background: var(--primary-dark); color: #fff; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  gap: 12px;
}
.faq-question::before {
  content: 'Q';
  width: 24px; height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}
.faq-arrow {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform .25s;
  color: var(--text-light);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}
.faq-item.open .faq-answer { max-height: 200px; padding: 0 20px 16px; }

/* ===== 用户评论 ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.review-stars { color: #ffd166; font-size: 16px; margin-bottom: 10px; }
.review-content { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 12px; font-style: italic; }
.review-user { display: flex; align-items: center; gap: 8px; }
.review-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.review-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
.review-date { font-size: 11px; color: var(--text-light); }

/* ===== 联系/投稿区 ===== */
.contact-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 56px 0;
  text-align: center;
  color: #fff;
}
.contact-title { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.contact-desc { font-size: 16px; opacity: .9; margin-bottom: 28px; }
.contact-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-white {
  background: #fff;
  color: var(--primary);
  padding: 12px 32px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-white:hover { background: #fff0f3; color: var(--primary-dark); transform: translateY(-2px); }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 12px 32px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  transition: all .2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ===== 热门标签云 ===== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text-sub);
  transition: all .2s;
  cursor: pointer;
}
.tag-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.tag-item.hot { background: #fff0f3; color: var(--primary); border-color: var(--primary-light); }

/* ===== 页脚 ===== */
.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo-text .brand { color: #fff; }
.footer-brand .logo-text .tagline { color: rgba(255,255,255,0.5); }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.8; margin-top: 14px; }
.footer-col h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.55); transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary-light); }
.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: var(--primary-light); }
.footer-links { display: flex; gap: 16px; }

/* ===== 侧边栏 ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 两栏布局 ===== */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* ===== 统计数字 ===== */
.stats-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.stats-inner {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ===== 移动端适配 ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-main);
}

@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sidebar { flex-direction: row; flex-wrap: wrap; }
  .hero-side-card { flex: 1; min-width: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col-layout { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 999; }
  .mobile-menu-btn { display: block; }
  .header-inner { position: relative; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-inner { gap: 20px; }
  .hero-main img { height: 240px; }
  .section { padding: 32px 0; }
  .section-title { font-size: 18px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-title { font-size: 22px; }
}

/* ===== 加载动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .5s ease forwards; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
