/* 91 修车改装视频社区 - 原创样式 */
/* 颜色方案: 深蓝黑+赛车红 */

:root {
  --primary: #1a1a2e;
  --secondary: #e94560;
  --accent: #0f3460;
  --bg-dark: #16213e;
  --bg-card: #1f2b47;
  --text-light: #eaeaea;
  --text-muted: #a0aec0;
  --gold: #f0c040;
  --gradient-red: linear-gradient(135deg, #e94560, #c0392b);
  --gradient-blue: linear-gradient(135deg, #0f3460, #1a1a2e);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--primary);
  color: var(--text-light);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 头部导航 */
.site-header {
  background: rgba(26,26,46,0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 2px solid var(--secondary);
  padding: 0 20px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 42px; width: auto; }
.logo-text {
  font-size: 28px;
  font-weight: 900;
  color: var(--secondary);
  letter-spacing: 2px;
}

.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  color: var(--text-light);
  padding: 22px 16px;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  white-space: nowrap;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--secondary);
  transition: var(--transition);
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 80%; }
.main-nav a:hover { color: var(--secondary); }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}
.mobile-toggle span {
  width: 26px;
  height: 3px;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition);
}

/* 搜索框 */
.search-bar {
  background: var(--bg-dark);
  padding: 14px 0;
  border-bottom: 1px solid rgba(233,69,96,0.2);
  margin-top: 68px;
}
.search-bar .container { display: flex; justify-content: center; }
.search-form {
  display: flex;
  max-width: 600px;
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
  border: 2px solid var(--accent);
}
.search-form input {
  flex: 1;
  padding: 12px 24px;
  border: none;
  background: var(--bg-card);
  color: var(--text-light);
  font-size: 15px;
  outline: none;
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  padding: 12px 28px;
  background: var(--gradient-red);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.search-form button:hover { opacity: 0.85; }

/* Banner */
.hero-banner {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-banner .bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 30px;
  max-width: 800px;
}
.hero-content h1 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-content h1 span { color: var(--secondary); }
.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.8;
}
.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--gradient-red);
  color: #fff;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(233,69,96,0.4);
}
.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(233,69,96,0.5);
  color: #fff;
}

/* 通用区块 */
.section {
  padding: 60px 0;
}
.section-alt {
  background: var(--bg-dark);
}
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}
.section-title h2 span { color: var(--secondary); }
.section-title p {
  color: var(--text-muted);
  font-size: 16px;
}
.section-title .tag {
  display: inline-block;
  background: var(--gradient-red);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 10px;
}

/* 视频卡片网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(233,69,96,0.2);
}
.video-card .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.video-card:hover .thumb img { transform: scale(1.05); }
.video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 60px;
  height: 60px;
  background: rgba(233,69,96,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.video-card:hover .play-btn { transform: translate(-50%, -50%) scale(1); }
.play-btn::after {
  content: '';
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.video-card .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.video-card .card-body { padding: 16px; }
.video-card .card-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card .meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}
.video-card .meta .views::before { content: '播放 '; }
.video-card .meta .likes::before { content: '点赞 '; }
.video-card .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.video-card .tags span {
  background: rgba(233,69,96,0.15);
  color: var(--secondary);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 专家卡片 */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.expert-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid rgba(233,69,96,0.1);
}
.expert-card:hover {
  transform: translateY(-6px);
  border-color: var(--secondary);
}
.expert-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--secondary);
}
.expert-card h3 { font-size: 18px; margin-bottom: 6px; }
.expert-card .role {
  color: var(--secondary);
  font-size: 14px;
  margin-bottom: 12px;
}
.expert-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.expert-card .expert-credentials {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.8;
}

.expert-card .btn-sm {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gradient-red);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  margin: 4px;
  transition: var(--transition);
}
.expert-card .btn-sm:hover { opacity: 0.85; color: #fff; }

/* AI赋能模块 */
.ai-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.ai-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(15,52,96,0.5);
}
.ai-card:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
}
.ai-card .icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}
.ai-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--secondary);
}
.ai-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ai-section-img {
  border-radius: 12px;
  margin-top: 30px;
}

.ai-showcase {
  text-align: center;
}
.ai-showcase img {
  border-radius: var(--radius);
  margin: 30px auto 0;
}

