/* ============================================================
   吃瓜前线 · 首页样式
   红色热搜风 · 热闹醒目
   ============================================================ */

:root {
  --bg: #fff7f5;
  --bg-2: #fff0ed;
  --surface: #ffffff;
  --surface-2: #fff5f0;
  --border: #ffd9d4;
  --border-2: #f5b8ae;
  --primary: #ff4d4f;
  --primary-2: #e63946;
  --accent: #fa8c16;
  --accent-2: #d46b08;
  --blue: #1890ff;
  --text: #262626;
  --text-2: #595959;
  --text-3: #8c8c8c;
  --grad: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  --grad-deep: linear-gradient(135deg, #ff4d4f 0%, #d9363e 100%);
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 18px 40px -16px rgba(230, 57, 70, 0.35);
  --shadow-sm: 0 8px 22px -10px rgba(230, 57, 70, 0.25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  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.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary-2);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-2);
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
  flex: 0 0 auto;
}

.logo .logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px -6px rgba(255, 77, 79, 0.7);
}

.logo .logo-mark svg {
  width: 26px;
  height: 26px;
}

.logo em {
  font-style: normal;
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  color: var(--text-2);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--surface-2);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-3);
  flex: 0 0 auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.13);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  width: 170px;
  color: var(--text);
  font-family: var(--font);
}

.search-box input::placeholder {
  color: var(--text-3);
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============ Hero ============ */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 420px at 88% -12%, rgba(255, 77, 79, 0.16), transparent 60%),
    radial-gradient(700px 380px at 4% 112%, rgba(250, 140, 22, 0.12), transparent 60%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 77, 79, 0.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 72%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 72%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid rgba(255, 77, 79, 0.35);
  color: var(--primary-2);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero h1 {
  font-size: 50px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .lead {
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(255, 77, 79, 0.8);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 36px -10px rgba(255, 77, 79, 0.9);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-2);
}

.btn-ghost:hover {
  color: var(--primary-2);
  border-color: var(--primary);
}

/* Hero 统计 */
.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
}

.hero-stats .stat strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-2);
}

.hero-stats .stat span {
  font-size: 13px;
  color: var(--text-3);
}

/* Hero 视觉：西瓜 + 浮动瓜条 */
.hero-visual {
  position: relative;
  height: 320px;
  display: grid;
  place-items: center;
}

.melon {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--grad-deep);
  box-shadow: 0 28px 50px -16px rgba(217, 54, 62, 0.55);
  animation: float 5s ease-in-out infinite;
}

.melon-flesh {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 60%, rgba(255,255,255,0.16) 0 16%, transparent 16.5%),
    radial-gradient(circle at 30% 78%, rgba(255,255,255,0.13) 0 11%, transparent 11.5%),
    radial-gradient(circle at 45% 30%, rgba(255,255,255,0.13) 0 12%, transparent 12.5%);
}

