/* ===================================================
   糖心 - 主样式文件
   Brand: 糖心 | Domain: njty8y.cn
   =================================================== */

/* ---- CSS Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #0d0d0d;
  color: #e8e8e8;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: #e8b84b; text-decoration: none; transition: color .25s; }
a:hover { color: #f5d07a; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ---- CSS Variables ---- */
:root {
  --red: #c0392b;
  --red-dark: #922b21;
  --gold: #e8b84b;
  --gold-light: #f5d07a;
  --dark: #0d0d0d;
  --dark2: #161616;
  --dark3: #1e1e1e;
  --dark4: #252525;
  --border: #2e2e2e;
  --text: #e8e8e8;
  --text-muted: #888;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --transition: all .3s ease;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: .8rem; color: #ccc; }

/* ---- Layout ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding: 70px 0; }
.section-sm { padding: 40px 0; }
.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
}
.section-title p { color: var(--text-muted); margin-top: 12px; }

/* ---- Header ---- */
#header {
  position: sticky;
  top: 0; z-index: 1000;
  background: rgba(13,13,13,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .05em;
}
.logo-text span { color: var(--gold); }

/* ---- Navigation ---- */
.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-main a {
  color: #ccc;
  font-size: .9rem;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-main a:hover,
.nav-main a.active {
  color: var(--gold);
  background: rgba(232,184,75,.08);
}

/* ---- Search Bar ---- */
.search-bar-wrap {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.search-form {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  transition: border-color .25s;
}
.search-form:focus-within { border-color: var(--gold); }
.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 9px 18px;
  font-size: .95rem;
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: none;
  color: #fff;
  padding: 9px 22px;
  cursor: pointer;
  font-size: .9rem;
  transition: opacity .2s;
}
.search-form button:hover { opacity: .85; }

/* ---- Hero Banner ---- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-banner.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(.45);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .8rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: .08em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 18px;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 1.05rem; color: #ccc; margin-bottom: 28px; }
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(192,57,43,.4); color: #fff; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #000; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ---- Stats Bar ---- */
.stats-bar {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2rem;
  color: var(--gold);
  font-weight: 800;
}
.stat-item p { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* ---- Video Cards ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.video-card {
  background: var(--dark3);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.video-thumb {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: #111;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.video-card:hover .video-thumb img { transform: scale(1.06); }
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  background: rgba(0,0,0,.4);
}
.video-card:hover .play-btn { opacity: 1; }
.play-icon {
  width: 56px; height: 56px;
  background: rgba(192,57,43,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.play-icon svg { fill: #fff; width: 22px; height: 22px; margin-left: 4px; }
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .75rem;
  padding: 2px 7px;
  border-radius: 4px;
}
.video-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 4px;
}
.video-info { padding: 14px; }
.video-info h4 {
  font-size: .95rem;
  margin-bottom: 8px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .8rem;
  color: var(--text-muted);
}
.video-meta span { display: flex; align-items: center; gap: 4px; }

/* ---- Category Tabs ---- */
.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.cat-tab {
  padding: 7px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .88rem;
  cursor: pointer;
  transition: var(--transition);
  background: var(--dark3);
}
.cat-tab:hover, .cat-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ---- Feature Cards ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(232,184,75,.1);
}
.feature-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 10px; }
.feature-card p { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---- Expert Cards ---- */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.expert-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.expert-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.expert-photo {
  width: 100%; height: 220px;
  object-fit: cover;
  object-position: top;
}
.expert-info { padding: 20px; }
.expert-name { font-size: 1.1rem; font-weight: 700; color: #fff; }
.expert-title { color: var(--gold); font-size: .85rem; margin: 4px 0 10px; }
.expert-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.expert-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.expert-tag {
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.3);
  color: #e88;
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 12px;
}
.expert-btns { display: flex; gap: 8px; }

/* ---- Reviews ---- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
}
.review-card:hover { border-color: var(--gold); }
.review-stars { color: var(--gold); font-size: 1rem; margin-bottom: 10px; }
.review-text { font-size: .9rem; color: #ccc; margin-bottom: 14px; font-style: italic; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}
.review-name { font-size: .88rem; font-weight: 600; color: #fff; }
.review-date { font-size: .78rem; color: var(--text-muted); }

/* ---- FAQ ---- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  transition: background .2s;
}
.faq-q:hover { background: var(--dark4); }
.faq-q .arrow {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s;
  font-size: .7rem;
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s;
  padding: 0 22px;
  color: #aaa;
  font-size: .92rem;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 22px 18px; }

/* ---- Partners ---- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.partner-item {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-size: .88rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.partner-item:hover { border-color: var(--gold); color: var(--gold); }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-info-item h4 { font-size: .9rem; color: var(--gold); margin-bottom: 4px; }
.contact-info-item p { font-size: .88rem; color: #aaa; margin: 0; }
.qr-group { display: flex; gap: 20px; flex-wrap: wrap; }
.qr-item { text-align: center; }
.qr-item img { width: 120px; height: 120px; border-radius: 8px; border: 2px solid var(--border); }
.qr-item p { font-size: .78rem; color: var(--text-muted); margin-top: 6px; }

/* ---- How-To Steps ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.step-item {
  text-align: center;
  padding: 28px 20px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.step-num {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
}
.step-item h4 { margin-bottom: 8px; }
.step-item p { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* ---- Share Bar ---- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  color: #fff;
}
.share-wechat { background: #07c160; }
.share-weibo { background: #e6162d; }
.share-douyin { background: #000; border: 1px solid #333; }
.share-bilibili { background: #00a1d6; }
.share-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ---- Footer ---- */
#footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-wrap { margin-bottom: 16px; }
.footer-brand p { font-size: .88rem; color: var(--text-muted); }
.footer-col h4 {
  color: var(--gold);
  font-size: .95rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: .88rem; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--gold); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  background: var(--dark2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 8px; }

/* ---- Inner Page Hero ---- */
.page-hero {
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  border-bottom: 1px solid var(--border);
  padding: 50px 0;
  text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ---- Tags ---- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--dark4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: 16px;
  transition: var(--transition);
}
.tag:hover { border-color: var(--gold); color: var(--gold); }

/* ---- Highlight Box ---- */
.highlight-box {
  background: linear-gradient(135deg, rgba(192,57,43,.1), rgba(232,184,75,.05));
  border: 1px solid rgba(232,184,75,.2);
  border-radius: var(--radius);
  padding: 28px;
}

/* ---- Mobile Menu ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ---- Lazy Load ---- */
img[data-src] { opacity: 0; transition: opacity .4s; }
img.loaded { opacity: 1; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-main { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: rgba(13,13,13,.98); padding: 16px; border-bottom: 1px solid var(--border); gap: 4px; }
  .nav-main.open { display: flex; }
  .nav-main a { padding: 10px 16px; border-radius: 6px; }
  .menu-toggle { display: block; }
  #header { position: relative; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { min-height: 380px; }
  .section { padding: 50px 0; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-group { flex-direction: column; }
  .expert-grid { grid-template-columns: 1fr; }
}
