/* ============================================================
   51吃瓜 - 全局样式
   主题：深色底 + 醒目强调色（橙红/金黄）时尚娱乐风
   ============================================================ */
:root {
  --bg: #0b0b12;
  --bg-2: #12121d;
  --bg-3: #1a1a29;
  --card: #171722;
  --card-hover: #20202f;
  --text: #eceaf6;
  --muted: #9a98b0;
  --accent: #ff5a3c;
  --accent-2: #ffc93c;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --maxw: 1200px;
  --font: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --gradient: linear-gradient(120deg, #ff5a3c 0%, #ff8a3c 55%, #ffc93c 100%);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 辅助 ---------- */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 900; letter-spacing: 1px; }
.section-title .sub { color: var(--muted); font-size: 15px; margin-top: 10px; }
.section-title .bar { width: 56px; height: 4px; border-radius: 4px; background: var(--gradient); margin: 16px auto 0; }

.text-accent { color: var(--accent-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; transition: transform .3s, box-shadow .3s, background .3s;
  background: var(--gradient); color: #1a0f0a;
  box-shadow: 0 8px 24px rgba(255, 122, 60, .28);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(255, 122, 60, .38); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 18, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11, 11, 18, .95); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; letter-spacing: 1px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gradient); color: #1a0f0a; font-size: 18px; font-weight: 900;
  box-shadow: 0 6px 18px rgba(255, 122, 60, .35);
}
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a {
  padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
  color: var(--muted); transition: color .3s, background .3s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text); background: rgba(255,255,255,.06); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 10px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 90px 0 100px;
  background:
    radial-gradient(ellipse at 78% 20%, rgba(255, 90, 60, .18), transparent 52%),
    radial-gradient(ellipse at 12% 82%, rgba(255, 201, 60, .12), transparent 48%),
    var(--bg-2);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: radial-gradient(var(--text) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 54px); font-weight: 900; line-height: 1.25; letter-spacing: 1px; }
.hero .lead { color: var(--muted); font-size: 17px; margin: 20px 0 32px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-badges span {
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); color: var(--accent-2); background: rgba(255, 201, 60, .06);
}
.hero-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transform: rotate(1.5deg); }

/* ---------- Features ---------- */
.features { padding: 80px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; transition: transform .35s, border-color .35s, background .35s;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.feature-card:hover { transform: translateY(-8px); border-color: rgba(255, 122, 60, .4); background: var(--card-hover); }
.feature-card:hover::after { transform: scaleX(1); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 18px; background: rgba(255, 122, 60, .12);
}
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 14.5px; }

/* ---------- Hot list ---------- */
.hot-section { padding: 80px 0; background: var(--bg-2); }
.hot-list { display: flex; flex-direction: column; gap: 14px; max-width: 900px; margin: 0 auto; }
.hot-item {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 20px; transition: transform .3s, border-color .3s;
}
.hot-item:hover { transform: translateX(8px); border-color: rgba(255, 122, 60, .45); }
.hot-rank {
  width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; font-weight: 900; color: var(--accent-2); background: rgba(255, 201, 60, .1);
}
.hot-item:nth-child(1) .hot-rank, .hot-item:nth-child(2) .hot-rank, .hot-item:nth-child(3) .hot-rank {
  background: var(--gradient); color: #1a0f0a;
}
.hot-body { flex: 1; min-width: 0; }
.hot-body h3 { font-size: 17px; margin-bottom: 4px; }
.hot-body p { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-tag { font-size: 12px; color: var(--accent); border: 1px solid rgba(255, 90, 60, .4); border-radius: 999px; padding: 3px 10px; flex: none; }

/* ---------- Categories ---------- */
.categories { padding: 80px 0; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 190px;
  display: flex; align-items: flex-end; padding: 22px;
  background-size: cover; background-position: center;
  transition: transform .35s, box-shadow .35s;
}
.cat-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,14,.92) 8%, rgba(8,8,14,.25) 70%); }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.cat-card .cat-info { position: relative; z-index: 1; }
.cat-card h3 { font-size: 19px; margin-bottom: 6px; }
.cat-card p { color: var(--muted); font-size: 13.5px; }
.cat-count { font-size: 12px; color: var(--accent-2); margin-top: 8px; display: inline-block; }