.melon-rind {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 14px solid #7ed957;
  box-shadow: inset 0 0 0 3px #2f9e44;
  -webkit-mask-image: linear-gradient(135deg, #000 40%, transparent 62%);
  mask-image: linear-gradient(135deg, #000 40%, transparent 62%);
}

.seed {
  position: absolute;
  width: 12px;
  height: 20px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #3d2c14;
  transform-origin: center;
}

.s1 { left: 34%; top: 36%; transform: rotate(-45deg); }
.s2 { right: 30%; top: 48%; transform: rotate(30deg); }
.s3 { left: 42%; bottom: 26%; transform: rotate(-15deg); }
.s4 { right: 40%; top: 24%; transform: rotate(60deg); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float-chip {
  position: absolute;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-2);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.chip1 { top: 20px; right: 4px; animation: float 4.5s ease-in-out infinite 0.4s; }
.chip2 { bottom: 34px; left: 0; animation: float 5.4s ease-in-out infinite 0.9s; }
.chip3 { bottom: 8px; right: 30px; animation: float 4s ease-in-out infinite 1.4s; }

/* ============ 区块通用 ============ */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-2);
  border-top: 1px dashed var(--border-2);
  border-bottom: 1px dashed var(--border-2);
}

.section-head {
  text-align: center;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-head h2 span {
  color: var(--primary-2);
}

.section-head p {
  color: var(--text-2);
  font-size: 16px;
}

/* ============ 热搜榜 ============ */
.hot-panel {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  align-items: start;
}

.hot-list {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid #fff1ee;
  transition: background 0.15s;
  cursor: pointer;
}

.hot-item:last-child {
  border-bottom: none;
}

.hot-item:hover {
  background: var(--surface-2);
}

.hot-top1 .hot-rank {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 14px -4px rgba(255, 77, 79, 0.6);
}

.hot-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.hot-topic {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-top1 .hot-topic {
  font-weight: 800;
  color: var(--primary-2);
}

.hot-badge {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  color: #fff;
}

.b-bao { background: var(--grad); }
.b-re  { background: linear-gradient(135deg, #ff9d3f, #fa8c16); }
.b-new { background: linear-gradient(135deg, #40a9ff, #1890ff); }

.hot-heat {
  flex: 0 0 auto;
  width: 74px;
  text-align: right;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}

.hot-side {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.hot-side h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
}

.hot-side .side-tag {
  display: inline-block;
  margin: 0 8px 10px 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.hot-side .side-tag:hover {
  color: #fff;
  background: var(--primary);
}

/* ============ 明星八卦卡片 ============ */
.star-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.star-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.star-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.s-cover {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
}

.s-cover svg {
  width: 36px;
  height: 36px;
}

.sc-red    { background: linear-gradient(160deg, #ff7875, #d9363e); }
.sc-pink   { background: linear-gradient(160deg, #ff85c0, #eb2f96); }
.sc-orange { background: linear-gradient(160deg, #ffc53d, #fa8c16); }
.sc-purple { background: linear-gradient(160deg, #b37feb, #722ed1); }

.s-info {
  flex: 1;
  min-width: 0;
}

.s-tags {
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.s-tags a {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
}

.s-tags a:hover {
  color: #fff;
  background: var(--primary);
}

.s-info h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 7px;
}

.s-info p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.s-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

.s-meta span:first-child {
  color: var(--primary-2);
}

/* ============ 热点爆料 ============ */
.scoop-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.scoop-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.scoop-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.scoop-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.si-ex  { background: var(--grad); }
.si-lu  { background: linear-gradient(135deg, #ff9d3f, #fa8c16); }
.si-gua { background: linear-gradient(135deg, #73d13d, #389e0d); }
.si-nei { background: linear-gradient(135deg, #b37feb, #722ed1); }

.scoop-body {
  flex: 1;
  min-width: 0;
}

.scoop-body h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.scoop-body p {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.u-time {
  font-size: 12px;
  color: var(--text-3);
  flex: 0 0 auto;
}

.u-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.u-link:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* ============ 分类 ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.cat-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cat-icon {
  font-size: 26px;
}

/* ============ 关于 ============ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.about-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.about-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.about-item svg {
  width: 40px;
  height: 40px;
  color: var(--primary-2);
  margin-bottom: 14px;
}

.about-item h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.about-item p {
  font-size: 14px;
  color: var(--text-2);
}

/* ============ 页脚 ============ */
.site-footer {
  background: #1f1a1a;
  color: #e8dcdc;
  padding: 52px 0 30px;
}

.site-footer .logo {
  color: #fff;
}

.site-footer .logo em {
  color: #ff7875;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 34px;
}

.footer-brand p {
  color: #c9b9b9;
  font-size: 14px;
  max-width: 300px;
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #c9b9b9;
  font-size: 14px;
}

.footer-col a:hover {
  color: #ff7875;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: #a39292;
}

/* ============ Toast 提示 ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: #262626;
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ 回到顶部 ============ */
.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 99;
  box-shadow: 0 10px 24px -8px rgba(255, 77, 79, 0.75);
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-visual {
    order: -1;
    height: 260px;
  }
  .hot-panel {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  .search-box {
    display: none;
  }
  .star-grid {
    grid-template-columns: 1fr;
  }
  .scoop-list {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 34px;
  }
  .section-head h2 {
    font-size: 27px;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 14px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  .hot-heat {
    display: none;
  }
  .u-time {
    display: none;
  }
}