:root {
  --bg: #eef3ff;
  --surface: #ffffff;
  --surface-soft: #f6f9ff;
  --text: #1e2440;
  --muted: #6c7393;
  --accent: #6a4dff;
  --accent-2: #24c7b5;
  --line: #dde5ff;
  --shadow: 0 12px 30px rgba(36, 64, 128, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #f2efff 0%, var(--bg) 55%, #edf9ff 100%);
}

a {
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(221, 229, 255, 0.8);
}

.brand {
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative;
  box-shadow: 0 8px 18px rgba(106, 77, 255, 0.35);
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid #fff;
}

.brand-text {
  font-size: 1.08rem;
  letter-spacing: 0.3px;
}

.nav-link {
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem !important;
  font-weight: 500;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
  background: #f2eeff;
}

.search-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-inline .form-control {
  width: 240px;
  border-radius: 999px;
  border-color: var(--line);
}

.btn-accent {
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #4a87ff);
  box-shadow: 0 8px 20px rgba(90, 93, 255, 0.28);
}

.btn-accent:hover,
.btn-accent:focus {
  color: #fff;
  filter: brightness(1.05);
}

.hero-panel {
  background: linear-gradient(135deg, #392a7a 0%, #3456a9 50%, #1f8b95 100%);
  border-radius: 26px;
  padding: clamp(1.25rem, 2vw, 2.25rem);
  box-shadow: var(--shadow);
  color: #f4f7ff;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.25;
  margin: 0;
}

.hero-site-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-desc {
  color: #d8e3ff;
  max-width: 56ch;
  margin-bottom: 0;
}

.hero-image-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-image {
  width: 100%;
  height: 330px;
  object-fit: cover;
}

.hero-stats .stat-box {
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 1.05rem;
}

.hero-stats span {
  font-size: 0.8rem;
  color: #d9e5ff;
}

.section-block {
  margin-top: 1.4rem;
}

.section-heading {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.08rem, 2.2vw, 1.4rem);
  font-weight: 700;
  position: relative;
  padding-left: 0.85rem;
}

.section-heading h2::before {
  content: "";
  width: 5px;
  height: 1.2em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  position: absolute;
  left: 0;
  top: 0.1em;
}

.section-more {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-more:hover {
  color: var(--accent);
}

.media-card {
  border: 1px solid #e5ebff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(16, 29, 76, 0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(16, 29, 76, 0.14);
}

.media-card .card-img-top {
  height: 146px;
  object-fit: cover;
}

.media-card .card-body {
  padding: 0.8rem;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  margin: 0.25rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: #7c84a3;
  font-size: 0.76rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #ff5ea8);
}

.promo-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.promo-banner img {
  height: 190px;
  object-fit: cover;
}

.promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 30, 63, 0.82) 0%, rgba(23, 30, 63, 0.28) 65%, rgba(23, 30, 63, 0.08) 100%);
  color: #f1f4ff;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-overlay h3 {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
}

.promo-overlay p {
  margin: 0;
  color: #dbe7ff;
}

.rank-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(20, 34, 88, 0.06);
}

.rank-list {
  margin: 0;
  padding-left: 1.4rem;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 0.93rem;
}

.rank-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.topic-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.86rem;
  transition: all 0.2s ease;
}

.topic-pill:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #4cb3ff);
}

.comment-form-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}

.comment-list {
  display: grid;
  gap: 0.8rem;
}

.comment-item {
  background: var(--surface-soft);
  border: 1px solid #e7eeff;
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.comment-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.comment-item h3 small {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.comment-item p {
  margin: 0;
  color: #394169;
}

.faq-accordion .accordion-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-accordion .accordion-button {
  font-weight: 600;
  background: #f8faff;
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--accent);
  background: #eff2ff;
  box-shadow: none;
}

.friend-links {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.friend-links a {
  display: block;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed #ccd9ff;
  color: #33406d;
  padding: 0.55rem 0.6rem;
  background: #f9fbff;
}

.friend-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.site-footer {
  background: #1d2545;
  color: #d5dcff;
  padding: 1rem 0;
}

.footer-brand {
  color: #fff;
  font-weight: 600;
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #3f95ff);
  box-shadow: 0 10px 20px rgba(54, 87, 244, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 1199.98px) {
  .hero-image {
    height: 280px;
  }
}

@media (max-width: 991.98px) {
  .hero-panel {
    border-radius: 20px;
  }

  .promo-banner img {
    height: 160px;
  }

  .promo-overlay h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 767.98px) {
  .section-block {
    margin-top: 1.1rem;
  }

  .hero-image {
    height: 220px;
  }

  .media-card .card-img-top {
    height: 130px;
  }

  .friend-links {
    grid-template-columns: 1fr;
  }
}