:root {
  --bg: #f6f1ea;
  --surface: #fffdf9;
  --text: #1f2431;
  --muted: #6f7586;
  --primary: #3f2f86;
  --primary-deep: #2a1d5d;
  --accent: #ef7d57;
  --accent-soft: #ffe5dc;
  --line: #eadfce;
  --shadow: 0 14px 34px rgba(33, 20, 72, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% -10%, #ffffff, var(--bg) 55%);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 8, 22, 0.35);
}

.topbar .container {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.site-header {
  background: linear-gradient(135deg, #1f153f 0%, #3f2f86 52%, #1e4f64 100%);
  color: #fff;
}

.main-nav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1040;
}

.main-nav.is-scrolled {
  background: rgba(23, 16, 49, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(5, 3, 13, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent), #ffb087);
  color: #271b16;
  box-shadow: 0 8px 20px rgba(239, 125, 87, 0.4);
}

.brand-text {
  font-size: 1.02rem;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  position: relative;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.dropdown-menu-dark {
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-signal {
  border: none;
  color: #24151a;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), #ffbe94);
}

.btn-signal:hover {
  color: #1d1212;
  background: linear-gradient(135deg, #f98f66, #ffcaa7);
}

.mobile-brand-link {
  color: #fff;
}

.hero-section {
  padding: 2.6rem 0 3.8rem;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 0.95rem;
  font-weight: 700;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.83);
  max-width: 52ch;
  margin-bottom: 1.2rem;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd9cb;
}

.search-shell {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.95rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.search-shell .form-control,
.search-shell .form-select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.hero-meta {
  margin-bottom: 1.15rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.79rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.stat-grid {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.stat-item {
  min-width: 120px;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.stat-item span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.hero-feature {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-feature .card-img-top {
  height: 220px;
  object-fit: cover;
}

.hero-feature h2 {
  font-size: 1.18rem;
  margin-bottom: 0.55rem;
}

.hero-feature p {
  font-size: 0.94rem;
  color: var(--muted);
}

.feature-meta {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #7b718d;
}

.feature-link {
  color: var(--primary);
  font-weight: 600;
}

.main-content {
  margin-top: -1.8rem;
  padding-bottom: 3.2rem;
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(50, 36, 83, 0.05);
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.block-head h2 {
  margin: 0;
  font-size: 1.06rem;
}

.index-pill {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--primary), #6d4ed2);
}

.view-all {
  font-size: 0.84rem;
  color: var(--primary);
  font-weight: 600;
}

.media-card {
  border: 1px solid #efe6da;
  border-radius: 0.9rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(40, 30, 74, 0.12);
}

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

.media-card .card-title {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.media-card .card-text {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #847e8f;
}

.score {
  color: var(--primary);
  font-weight: 700;
}

.news-list .list-group-item {
  border-color: #eee4d7;
  padding: 0.76rem 0.85rem;
  font-size: 0.9rem;
}

.news-list time {
  font-size: 0.8rem;
  color: #8f8698;
  white-space: nowrap;
  margin-left: 1rem;
}

.accordion-item {
  border: 1px solid #eee2d4;
}

.accordion-button {
  font-weight: 600;
  font-size: 0.93rem;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: #f6f0ff;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: #d4c4ff;
}

.friend-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.friend-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.58rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px dashed #d8c9ef;
  background: #fbf7ff;
  color: #493291;
  font-size: 0.87rem;
  transition: all 0.2s ease;
}

.friend-link:hover {
  border-style: solid;
  background: #f2e9ff;
}

.sidebar {
  position: sticky;
  top: 88px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.95rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(50, 36, 83, 0.05);
}

.panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.promo-card {
  padding: 0;
  overflow: hidden;
}

.promo-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.promo-card .panel-body {
  padding: 0.9rem;
}

.promo-card p {
  color: var(--muted);
  font-size: 0.89rem;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rank;
}

.rank-list li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
  border-bottom: 1px dashed #eee0d1;
  padding: 0.55rem 0 0.55rem 1.85rem;
  position: relative;
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank-list li::before {
  content: counter(rank);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), #6a4ed0);
}

.rank-list a {
  font-size: 0.88rem;
}

.rank-list span {
  font-size: 0.76rem;
  color: #867f93;
}

.update-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.update-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed #eee0d1;
  padding: 0.55rem 0;
  font-size: 0.88rem;
}

.update-list li:last-child {
  border-bottom: 0;
}

.update-list time {
  color: #8b8299;
  font-size: 0.77rem;
  white-space: nowrap;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #4f3e85;
  border: 1px solid #dccbf1;
  background: #f9f4ff;
}

.site-footer {
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(130deg, #1a1332, #332261 55%, #1d4356);
  padding: 2.4rem 0 1rem;
}

.footer-brand {
  display: inline-block;
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
}

.footer-text {
  margin: 0;
  max-width: 45ch;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h4 {
  font-size: 0.95rem;
  color: #ffd2c1;
  margin-bottom: 0.65rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
}

.footer-bottom a {
  color: #ffe0d5;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #5f43b7);
  box-shadow: 0 10px 24px rgba(49, 30, 105, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 1050;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.modal-content {
  border: 1px solid #e8dcf8;
  border-radius: 1rem;
}

.modal-header {
  border-bottom: 1px solid #efe4fd;
}

.modal-footer {
  border-top: 1px solid #efe4fd;
}

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-meta,
  .stat-grid {
    justify-content: center;
  }

  .sidebar {
    position: static;
    top: auto;
  }

  .main-content {
    margin-top: -1rem;
  }
}

@media (max-width: 767.98px) {
  .content-block,
  .panel {
    border-radius: 0.85rem;
  }

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

  .friend-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .block-head h2 {
    font-size: 1rem;
  }

  .hero-feature .card-img-top {
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .friend-links-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    flex: 1 1 100%;
  }
}