/* 合作品牌墙 */
.brand-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  align-items: center;
}
.brand-wall .brand-item {
  background: var(--bg-card);
  padding: 20px 30px;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
}
.brand-wall .brand-item:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.faq-item .faq-q {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
}
.faq-item .faq-q:hover { color: var(--secondary); }
.faq-item .faq-q .arrow {
  transition: var(--transition);
  font-size: 20px;
  color: var(--secondary);
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-item .faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}
.faq-item.open .faq-a {
  padding: 0 24px 18px;
  max-height: 300px;
}

/* 用户评论 */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--secondary);
  transition: var(--transition);
}
.review-card:hover { transform: translateY(-4px); }
.review-card .stars {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 10px;
}
.review-card .review-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
  font-style: italic;
}
.review-card .reviewer {
  font-weight: 700;
  font-size: 14px;
}
.review-card .review-date {
  color: var(--text-muted);
  font-size: 12px;
}

/* 联系我们 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
}
.contact-card h3 {
  color: var(--secondary);
  margin-bottom: 16px;
  font-size: 20px;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 8px;
  text-align: left;
}

/* 社交分享 */
.share-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  transition: var(--transition);
}
.share-btn:hover { transform: translateY(-2px); color: #fff; opacity: 0.9; }
.share-btn.wechat { background: #07c160; }
.share-btn.weibo { background: #e6162d; }
.share-btn.douyin { background: #161823; border: 1px solid #fff; }
.share-btn.bilibili { background: #00a1d6; }

/* 页脚 */
.site-footer {
  background: var(--bg-dark);
  border-top: 2px solid var(--secondary);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 {
  color: var(--secondary);
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(233,69,96,0.3);
}
.footer-col p, .footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 2;
  display: block;
}
.footer-col a:hover { color: var(--secondary); }
.footer-qr { display: flex; gap: 20px; justify-content: center; }
.footer-qr .qr-item { text-align: center; }
.footer-qr .qr-item img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 2px solid var(--accent);
}
.footer-qr .qr-item p { font-size: 13px; color: var(--text-muted); }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 13px;
}
.footer-bottom p { margin-bottom: 6px; }
.footer-bottom a { color: var(--text-muted); font-size: 13px; }
.footer-bottom a:hover { color: var(--secondary); }

.footer-logo-bottom {
  text-align: center;
  margin-top: 16px;
}
.footer-logo-bottom .logo {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.footer-logo-bottom .logo-text {
  font-size: 22px;
}

/* 面包屑 */
.breadcrumb {
  padding: 14px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span { margin: 0 8px; }

/* How-To指南 */
.howto-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.howto-step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  counter-increment: step;
}
.howto-step::before {
  content: counter(step);
  display: block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  background: var(--gradient-red);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 16px;
}
.howto-step h3 { font-size: 16px; margin-bottom: 8px; }
.howto-step p { color: var(--text-muted); font-size: 14px; }

/* 内页通用 */
.page-hero {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-blue);
  text-align: center;
  margin-top: 68px;
}
.page-hero h1 {
  font-size: 36px;
  font-weight: 900;
}
.page-hero h1 span { color: var(--secondary); }
.page-hero p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 10px;
}

.page-content {
  padding: 40px 0;
}
.page-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.page-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 30px 0 15px;
  color: var(--text-light);
}
.page-content h2 span { color: var(--secondary); }
.page-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text-light);
}

/* 隐私政策/服务条款页面 */
.legal-content {
  padding: 40px 0;
}
.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 30px 0 15px;
  color: var(--text-light);
  border-left: 4px solid var(--secondary);
  padding-left: 12px;
}
.legal-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-content ul {
  color: var(--text-muted);
  padding-left: 24px;
  margin-bottom: 14px;
}
.legal-content ul li {
  line-height: 1.8;
  margin-bottom: 6px;
}

/* 回到顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--gradient-red);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(233,69,96,0.4);
  transition: var(--transition);
}
#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233,69,96,0.5);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .logo-text { font-size: 22px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    background: var(--primary);
    flex-direction: column;
    border-top: 1px solid var(--accent);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .mobile-toggle { display: flex; }
  .search-bar { margin-top: 56px; }
  .hero-banner { height: 380px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p { font-size: 15px; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 24px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { height: 220px; margin-top: 56px; }
  .page-hero h1 { font-size: 26px; }
}

@media (max-width: 480px) {
  .hero-banner { height: 300px; }
  .hero-content h1 { font-size: 22px; }
  .video-grid { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: 1fr; }
  .ai-features { grid-template-columns: 1fr; }
}

/* 懒加载占位 */
.lazy { opacity: 0; transition: opacity 0.5s ease; }
.lazy.loaded { opacity: 1; }