/* ---------- Services ---------- */
.services { padding: 80px 0; background: var(--bg-2); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; text-align: center; transition: transform .35s, border-color .35s;
}
.service-card:hover { transform: translateY(-8px); border-color: rgba(255, 201, 60, .45); }
.service-card .icon { font-size: 40px; margin-bottom: 16px; }
.service-card h3 { font-size: 20px; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.service-link { color: var(--accent-2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.service-link:hover { letter-spacing: 1px; transition: letter-spacing .3s; }

/* ---------- News cards ---------- */
.news-section { padding: 80px 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s, border-color .35s, box-shadow .35s;
}
.news-card:hover { transform: translateY(-8px); border-color: rgba(255, 90, 60, .4); box-shadow: var(--shadow); }
.news-card img { aspect-ratio: 16/9; object-fit: cover; }
.news-body { padding: 22px; }
.news-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.news-meta .tag { color: var(--accent); font-weight: 700; }
.news-card h3 { font-size: 18px; line-height: 1.5; margin-bottom: 10px; }
.news-card h3 a:hover { color: var(--accent-2); }
.news-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { color: var(--accent-2); font-size: 14px; font-weight: 700; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--card); border: 1px solid var(--border);
  font-size: 14px; font-weight: 700; transition: background .3s, color .3s, border-color .3s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--gradient); color: #1a0f0a; border-color: transparent; }

/* ---------- Article detail ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 36px; }
.article-head .tag { color: var(--accent); font-size: 14px; font-weight: 700; }
.article-head h1 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; margin: 12px 0 16px; line-height: 1.35; }
.article-meta { color: var(--muted); font-size: 13.5px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow); }
.article-body p { margin-bottom: 22px; font-size: 16.5px; color: #d9d7e6; }
.article-body h2 { font-size: 24px; margin: 36px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); }
.article-body blockquote {
  border-left: 4px solid var(--accent-2); background: rgba(255, 201, 60, .06);
  padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 22px 0; color: var(--muted);
}
.article-body ul, .article-body ol { margin: 16px 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; color: #d9d7e6; }
.article-body li::marker { color: var(--accent); }
.article-body img { border-radius: var(--radius-sm); margin: 18px 0; }
.author-box {
  display: flex; align-items: center; gap: 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 30px 0;
}
.author-box img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.author-box strong { display: block; font-size: 16px; }
.author-box span { color: var(--muted); font-size: 13.5px; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tags-cloud a { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 13px; color: var(--muted); transition: color .3s, border-color .3s; }
.tags-cloud a:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Products / pricing ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; text-align: center; position: relative; transition: transform .35s, border-color .35s;
  display: flex; flex-direction: column;
}
.product-card.featured { border-color: rgba(255, 122, 60, .6); background: linear-gradient(180deg, rgba(255, 90, 60, .1), var(--card) 45%); }
.product-card:hover { transform: translateY(-8px); border-color: rgba(255, 122, 60, .5); }
.product-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #1a0f0a; font-size: 12px; font-weight: 900;
  padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.product-card h3 { font-size: 21px; margin-bottom: 12px; }
.product-price { font-size: 40px; font-weight: 900; color: var(--accent-2); margin: 14px 0; }
.product-price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.product-card ul { text-align: left; margin: 20px 0 26px; padding: 0 8px; }
.product-card li { padding: 7px 0 7px 26px; position: relative; color: #d9d7e6; font-size: 14.5px; }
.product-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 900; }
.product-card .btn { margin-top: auto; }

/* ---------- Compare table ---------- */
.compare-table { max-width: 860px; margin: 0 auto; overflow-x: auto; }
.compare-table table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.compare-table th { background: var(--bg-3); font-weight: 700; }
.compare-table tr:hover td { background: rgba(255,255,255,.02); }
.compare-table .yes { color: var(--accent-2); font-weight: 900; }
.compare-table .no { color: #66647a; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.info-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.info-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 122, 60, .12); }
.info-card h3 { font-size: 17px; margin-bottom: 4px; }
.info-card p { color: var(--muted); font-size: 14px; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.form-card h2 { font-size: 22px; margin-bottom: 6px; }
.form-card .form-tip { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #c9c7dd; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 12px 16px; font-size: 15px; font-family: var(--font);
  transition: border-color .3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 130px; resize: vertical; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat-card { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 16px; }
.stat-num { font-size: 38px; font-weight: 900; color: var(--accent-2); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-section { padding: 80px 0; background: var(--bg-2); }
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .3s; }
.faq-item.open { border-color: rgba(255, 122, 60, .45); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 18px 22px; font-size: 16px; font-weight: 700; font-family: var(--font); text-align: left;
}
.faq-question .q-mark { color: var(--accent); font-weight: 900; margin-right: 8px; }
.faq-question .arrow { color: var(--muted); transition: transform .35s; font-size: 14px; }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .45s ease; }
.faq-item.open .faq-answer { max-height: 320px; }
.faq-answer p { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; padding: 80px 0; text-align: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 90, 60, .22), transparent 60%),
    var(--bg-2);
}
.cta h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 900; }
.cta p { color: var(--muted); max-width: 560px; margin: 16px auto 32px; }
.cta .btn + .btn { margin-left: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: #08080e; border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col h3 { font-size: 16px; margin-bottom: 16px; color: #d9d7e6; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; transition: color .3s, padding-left .3s; }
.footer-col a:hover { color: var(--accent-2); padding-left: 6px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.footer-bottom a { color: var(--accent-2); }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--gradient); color: #1a0f0a; font-size: 18px; font-weight: 900;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s, transform .35s, visibility .35s;
  box-shadow: 0 10px 26px rgba(255, 122, 60, .35);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid, .news-grid, .product-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(11, 11, 18, .98); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px; gap: 4px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 13px 16px; font-size: 16px; }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 64px 0 70px; }
  .hero-img { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta .btn { display: flex; margin: 12px auto 0; }
  .cta .btn + .btn { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .feature-grid, .service-grid, .news-grid, .product-grid, .cat-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .section-title { margin-bottom: 28px; }
}
