/* ---------- 全局变量 ---------- */
    :root {
      --primary: #10b981;
      --accent: #fbbf24;
      --bg: #0a1410;
      --text: #ecfdf5;
      --surface: #12221c;
      --border: #1e3a2e;
      --muted: #8aaf9a;
      --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
      --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    }
    * { box-sizing: border-box; }
    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      font-weight: 400;
      line-height: 1.6;
      padding-top: 76px;
      -webkit-font-smoothing: antialiased;
    }
    h1, h2, h3, h4, h5, .hero-title, .section-title, .navbar-brand {
      font-family: var(--font-heading);
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
    a:hover { color: var(--accent); }
    img { max-width: 100%; height: auto; display: block; }
    .container-custom { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

    /* ---------- 导航 ---------- */
    .navbar-custom {
      background: rgba(10, 20, 16, 0.88);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      transition: background 0.3s ease, box-shadow 0.3s ease;
      padding: 0.85rem 0;
    }
    .navbar-custom.scrolled {
      background: rgba(10, 20, 16, 0.98);
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    }
    .navbar-brand {
      font-size: 1.65rem;
      color: var(--text) !important;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .navbar-brand i { color: var(--primary); }
    .nav-link {
      color: #b8d5c4 !important;
      font-weight: 500;
      font-size: 0.95rem;
      padding: 0.5rem 1rem !important;
      border-radius: 40px;
      transition: background 0.2s, color 0.2s;
    }
    .nav-link:hover, .nav-link.active {
      color: var(--text) !important;
      background: rgba(16, 185, 129, 0.15);
    }
    .navbar-toggler { border-color: var(--border); color: var(--primary); }
    .navbar-toggler-icon {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%2310b981' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

    /* ---------- 按钮 & 标签 ---------- */
    .btn-pill {
      border-radius: 40px;
      padding: 0.45rem 1.3rem;
      font-weight: 500;
      font-size: 0.88rem;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text);
      transition: all 0.2s;
    }
    .btn-pill:hover, .btn-pill.active {
      background: var(--primary);
      color: #0a1410;
      border-color: var(--primary);
    }
    .tag-pill {
      display: inline-block;
      padding: 0.25rem 0.9rem;
      border-radius: 40px;
      font-size: 0.78rem;
      background: rgba(16, 185, 129, 0.12);
      color: var(--primary);
      border: 1px solid rgba(16, 185, 129, 0.25);
      margin-right: 0.4rem;
      margin-bottom: 0.4rem;
      transition: all 0.2s;
      cursor: default;
    }
    .tag-pill:hover { background: rgba(16, 185, 129, 0.25); }

    /* ---------- Hero 打字机 ---------- */
    .hero-section {
      padding: 4.5rem 0 3rem;
      border-bottom: 1px solid var(--border);
    }
    .hero-title {
      font-size: clamp(2.8rem, 8vw, 5.2rem);
      line-height: 1.15;
      min-height: 1.2em;
      color: var(--text);
    }
    .hero-title .typed-text { color: var(--primary); border-right: 3px solid var(--accent); padding-right: 6px; }
    .hero-sub {
      font-size: 1.15rem;
      color: var(--muted);
      max-width: 620px;
      margin-top: 0.75rem;
    }

    /* ---------- 区块标题 ---------- */
    .section-padding { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
    .section-title {
      font-size: 2.2rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 1.8rem;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .section-title i { color: var(--primary); font-size: 1.8rem; }
    .section-title small {
      font-family: var(--font-body);
      font-size: 0.9rem;
      font-weight: 400;
      color: var(--muted);
      margin-left: auto;
    }

    /* ---------- 左侧筛选栏 + 右侧瀑布流 ---------- */
    .filter-side {
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 1.5rem 1.2rem;
      background: rgba(18, 34, 28, 0.5);
      position: sticky;
      top: 100px;
    }
    .filter-side h5 {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 1rem;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0.6rem;
    }
    .filter-side .tag-pill { cursor: pointer; }

    /* ---------- 海报卡片瀑布流 ---------- */
    .poster-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 1.2rem;
    }
    .poster-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
      cursor: pointer;
      display: flex;
      flex-direction: column;
    }
    .poster-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
      border-color: var(--primary);
    }
    .poster-card img {
      width: 100%;
      aspect-ratio: 2 / 3;
      object-fit: cover;
      background: #0e1c17;
    }
    .poster-card .card-body {
      padding: 0.75rem 0.8rem 0.9rem;
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    .poster-card .card-title {
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 0.2rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .poster-card .card-meta {
      font-size: 0.72rem;
      color: var(--muted);
      display: flex;
      justify-content: space-between;
      margin-top: auto;
    }
    .rating-star { color: var(--accent); font-weight: 600; }

    /* ---------- 排行榜 ---------- */
    .rank-list { list-style: none; padding: 0; margin: 0; }
    .rank-item {
      display: flex;
      align-items: center;
      gap: 1.2rem;
      padding: 1rem 0.5rem;
      border-bottom: 1px solid var(--border);
      transition: background 0.2s;
    }
    .rank-item:hover { background: rgba(16, 185, 129, 0.06); }
    .rank-badge {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 1rem;
      background: var(--border);
      color: var(--text);
      flex-shrink: 0;
    }
    .rank-badge.gold { background: #fbbf24; color: #0a1410; }
    .rank-badge.silver { background: #cbd5e1; color: #0a1410; }
    .rank-badge.bronze { background: #d97706; color: #0a1410; }
    .rank-poster {
      width: 52px;
      height: 72px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      background: #0e1c17;
    }
    .rank-info { flex: 1; min-width: 0; }
    .rank-info .title { font-weight: 600; font-size: 0.98rem; color: var(--text); }
    .rank-info .desc { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rank-score { color: var(--accent); font-weight: 700; font-size: 1.1rem; }

    /* ---------- 手风琴（说明） ---------- */
    .accordion-item {
      background: transparent;
      border: 1px solid var(--border);
      margin-bottom: 0.75rem;
      border-radius: 12px !important;
      overflow: hidden;
    }
    .accordion-button {
      background: var(--surface);
      color: var(--text);
      font-weight: 600;
      border: none;
      box-shadow: none;
      padding: 1rem 1.2rem;
    }
    .accordion-button:not(.collapsed) {
      background: rgba(16, 185, 129, 0.12);
      color: var(--primary);
    }
    .accordion-button::after {
      filter: invert(0.7) sepia(1) saturate(3) hue-rotate(120deg);
    }
    .accordion-body {
      background: rgba(18, 34, 28, 0.6);
      color: var(--muted);
      font-size: 0.92rem;
      line-height: 1.7;
    }

    /* ---------- 心情选片 ---------- */
    .mood-tabs .btn-pill { margin-right: 0.5rem; margin-bottom: 0.5rem; }
    .mood-content {
      margin-top: 1.5rem;
      padding: 1.5rem;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(18, 34, 28, 0.4);
      display: none;
    }
    .mood-content.active { display: block; }
    .mood-content .poster-grid { margin-top: 1rem; }

    /* ---------- 友链 ---------- */
    .friend-links {
      font-size: 0.9rem;
      color: var(--muted);
      line-height: 2;
      word-break: break-word;
    }
    .friend-links a { color: var(--primary); margin-right: 1rem; }

    /* ---------- 回到顶部 ---------- */
    .back-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--primary);
      color: #0a1410;
      border: none;
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
      z-index: 1050;
      box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
    }
    .back-to-top.show { opacity: 1; visibility: visible; }
    .back-to-top:hover { transform: translateY(-3px); }

    /* ---------- 底部抽屉弹窗 ---------- */
    .drawer-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(4px);
      z-index: 1060;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s, visibility 0.3s;
    }
    .drawer-overlay.show { opacity: 1; visibility: visible; }
    .drawer-panel {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      background: #10241d;
      border-top: 2px solid var(--primary);
      border-radius: 24px 24px 0 0;
      padding: 1.8rem 1.8rem 2.2rem;
      z-index: 1070;
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
      max-height: 85vh;
      overflow-y: auto;
    }
    .drawer-panel.open { transform: translateY(0); }
    .drawer-close {
      position: absolute;
      top: 1rem;
      right: 1.2rem;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 1.6rem;
      line-height: 1;
      transition: color 0.2s;
    }
    .drawer-close:hover { color: var(--accent); }
    .drawer-panel h3 {
      font-size: 1.8rem;
      color: var(--text);
      margin-bottom: 0.3rem;
    }
    .drawer-meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.8rem 1.8rem;
      margin: 0.8rem 0 1.2rem;
      font-size: 0.9rem;
      color: var(--muted);
    }
    .drawer-meta-row strong { color: var(--text); }
    .drawer-panel .plot { color: #b8d5c4; line-height: 1.7; font-size: 0.95rem; }
    .drawer-panel .actors { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }

    /* ---------- 响应式 ---------- */
    @media (max-width: 991px) {
      .filter-side { position: static; margin-bottom: 1.5rem; }
      .section-title { font-size: 1.8rem; }
    }
    @media (max-width: 576px) {
      body { padding-top: 66px; }
      .hero-title { font-size: 2.4rem; }
      .poster-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.9rem; }
      .poster-card .card-title { font-size: 0.82rem; }
      .rank-item { gap: 0.8rem; }
      .rank-poster { width: 42px; height: 58px; }
      .container-custom { padding: 0 16px; }
    }

    /* 自定义滚动条 */
    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--primary); }