/* ============================================
   51视频 - 原创样式表
   品牌：51视频 | 域名：ysnkgd.cn
   配色：星辰紫金主题（仙逆风格）
   ============================================ */

/* --- CSS变量定义 --- */
:root {
  --primary: #6B2FA0;
  --primary-light: #8B4FC0;
  --primary-dark: #4A1D70;
  --accent: #F0A030;
  --accent-light: #FFD080;
  --accent-dark: #C07810;
  --dark: #1A0E2E;
  --dark-mid: #2D1B4E;
  --light: #F5F0FF;
  --light-mid: #EDE5F8;
  --red: #E63946;
  --gray: #8B7FA3;
  --gray-light: #C4BDD6;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(107,47,160,0.15);
  --shadow-lg: 0 8px 40px rgba(107,47,160,0.2);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --font-main: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
}

/* --- 全局重置 --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--dark-mid);
  background: var(--light);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul,ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; color: var(--dark); }

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

/* --- 顶部导航 --- */
.site-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 50px; width: auto; }
.site-logo span {
  font-size: 1.5rem; font-weight: 800; color: var(--accent);
  text-shadow: 0 0 10px rgba(240,160,48,0.5);
}
.header-nav { display: flex; align-items: center; gap: 0; }
.header-nav a {
  color: var(--light); padding: 8px 16px; font-size: 0.95rem;
  border-radius: var(--radius-sm); transition: var(--transition);
  position: relative;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--accent); background: rgba(240,160,48,0.1);
}
.header-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0;
  height: 2px; background: var(--accent); transition: var(--transition);
  transform: translateX(-50%);
}
.header-nav a:hover::after, .header-nav a.active::after { width: 60%; }

/* 移动端菜单按钮 */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--light); font-size: 1.5rem;
}

/* --- 搜索栏 --- */
.search-bar {
  background: linear-gradient(90deg, var(--primary-dark), var(--dark));
  padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.1);
}
.search-bar .container { display: flex; justify-content: center; }
.search-form {
  display: flex; max-width: 600px; width: 100%;
  border-radius: 30px; overflow: hidden;
  box-shadow: 0 2px 15px rgba(107,47,160,0.3);
}
.search-form input {
  flex: 1; padding: 12px 24px; border: none; outline: none;
  font-size: 0.95rem; background: var(--white); color: var(--dark);
}
.search-form input::placeholder { color: var(--gray); }
.search-form button {
  padding: 12px 28px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white); font-size: 0.95rem; font-weight: 600;
  transition: var(--transition);
}
.search-form button:hover { background: linear-gradient(135deg, var(--accent-light), var(--accent)); }

/* --- Hero Banner --- */
.hero-section {
  position: relative; overflow: hidden;
  min-height: 480px; display: flex; align-items: center;
  background: var(--dark);
}
.hero-section .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.7;
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 80px 20px; width: 100%;
}
.hero-content h1 {
  font-size: 2.8rem; color: var(--white); margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-content h1 span { color: var(--accent); }
.hero-content p {
  font-size: 1.2rem; color: rgba(255,255,255,0.9); max-width: 700px;
  margin: 0 auto 30px; text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- 按钮样式 --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 30px; font-weight: 600;
  font-size: 0.95rem; transition: var(--transition); cursor: pointer;
  border: none; text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); box-shadow: 0 4px 15px rgba(107,47,160,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px); color: var(--white);
  box-shadow: 0 6px 25px rgba(107,47,160,0.5);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white); box-shadow: 0 4px 15px rgba(240,160,48,0.4);
}
.btn-accent:hover {
  transform: translateY(-2px); color: var(--white);
  box-shadow: 0 6px 25px rgba(240,160,48,0.5);
}
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid var(--accent); padding: 10px 26px;
}
.btn-outline:hover {
  background: var(--accent); color: var(--white);
  transform: translateY(-2px);
}

