:root {
  --bg: #eef4f8;
  --bg-soft: #f6faff;
  --surface: #ffffff;
  --text: #16243a;
  --muted: #66758c;
  --primary: #4f46e5;
  --secondary: #14b8a6;
  --accent: #ff7a59;
  --border: #dce6f2;
  --shadow: 0 14px 32px rgba(35, 56, 93, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #f2fbff 0%, var(--bg) 35%, #edf2f7 100%);
}

a {
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(180deg, rgba(238, 244, 248, 0.96), rgba(238, 244, 248, 0.75));
  backdrop-filter: blur(6px);
}

.navbar-shell {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e8eef6;
  box-shadow: 0 10px 24px rgba(22, 36, 58, 0.08);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 90deg, var(--primary), #6366f1, var(--secondary), var(--primary));
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

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

.search-box .form-control,
.offcanvas .form-control {
  border-radius: 999px;
  border: 1px solid var(--border);
  min-width: 220px;
}

.search-box .form-control:focus,
.offcanvas .form-control:focus,
.form-control:focus {
  border-color: #a9b5ff;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

.hero-section {
  padding: 1.2rem 0 0.5rem;
}

.hero-panel {
  background: linear-gradient(140deg, #ffffff 0%, #f4fbff 100%);
  border: 1px solid #e5edf7;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eaf7f5;
  color: #0f766e;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 0.9rem;
  font-weight: 800;
}

.hero-text {
  color: var(--muted);
  line-height: 1.75;
  max-width: 58ch;
}

.metric-chip {
  background: #f6f9ff;
  border: 1px solid #dce4f5;
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  min-width: 110px;
  display: flex;
  flex-direction: column;
}

.metric-chip strong {
  font-size: 1.05rem;
  color: var(--primary);
  line-height: 1.2;
}

.metric-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), #6366f1);
  border-color: transparent;
  border-radius: 12px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(120deg, #4338ca, #5b5ef5);
  border-color: transparent;
}

.featured-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #e2eaf7;
  background: #fff;
  box-shadow: 0 12px 30px rgba(26, 42, 67, 0.14);
}

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

.featured-content {
  padding: 1rem 1.1rem 1.2rem;
}

.featured-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.featured-content h2 {
  margin: 0.3rem 0;
  font-size: 1.25rem;
  font-weight: 750;
}

.featured-content p {
  margin: 0;
  color: var(--muted);
}

.section-block {
  padding: 2.1rem 0 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  position: relative;
  padding-left: 0.85rem;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 4px;
  height: 1.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.media-card {
  border: 1px solid #e6edf7;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(20, 32, 54, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}

.media-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(20, 32, 54, 0.12);
}

.media-thumb {
  border-radius: 14px;
  margin: 0.65rem;
  width: calc(100% - 1.3rem);
  height: 168px;
  object-fit: cover;
}

.media-card .card-body {
  padding-top: 0.1rem;
}

.media-card .card-title {
  font-size: 0.99rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  line-height: 1.4;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #eef1ff;
  color: var(--primary);
  font-weight: 700;
}

.rank-panel,
.tag-cloud,
.comment-panel,
.friend-panel {
  background: var(--surface);
  border: 1px solid #e4ebf6;
  border-radius: 22px;
  padding: 1.3rem 1.2rem;
  box-shadow: var(--shadow);
}

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

.rank-list li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.1rem;
  border-bottom: 1px dashed #dbe4f2;
}

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

.rank-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #eef2ff;
  color: var(--primary);
}

.rank-list em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}

.tag-link {
  display: inline-flex;
  border: 1px solid #dce7f8;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--text);
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.tag-link:hover {
  border-color: #c7d8ff;
  color: var(--primary);
  background: #eef3ff;
}

.comment-item {
  border: 1px solid #e7edf6;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: #fbfdff;
  margin-bottom: 0.75rem;
}

.comment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-top span {
  color: var(--muted);
  font-size: 0.82rem;
}

.comment-item p {
  margin: 0;
  color: #2d3d55;
  line-height: 1.65;
}

.friend-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 46px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #f8fbff;
  color: #1c2d47;
  font-weight: 600;
  padding: 0.5rem;
  text-align: center;
}

.friend-link:hover {
  border-color: #c2d3f1;
  color: var(--primary);
  background: #edf2ff;
}

.site-footer {
  margin-top: 2.4rem;
  padding: 1.25rem 0;
  border-top: 1px solid #dce7f5;
  background: rgba(255, 255, 255, 0.72);
}

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

.footer-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--primary), #6570ff);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 1050;
}

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

@media (max-width: 991.98px) {
  .navbar-shell {
    border-radius: 18px;
  }

  .hero-panel {
    padding: 1.25rem;
  }

  .search-box .form-control {
    min-width: 180px;
  }
}

@media (max-width: 575.98px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-thumb {
    height: 132px;
  }

  .hero-metrics {
    gap: 0.55rem;
  }

  .metric-chip {
    min-width: 96px;
  }
}