:root {
  --bg: #f4f6ff;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #6d7792;
  --primary: #6c4bff;
  --secondary: #17c7b6;
  --dark: #0e1730;
  --border: #e5e9f6;
  --shadow: 0 16px 40px rgba(18, 35, 84, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: radial-gradient(circle at top right, #edf0ff 0%, var(--bg) 44%, #f8fbff 100%);
  color: var(--text);
  line-height: 1.6;
}

.site-header .navbar {
  background: linear-gradient(90deg, rgba(19, 31, 69, 0.88), rgba(63, 45, 124, 0.86));
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  padding: 0.8rem 0;
}

.site-header .navbar.is-scrolled {
  background: rgba(15, 23, 45, 0.95);
  box-shadow: 0 8px 24px rgba(6, 12, 30, 0.3);
}

.navbar-brand,
.nav-link,
.footer-brand {
  color: #fff;
}

.nav-link {
  font-weight: 500;
  opacity: 0.88;
}

.nav-link:hover,
.nav-link.active,
.navbar-brand:hover,
.footer-brand:hover {
  color: #fff;
  opacity: 1;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: conic-gradient(from 220deg, var(--secondary), #7cf0e4, var(--primary));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.btn-glow {
  background: linear-gradient(135deg, var(--primary), #8459ff 58%, var(--secondary));
  color: #fff;
  border: 0;
}

.btn-glow:hover {
  color: #fff;
  filter: brightness(1.06);
}

.hero-section {
  position: relative;
  padding: 8.8rem 0 5rem;
  background: url('../images/893586603.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 42, 0.85), rgba(20, 42, 80, 0.46));
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #dff7ff;
  font-size: 0.82rem;
}

.hero-section h1 {
  color: #fff;
  letter-spacing: 0.2px;
}

.hero-text {
  color: #c6d7f2;
  max-width: 620px;
}

.hero-stats .stat-card {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(5px);
  border-radius: 14px;
  padding: 0.8rem;
  text-align: center;
  color: #fff;
}

.stat-card strong {
  display: block;
  font-size: 1.1rem;
}

.stat-card span {
  font-size: 0.78rem;
  color: #dbe6ff;
}

.hero-feature {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.hero-feature img {
  height: 340px;
  object-fit: cover;
}

.hero-feature p {
  color: var(--muted);
  margin: 0;
}

.search-section {
  margin-top: -2.2rem;
  position: relative;
  z-index: 10;
}

.search-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.search-card .form-label {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.section-head h2 {
  font-weight: 700;
}

.filter-group .btn {
  border: 1px solid var(--border);
  color: var(--muted);
  background: #fff;
}

.filter-group .btn.active {
  background: linear-gradient(130deg, rgba(108, 75, 255, 0.12), rgba(23, 199, 182, 0.12));
  border-color: rgba(108, 75, 255, 0.34);
  color: #4636a7;
}

.film-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(22, 36, 76, 0.08);
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.film-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(22, 36, 76, 0.14);
}

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

.film-card h3 {
  color: #15203b;
}

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

.film-card small {
  color: #8b94ab;
}

.film-card .tag {
  display: inline-block;
  font-size: 0.74rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #7a61f7);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.compact img {
  height: 210px;
}

.category-board {
  background: linear-gradient(145deg, #f8fcff, #eef8ff 68%, #f2f9f8);
  border: 1px solid #dceffc;
  border-radius: 18px;
  padding: 1.25rem;
}

.category-item {
  display: block;
  background: #fff;
  border: 1px solid #d9edf4;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: #27416d;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.category-item:hover {
  border-color: #9cd7ef;
  color: #113560;
  transform: translateY(-2px);
}

.panel {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(16, 33, 70, 0.08);
}

.comment-item {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.9rem;
  background: #fcfdff;
}

.comment-item h3 {
  color: #23345f;
}

.comment-item p,
.comment-item small {
  color: var(--muted);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #dbe7ff;
}

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

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px dashed var(--border);
  padding: 0.7rem 0;
  color: #2a3657;
}

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

.ranking-list li::before {
  counter-increment: rank;
  content: counter(rank);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  margin-right: 0.35rem;
}

.ranking-list li span {
  flex: 1;
}

.ranking-list li small {
  color: var(--muted);
}

.friend-links a {
  text-decoration: none;
  border: 1px solid #d9e4ff;
  color: #334470;
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.88rem;
  background: #f8faff;
  transition: all 0.2s ease;
}

.friend-links a:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.accordion-item {
  border: 1px solid var(--border);
}

.accordion-button:not(.collapsed) {
  color: #2a3d76;
  background: #f6f8ff;
}

.site-footer {
  background: linear-gradient(180deg, #111a34, #0b1328);
  padding: 2.8rem 0;
}

.site-footer a {
  color: #d6e2ff;
}

.footer-links a {
  text-decoration: none;
  color: #b3c2e6;
}

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

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

.back-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(62, 55, 168, 0.3);
  z-index: 1080;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

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

.offcanvas {
  background: #f8faff;
}

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

  .hero-feature img {
    height: 300px;
  }
}

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

  .hero-section h1 {
    font-size: 1.85rem;
  }

  .film-card img,
  .compact img {
    height: 190px;
  }

  .panel,
  .category-board,
  .search-card {
    border-radius: 14px;
  }
}