/* yanyu-home-hub-v1：主页简化 + 二级入口 */

/* 入口区 */
.yanyu-hub {
  position: relative;
  z-index: 3;
  padding: 66px 22px 54px;
  background:
    radial-gradient(circle at 14% 12%, rgba(142, 42, 34, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(247, 241, 227, 0.88), rgba(229, 219, 196, 0.60));
}

.yanyu-hub-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.yanyu-hub-head {
  text-align: center;
  margin-bottom: 24px;
}

.yanyu-hub-head .eyebrow {
  margin-bottom: 8px;
}

.yanyu-hub-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.yanyu-hub-head p {
  max-width: 680px;
  margin: 12px auto 0;
  color: rgba(62, 45, 34, 0.72);
  line-height: 1.8;
}

.yanyu-hub-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.yanyu-hub-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border: 1px solid rgba(87, 55, 42, 0.14);
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  color: #35271f;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(232,224,206,.72)),
    rgba(246, 240, 228, .92);
  box-shadow: 0 18px 46px rgba(35, 24, 18, 0.12);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.yanyu-hub-card::before {
  content: attr(data-hub-mark);
  position: absolute;
  right: -10px;
  top: -16px;
  color: rgba(128, 40, 32, 0.10);
  font-size: 74px;
  font-weight: 900;
  line-height: 1;
}

.yanyu-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 58px rgba(35, 24, 18, 0.18);
  border-color: rgba(142, 42, 34, 0.28);
}

.yanyu-hub-card.active {
  color: #fff8ed;
  background:
    linear-gradient(135deg, rgba(36, 26, 22, 0.95), rgba(142, 42, 34, 0.90));
}

.yanyu-hub-card.active::before {
  color: rgba(255,255,255,0.10);
}

.yanyu-hub-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

.yanyu-hub-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: rgba(62, 45, 34, 0.68);
  font-size: 13px;
  line-height: 1.7;
}

.yanyu-hub-card.active span {
  color: rgba(255, 248, 237, 0.82);
}

.yanyu-hub-card em {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 14px;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.56);
  color: #8d2a23;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.yanyu-hub-card.active em {
  background: rgba(255,255,255,.14);
  color: #fff8ed;
}

/* 页面切换逻辑 */
html[data-yanyu-hub-page="home"] #forum,
html[data-yanyu-hub-page="home"] #members,
html[data-yanyu-hub-page="home"] #lottery,
html[data-yanyu-hub-page="home"] #checkin,
html[data-yanyu-hub-page="home"] #checkin-shop,
html[data-yanyu-hub-page="home"] #chronicle {
  display: none !important;
}

html[data-yanyu-hub-page="benefits"] #forum,
html[data-yanyu-hub-page="benefits"] #members,
html[data-yanyu-hub-page="benefits"] #chronicle {
  display: none !important;
}

html[data-yanyu-hub-page="forum"] #lottery,
html[data-yanyu-hub-page="forum"] #checkin,
html[data-yanyu-hub-page="forum"] #checkin-shop,
html[data-yanyu-hub-page="forum"] #members,
html[data-yanyu-hub-page="forum"] #chronicle {
  display: none !important;
}

html[data-yanyu-hub-page="members"] #lottery,
html[data-yanyu-hub-page="members"] #checkin,
html[data-yanyu-hub-page="members"] #checkin-shop,
html[data-yanyu-hub-page="members"] #forum,
html[data-yanyu-hub-page="members"] #chronicle {
  display: none !important;
}

html[data-yanyu-hub-page="chronicle"] #lottery,
html[data-yanyu-hub-page="chronicle"] #checkin,
html[data-yanyu-hub-page="chronicle"] #checkin-shop,
html[data-yanyu-hub-page="chronicle"] #forum,
html[data-yanyu-hub-page="chronicle"] #members {
  display: none !important;
}

/* 进入二级区后，让对应区块顶部更自然 */
html[data-yanyu-hub-page="benefits"] #lottery,
html[data-yanyu-hub-page="benefits"] #checkin,
html[data-yanyu-hub-page="benefits"] #checkin-shop,
html[data-yanyu-hub-page="forum"] #forum,
html[data-yanyu-hub-page="members"] #members,
html[data-yanyu-hub-page="chronicle"] #chronicle {
  display: block !important;
}

/* 给当前模块加一点顶部空间 */
html[data-yanyu-hub-page="benefits"] #lottery,
html[data-yanyu-hub-page="forum"] #forum,
html[data-yanyu-hub-page="members"] #members,
html[data-yanyu-hub-page="chronicle"] #chronicle {
  padding-top: 62px !important;
}

/* 首页小提示 */
.yanyu-hub-tip {
  margin: 16px auto 0;
  max-width: 780px;
  padding: 11px 14px;
  border: 1px solid rgba(133, 43, 34, 0.14);
  border-radius: 999px;
  color: rgba(62, 45, 34, 0.72);
  background: rgba(255,255,255,0.50);
  font-size: 13px;
  text-align: center;
}

/* 移动端 */
@media (max-width: 760px) {
  .yanyu-hub {
    padding: 42px 14px 36px;
  }

  .yanyu-hub-head {
    margin-bottom: 16px;
  }

  .yanyu-hub-head h2 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .yanyu-hub-head p {
    font-size: 14px;
    line-height: 1.68;
  }

  .yanyu-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .yanyu-hub-card {
    min-height: 138px;
    padding: 13px;
    border-radius: 16px;
  }

  .yanyu-hub-card::before {
    font-size: 54px;
    right: -8px;
    top: -10px;
  }

  .yanyu-hub-card strong {
    font-size: 16px;
  }

  .yanyu-hub-card span {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.55;
  }

  .yanyu-hub-card em {
    min-height: 24px;
    margin-top: 8px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .yanyu-hub-tip {
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.6;
  }

  html[data-yanyu-hub-page="benefits"] #lottery,
  html[data-yanyu-hub-page="forum"] #forum,
  html[data-yanyu-hub-page="members"] #members,
  html[data-yanyu-hub-page="chronicle"] #chronicle {
    padding-top: 38px !important;
  }
}

@media (max-width: 360px) {
  .yanyu-hub-grid {
    grid-template-columns: 1fr;
  }

  .yanyu-hub-card {
    min-height: 112px;
  }
}