/* --- 区块标题 --- */
.section-title {
  text-align: center; margin-bottom: 48px; padding-top: 20px;
}
.section-title h2 {
  font-size: 2rem; color: var(--dark); margin-bottom: 12px;
  position: relative; display: inline-block;
}
.section-title h2::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 12px auto 0; border-radius: 2px;
}
.section-title p { color: var(--gray); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* --- 通用区块 --- */
.section { padding: 70px 0; }
.section-alt { background: var(--white); }
.section-dark {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
  color: var(--light);
}
.section-dark .section-title h2 { color: var(--white); }
.section-dark .section-title p { color: var(--gray-light); }

/* --- 视频卡片网格 --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.video-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); position: relative;
}
.video-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.video-thumb {
  position: relative; overflow: hidden; aspect-ratio: 16/9;
  cursor: pointer;
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.08); }
.play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(107,47,160,0.9); display: flex;
  align-items: center; justify-content: center;
  transition: var(--transition); opacity: 0;
}
.play-btn::after {
  content: ''; width: 0; height: 0;
  border-left: 18px solid var(--white);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}
.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1); opacity: 1;
}
.video-info { padding: 16px; }
.video-info h3 {
  font-size: 1rem; margin-bottom: 8px; color: var(--dark);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta {
  display: flex; gap: 12px; font-size: 0.82rem; color: var(--gray);
  flex-wrap: wrap;
}
.video-meta span { display: flex; align-items: center; gap: 4px; }
.video-tag {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white); padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.video-duration {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.7); color: var(--white);
  padding: 2px 8px; border-radius: 4px; font-size: 0.78rem;
}

/* --- 服务模块 --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  box-shadow: var(--shadow); transition: var(--transition);
  border-top: 3px solid transparent;
}
.service-card:hover {
  transform: translateY(-4px); border-top-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.service-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; color: var(--white);
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--dark); }
.service-card p { font-size: 0.9rem; color: var(--gray); }

/* --- 专家展示 --- */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.expert-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); text-align: center;
}
.expert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.expert-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  margin: 28px auto 16px; overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 15px rgba(240,160,48,0.3);
}
.expert-avatar img { width: 100%; height: 100%; object-fit: cover; }
.expert-info { padding: 0 20px 24px; }
.expert-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.expert-info .title { color: var(--primary); font-size: 0.88rem; margin-bottom: 10px; }
.expert-info p { font-size: 0.85rem; color: var(--gray); margin-bottom: 16px; }
.expert-btns { display: flex; gap: 10px; justify-content: center; }
.expert-btns a {
  padding: 6px 16px; border-radius: 20px; font-size: 0.82rem;
  font-weight: 600; transition: var(--transition);
}

/* --- 合作品牌 --- */
.brand-wall {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: center; align-items: center;
}
.brand-item {
  background: var(--white); padding: 16px 28px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  transition: var(--transition); font-size: 1rem;
  font-weight: 600; color: var(--gray);
}
.brand-item:hover { transform: scale(1.05); box-shadow: var(--shadow-lg); color: var(--primary); }

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-question {
  padding: 18px 24px; cursor: pointer; font-weight: 600;
  font-size: 1rem; color: var(--dark); display: flex;
  justify-content: space-between; align-items: center;
  transition: var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-question::after {
  content: '+'; font-size: 1.4rem; color: var(--primary);
  transition: var(--transition); flex-shrink: 0; margin-left: 12px;
}
.faq-item.active .faq-question::after { content: '-'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  padding: 0 24px;
}
.faq-item.active .faq-answer { max-height: 300px; padding: 0 24px 18px; }
.faq-answer p { font-size: 0.92rem; color: var(--gray); line-height: 1.8; }

/* --- 用户评论 --- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: var(--transition);
}
.review-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 1.1rem;
}
.review-name { font-weight: 600; font-size: 0.95rem; }
.review-stars { color: var(--accent); font-size: 0.85rem; }
.review-text { font-size: 0.9rem; color: var(--gray); line-height: 1.7; }
.review-date { font-size: 0.8rem; color: var(--gray-light); margin-top: 10px; }

/* --- 页脚 --- */
.site-footer {
  background: linear-gradient(135deg, var(--dark) 0%, #0D0618 100%);
  color: var(--gray-light); padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px; margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--accent); font-size: 1.05rem; margin-bottom: 16px;
  position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 30px; height: 2px; background: var(--accent);
}
.footer-col p, .footer-col li { font-size: 0.88rem; margin-bottom: 8px; }
.footer-col a { color: var(--gray-light); }
.footer-col a:hover { color: var(--accent); }
.footer-qr { display: flex; gap: 20px; margin-top: 12px; }
.footer-qr img { width: 100px; height: 100px; border-radius: var(--radius-sm); }
.footer-qr-label { text-align: center; font-size: 0.78rem; margin-top: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0; text-align: center; font-size: 0.82rem;
}
.footer-share { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; }
.footer-share a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex;
  align-items: center; justify-content: center;
  color: var(--gray-light); font-size: 0.9rem;
  transition: var(--transition);
}
.footer-share a:hover { background: var(--primary); color: var(--white); }

