* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5ff;
  --surface: #ffffff;
  --surface-2: #f8f9ff;
  --text: #1a2240;
  --muted: #6b7394;
  --primary: #635bff;
  --primary-deep: #4d46df;
  --accent: #19b6a2;
  --border: #e6e9ff;
  --shadow: 0 14px 35px rgba(52, 64, 154, 0.12);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% -20%, #dff3ff 0, transparent 38%),
              radial-gradient(circle at 90% 0%, #efe4ff 0, transparent 30%),
              var(--bg);
}

a {
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 233, 255, 0.85);
  z-index: 1030;
}

.navbar {
  min-height: 72px;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
}

.brand-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, var(--accent), var(--primary), #9f7aea, var(--accent));
  box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.12);
}

.brand-text {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav-link {
  color: #2b355f;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.45rem 0.85rem !important;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--primary);
  background: rgba(99, 91, 255, 0.09);
}

.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(42, 56, 130, 0.14);
}

.btn-soft {
  background: #eef0ff;
  color: var(--primary-deep);
  border: 1px solid #dfe3ff;
}

.btn-soft:hover {
  background: #e3e7ff;
  color: var(--primary-deep);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.hero-shell {
  background: linear-gradient(130deg, #ffffff 10%, #f8f9ff 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(1.6rem, 2.9vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-desc {
  color: var(--muted);
  line-height: 1.78;
  margin-bottom: 1.1rem;
}

.hero-chips .chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.83rem;
  background: #f0f3ff;
  color: #354173;
  border: 1px solid #e0e5ff;
}

.hero-chips .chip-accent {
  background: rgba(25, 182, 162, 0.12);
  color: #0f7f71;
  border-color: rgba(25, 182, 162, 0.28);
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-stats {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-stats div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
}

.hero-stats strong {
  display: block;
  font-size: 1rem;
  color: #243267;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-image-wrap {
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 18px 32px rgba(64, 88, 185, 0.2);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.channel-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem;
}

.channel-pill {
  display: inline-flex;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #425083;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.channel-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.channel-toggle {
  color: var(--primary-deep);
  font-weight: 600;
  text-decoration: none;
}

.content-section {
  padding: 1.2rem 0;
}

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

.section-head h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0;
}

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

.media-card,
.topic-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(65, 78, 152, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-card:hover,
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(63, 79, 160, 0.15);
}

.media-card img,
.topic-card img {
  width: 100%;
  height: 198px;
  object-fit: cover;
}

.media-card .card-body,
.topic-card .card-body {
  padding: 0.78rem 0.82rem 0.82rem;
}

.media-card h3,
.topic-card h3 {
  margin: 0 0 0.38rem;
  font-size: 0.97rem;
  font-weight: 700;
}

.media-card p,
.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.meta-row {
  margin-top: 0.58rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  color: #6b7394;
}

.score {
  color: #17a37f;
  font-weight: 700;
}

.topic-card span {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.77rem;
  color: var(--primary-deep);
  font-weight: 600;
}

.notice-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.notice-board .list-group-item {
  border-color: #eef0ff;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  color: #36406c;
}

.notice-board time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  margin-left: 1rem;
}

.guide-panel,
.tips-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(65, 78, 152, 0.08);
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.accordion-button {
  font-weight: 600;
  color: #2b365f;
}

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

.accordion-button:focus {
  box-shadow: none;
}

.accordion-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.tips-panel ul {
  margin: 0 0 1rem;
  padding-left: 1rem;
  color: var(--muted);
}

.tips-panel li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.friend-link {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #36406c;
  font-weight: 600;
  transition: all 0.2s ease;
}

.friend-link:hover {
  color: var(--primary-deep);
  border-color: #cbd2ff;
  background: #f3f5ff;
}

.site-footer {
  background: #12182e;
  color: #c5cae9;
  padding: 1.3rem 0 1.6rem;
  margin-top: 0.8rem;
}

.footer-brand {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

.footer-links a,
.site-footer p a {
  color: #b9c2ff;
}

.site-footer p {
  font-size: 0.86rem;
  color: #a8b0da;
}

.back-top {
  position: fixed;
  right: 14px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 10px 26px rgba(47, 40, 160, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1040;
}

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

.modal-content {
  border-radius: 16px;
  border: 1px solid var(--border);
}

.modal-body code {
  font-size: 1rem;
  color: var(--primary-deep);
}

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

  .hero-image-wrap img {
    min-height: 300px;
    max-height: 420px;
  }

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

  .notice-board .list-group-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.35rem;
  }

  .notice-board time {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .navbar {
    min-height: 66px;
  }

  .hero-shell {
    padding: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: 1.1rem;
  }

  .media-card img,
  .topic-card img {
    height: 168px;
  }
}