/* ===================================================
   糖心vlog - 主样式表
   https://www.ykhrexe.cn
   =================================================== */

/* ===== CSS变量 ===== */
:root {
  --primary: #e8517a;
  --primary-dark: #c93d64;
  --primary-light: #ff8fab;
  --primary-bg: #fff8fa;
  --secondary: #1a1a2e;
  --text: #333;
  --text-muted: #888;
  --border: #f0e0e6;
  --white: #ffffff;
  --shadow: 0 2px 20px rgba(232, 81, 122, 0.1);
  --radius: 12px;
  --transition: all 0.3s ease;
  --font: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: #fafafa; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

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

/* ===== 顶部公告栏 ===== */
.top-bar { background: var(--secondary); color: rgba(255,255,255,0.85); font-size: 13px; padding: 8px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar-links { display: flex; gap: 16px; }
.top-bar-links a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.top-bar-links a:hover { color: var(--primary-light); }

/* ===== 导航栏 ===== */
.site-header { background: var(--white); box-shadow: 0 2px 20px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.logo-text { font-size: 20px; font-weight: 800; color: var(--primary); display: block; line-height: 1.2; }
.logo-sub { font-size: 11px; color: var(--text-muted); display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); transition: var(--transition); white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: var(--primary-bg); color: var(--primary); }
.nav-hot { position: relative; }
.nav-hot::after { content: 'HOT'; position: absolute; top: -2px; right: -2px; background: var(--primary); color: white; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 4px; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 搜索栏 ===== */
.search-bar-wrap { background: var(--primary-bg); border-bottom: 1px solid var(--border); padding: 12px 0; }
.search-bar-inner { display: flex; flex-direction: column; gap: 10px; }
.search-form { display: flex; gap: 0; max-width: 600px; }
.search-form input { flex: 1; padding: 10px 16px; border: 2px solid var(--border); border-right: none; border-radius: 25px 0 0 25px; font-size: 14px; outline: none; transition: var(--transition); background: white; }
.search-form input:focus { border-color: var(--primary); }
.search-form button { background: var(--primary); color: white; padding: 10px 22px; border-radius: 0 25px 25px 0; font-size: 14px; font-weight: 600; transition: var(--transition); }
.search-form button:hover { background: var(--primary-dark); }
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.search-tag { background: white; border: 1px solid var(--border); color: var(--text-muted); font-size: 12px; padding: 4px 12px; border-radius: 15px; cursor: pointer; transition: var(--transition); }
.search-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== Hero区域 ===== */
.hero-section { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; background: var(--secondary); }
.hero-bg { position: absolute; inset: 0; background: url('/images/hero-banner.jpg') center/cover no-repeat; opacity: 0.35; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,26,46,0.9) 0%, rgba(232,81,122,0.4) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 680px; padding: 60px 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(232,81,122,0.2); border: 1px solid rgba(232,81,122,0.4); color: var(--primary-light); font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; }
.hero-badge::before { content: '●'; color: #ff4d4d; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero-title { font-size: 48px; font-weight: 900; color: white; line-height: 1.2; margin-bottom: 20px; }
.hero-title .brand { color: var(--primary-light); }
.hero-desc { font-size: 16px; color: rgba(255,255,255,0.8); line-height: 1.8; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: white; padding: 13px 28px; border-radius: 30px; font-size: 15px; font-weight: 700; transition: var(--transition); box-shadow: 0 4px 20px rgba(232,81,122,0.4); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(232,81,122,0.5); }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; border: 2px solid rgba(255,255,255,0.6); color: white; padding: 11px 26px; border-radius: 30px; font-size: 15px; font-weight: 700; transition: var(--transition); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat-num { font-size: 26px; font-weight: 900; color: var(--primary-light); }
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* ===== 弹幕 ===== */
.danmu-wrap { display: flex; gap: 32px; overflow: hidden; white-space: nowrap; }
.danmu-item { font-size: 13px; color: var(--primary); background: rgba(232,81,122,0.08); padding: 4px 14px; border-radius: 20px; animation: danmu-scroll 20s linear infinite; flex-shrink: 0; }
@keyframes danmu-scroll { 0%{transform:translateX(100vw)} 100%{transform:translateX(-100%)} }

/* ===== 通用Section ===== */
.section { padding: 72px 0; }
.section-alt { background: #f8f4f6; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag { display: inline-block; background: rgba(232,81,122,0.1); color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 2px; padding: 4px 14px; border-radius: 20px; margin-bottom: 12px; }
.section-title { font-size: 30px; font-weight: 800; color: var(--secondary); margin-bottom: 12px; }
.section-desc { font-size: 15px; color: var(--text-muted); max-width: 600px; margin: 0 auto; line-height: 1.7; }
.section-more { text-align: center; margin-top: 40px; }

/* ===== 视频卡片 ===== */
.video-grid { display: grid; gap: 20px; }
.video-grid-4 { grid-template-columns: repeat(4, 1fr); }
.video-grid-3 { grid-template-columns: repeat(3, 1fr); }
.video-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: var(--transition); cursor: pointer; }
.video-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(232,81,122,0.2); }
.video-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #f0e0e6; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0); transition: background 0.3s; }
.video-card:hover .video-play-btn { background: rgba(0,0,0,0.35); }
.play-icon { width: 52px; height: 52px; background: rgba(255,255,255,0.95); border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.7); transition: all 0.3s; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.play-icon svg { width: 22px; height: 22px; fill: var(--primary); margin-left: 3px; }
.video-card:hover .play-icon { opacity: 1; transform: scale(1); }
.video-duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.75); color: white; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.video-badge { position: absolute; top: 8px; left: 8px; background: var(--primary); color: white; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.video-info { padding: 14px; }
.video-title { font-size: 14px; font-weight: 600; color: var(--secondary); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; justify-content: space-between; align-items: center; }
.video-author { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.video-author-avatar { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.video-stats { display: flex; gap: 8px; }
.video-stat { font-size: 12px; color: var(--text-muted); }

/* ===== 分类Tab ===== */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cat-tab { padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text-muted); background: white; border: 1px solid var(--border); transition: var(--transition); }
.cat-tab:hover, .cat-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== AI区域 ===== */
.ai-section { background: linear-gradient(135deg, #1a1a2e 0%, #2d1b33 100%); color: white; }
.ai-section .section-title { color: white; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ai-features { display: flex; flex-direction: column; gap: 24px; }
.ai-feature-item { display: flex; gap: 16px; align-items: flex-start; }
.ai-feature-icon { width: 48px; height: 48px; background: rgba(232,81,122,0.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ai-feature-title { font-size: 16px; font-weight: 700; color: white; margin-bottom: 6px; }
.ai-feature-desc { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.7; }
.ai-image-wrap img { width: 100%; border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,0.4); }

/* ===== 社区功能 ===== */
.community-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: white; border-radius: var(--radius); padding: 28px 22px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); border-top: 3px solid transparent; }
.feature-card:hover { transform: translateY(-4px); border-top-color: var(--primary); box-shadow: 0 8px 30px rgba(232,81,122,0.15); }
.feature-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.feature-name { font-size: 16px; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ===== 专家卡片 ===== */
.expert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.expert-card { background: white; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); }
.expert-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(232,81,122,0.2); }
.expert-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px; object-fit: cover; border: 3px solid var(--border); }
.expert-name { font-size: 17px; font-weight: 700; color: var(--secondary); margin-bottom: 4px; }
.expert-title { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.expert-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.expert-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; }
.expert-tag { background: var(--primary-bg); color: var(--primary); font-size: 11px; padding: 3px 10px; border-radius: 10px; }
.expert-actions { display: flex; gap: 8px; justify-content: center; }
.btn-sm { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; transition: var(--transition); }
.btn-sm-primary { background: var(--primary); color: white; }
.btn-sm-primary:hover { background: var(--primary-dark); }
.btn-sm-outline { border: 1px solid var(--primary); color: var(--primary); }
.btn-sm-outline:hover { background: var(--primary-bg); }

/* ===== 合作伙伴 ===== */
.partner-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.partner-item { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px 24px; font-size: 14px; font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.partner-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* ===== 步骤 ===== */
.howto-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card { background: white; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); }
.step-card:hover { transform: translateY(-4px); }
.step-num { width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; margin: 0 auto 16px; }
.step-title { font-size: 16px; font-weight: 700; color: var(--secondary); margin-bottom: 10px; }
.step-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ===== 联系卡片 ===== */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card { background: white; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); transition: var(--transition); }
.contact-card:hover { transform: translateY(-4px); }
.contact-icon { font-size: 32px; margin-bottom: 12px; }
.contact-title { font-size: 16px; font-weight: 700; color: var(--secondary); margin-bottom: 10px; }
.contact-info { font-size: 13px; color: var(--text-muted); line-height: 1.9; }
.qr-wrap { margin-top: 14px; }
.qr-wrap img { width: 80px; height: 80px; border-radius: 8px; border: 1px solid var(--border); }

/* ===== 用户评价 ===== */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: var(--transition); }
.review-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(232,81,122,0.15); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.review-user-name { font-size: 15px; font-weight: 700; color: var(--secondary); }
.review-date { font-size: 12px; color: var(--text-muted); }
.review-stars { color: #f5a623; font-size: 14px; margin-bottom: 10px; }
.review-text { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 12px; }
.review-tag { font-size: 11px; background: var(--primary-bg); color: var(--primary); padding: 3px 10px; border-radius: 10px; display: inline-block; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.faq-question { padding: 18px 22px; font-size: 15px; font-weight: 600; color: var(--secondary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--primary); transition: var(--transition); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-item.open .faq-question { color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer > div { padding: 0 22px 18px; font-size: 14px; color: var(--text-muted); line-height: 1.8; }

/* ===== 分享区域 ===== */
.share-section { background: var(--primary-bg); padding: 16px 0; border-top: 1px solid var(--border); }
.share-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-label { font-size: 13px; color: var(--text-muted); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; transition: var(--transition); border: 1px solid var(--border); background: white; color: var(--text); }
.share-btn:hover { transform: translateY(-2px); }
.share-wechat:hover { background: #07c160; color: white; border-color: #07c160; }
.share-weibo:hover { background: #e6162d; color: white; border-color: #e6162d; }
.share-douyin:hover { background: #000; color: white; border-color: #000; }
.share-bilibili:hover { background: #00a1d6; color: white; border-color: #00a1d6; }

/* ===== 页脚 ===== */
.site-footer { background: var(--secondary); color: rgba(255,255,255,0.75); padding: 60px 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.1); }
.footer-brand p { font-size: 13px; line-height: 1.8; margin-top: 12px; color: rgba(255,255,255,0.6); }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo img { width: 36px; height: 36px; border-radius: 8px; }
.footer-logo-text { font-size: 18px; font-weight: 800; color: var(--primary-light); }
.footer-qr-row { display: flex; gap: 16px; margin-top: 16px; }
.footer-qr-item { text-align: center; }
.footer-qr-item img { width: 72px; height: 72px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); }
.footer-qr-item span { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary-light); padding-left: 4px; }
.footer-bottom { padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-logo-bottom { display: flex; align-items: center; gap: 10px; }
.footer-logo-bottom img { width: 28px; height: 28px; border-radius: 6px; opacity: 0.7; }
.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,0.4); transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--primary-light); }

/* ===== 面包屑 ===== */
.breadcrumb { background: var(--primary-bg); border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== 内页Banner ===== */
.inner-hero { background: linear-gradient(135deg, var(--secondary) 0%, #2d1b33 100%); color: white; padding: 60px 0; text-align: center; }
.inner-hero h1 { font-size: 36px; font-weight: 800; color: white; margin-bottom: 12px; }
.inner-hero p { font-size: 16px; color: rgba(255,255,255,0.75); }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { width: 38px; height: 38px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); background: white; border: 1px solid var(--border); transition: var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .video-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .expert-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .howto-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .video-grid-4, .video-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: 1fr; }
  .community-features { grid-template-columns: repeat(2, 1fr); }
  .expert-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .howto-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); gap: 4px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 16px; }
  .top-bar-links { display: none; }
  .hero-stats { gap: 20px; }
  .about-grid { grid-template-columns: 1fr !important; }
  .contact-layout { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .video-grid-4, .video-grid-3 { grid-template-columns: 1fr; }
  .community-features { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}