/* --- 面包屑 --- */
.breadcrumb {
  padding: 14px 0; font-size: 0.85rem; color: var(--gray);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* --- 内页Banner --- */
.page-banner {
  position: relative; min-height: 280px; display: flex;
  align-items: center; background: var(--dark); overflow: hidden;
}
.page-banner .banner-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.5;
}
.page-banner .banner-content {
  position: relative; z-index: 2; text-align: center; width: 100%;
  padding: 60px 20px;
}
.page-banner h1 { font-size: 2.2rem; color: var(--white); margin-bottom: 10px; }
.page-banner p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }

/* --- 内容区域 --- */
.content-area { padding: 50px 0; }
.content-area h2 { font-size: 1.6rem; margin-bottom: 16px; color: var(--dark); }
.content-area h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--dark-mid); }
.content-area p { margin-bottom: 16px; color: var(--dark-mid); }

/* --- How-To 指南 --- */
.howto-steps { max-width: 700px; margin: 0 auto; }
.howto-step {
  display: flex; gap: 20px; margin-bottom: 28px; align-items: flex-start;
}
.step-number {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 1.2rem;
}
.step-content h4 { font-size: 1.05rem; margin-bottom: 6px; color: var(--dark); }
.step-content p { font-size: 0.9rem; color: var(--gray); }

/* --- 联系信息 --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); text-align: center;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--dark); }
.contact-card p { font-size: 0.9rem; color: var(--gray); }

/* --- 社区功能 --- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.community-item {
  background: rgba(255,255,255,0.08); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}
.community-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}
.community-icon { font-size: 2rem; margin-bottom: 12px; }
.community-item h4 { font-size: 1rem; color: var(--white); margin-bottom: 6px; }
.community-item p { font-size: 0.82rem; color: var(--gray-light); }

/* --- 标签 --- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  padding: 4px 12px; border-radius: 20px; font-size: 0.78rem;
  background: var(--light-mid); color: var(--primary); font-weight: 500;
}

/* --- 懒加载占位 --- */
.lazy-placeholder {
  background: linear-gradient(90deg, var(--light-mid) 25%, var(--light) 50%, var(--light-mid) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 回到顶部 --- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: var(--transition); box-shadow: var(--shadow);
  border: none; font-size: 1.2rem; z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* --- 响应式设计 --- */
@media (max-width: 992px) {
  .header-nav { display: none; }
  .header-nav.active {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--dark);
    padding: 16px; gap: 4px; box-shadow: var(--shadow-lg);
  }
  .header-nav.active a { padding: 12px 16px; }
  .menu-toggle { display: block; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 1rem; }
  .section { padding: 50px 0; }
  .section-title h2 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero-section { min-height: 360px; }
  .hero-content { padding: 50px 16px; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .video-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; border-radius: var(--radius); }
  .search-form input { border-radius: var(--radius) var(--radius) 0 0; }
  .search-form button { border-radius: 0 0 var(--radius) var(--radius); }
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
}

/* --- 动画 --- */
.fade-in {
  opacity: 1; transform: translateY(0);
  animation: fadeInUp 0.6s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
