/* ===== pages.css — 页面级样式（hero / 工具栏 / 详情 / 文档） ===== */

/* Hero */
.hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(47, 129, 247, 0.18), transparent),
    radial-gradient(700px 400px at 10% 0%, rgba(63, 185, 80, 0.12), transparent);
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px 56px;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.25; }
.hero p { color: var(--text-dim); margin: 16px 0 24px; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* 工具栏 */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.filters { display: flex; gap: 8px; }
.filter-tab {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.count-text { color: var(--text-dim); font-size: 0.85rem; }

/* 详情页 */
.detail { padding-top: 8px; }
.back { color: var(--text-dim); font-size: 0.88rem; display: inline-block; margin: 8px 0 20px; }
.back:hover { color: var(--text); }
.detail-head { display: flex; gap: 28px; flex-wrap: wrap; }
.detail-cover {
  width: 220px; height: 220px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.detail-cover .card-icon { font-size: 4rem; }
.detail-info { flex: 1; min-width: 280px; }
.badge {
  display: inline-block; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--accent); padding: 3px 12px; border-radius: 999px; font-size: 0.78rem;
}
.detail-info h1 { font-size: 1.6rem; margin: 12px 0 8px; }
.detail-desc { color: var(--text-dim); margin-bottom: 14px; }
.detail-stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-dim); font-size: 0.85rem; margin-bottom: 14px; }
.detail-info .card-tags { margin-bottom: 20px; }
.section-title { font-size: 1.2rem; margin: 32px 0 14px; }

.item-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.item-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  transition: background 0.12s;
}
.item-row:hover { background: var(--bg-card); }
.item-icon { color: var(--accent); width: 18px; text-align: center; }
.item-name { flex: 1; font-size: 0.94rem; }
.item-meta { color: var(--text-dim); font-size: 0.82rem; }

/* 文档页 */
.doc { max-width: 820px; }
.doc h1 { font-size: 1.8rem; margin-bottom: 12px; }
.lead { color: var(--text-dim); margin-bottom: 24px; }
.doc-block { margin-bottom: 28px; }
.doc-block h2 { font-size: 1.15rem; margin-bottom: 10px; }
.doc-block p { color: var(--text); margin-bottom: 10px; }
.doc-list { padding-left: 22px; color: var(--text); }
.doc-list li { margin-bottom: 8px; }
.doc code {
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .search { width: 150px; }
  .detail-cover { width: 160px; height: 160px; }
}

/* ============================================
   ----ҳ Hero ----沼--
   ============================================ */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2; /* 匹配 1200×800 图片比例 */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background-color: #1a212b;
  /* background-size 由 JS 内联 style 设置为 cover */
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,17,23,0.95) 0%, rgba(13,17,23,0.6) 50%, rgba(13,17,23,0.2) 100%);
  display: flex;
  align-items: flex-end;
  padding: 32px 40px;
}
.detail-hero-content {
  max-width: 800px;
}
.detail-badge {
  display: inline-block;
  background: rgba(47,129,247,0.2);
  border: 1px solid rgba(47,129,247,0.5);
  color: #79c0ff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.detail-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  line-height: 1.2;
}
.detail-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0 0 14px 0;
  max-width: 720px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-tags .tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
}

/* ͳ---- */
.detail-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 16px 8px;
  margin-bottom: 24px;
}
.stat-cell {
  flex: 1;
  text-align: center;
  padding: 0 12px;
  border-right: 1px solid #30363d;
}
.stat-cell:last-of-type {
  border-right: none;
}
.stat-num {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e6edf3;
  line-height: 1.2;
}
.stat-lbl {
  font-size: 0.78rem;
  color: #8b949e;
  margin-top: 4px;
}
.detail-sync-btn {
  margin-left: 16px;
  white-space: nowrap;
}

/* --Ŀ-б----- */
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}
.item-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.item-row:hover {
  border-color: #2f81f7;
  background: #1a2030;
}
.item-num {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: #6e7681;
  min-width: 24px;
  text-align: center;
  align-self: center;
}
.item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.item-name {
  font-size: 0.95rem;
  color: #e6edf3;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #8b949e;
}
.item-tags span:not(:last-child)::after {
  content: ""; display:inline-block; width:4px; height:4px; background:#4a5260; border-radius:50%; margin-left:8px; vertical-align:middle;
}
.item-quality {
  color: #d29922;
}
.item-format {
  background: rgba(47,129,247,0.15);
  color: #79c0ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}
.item-year {
  color: #8b949e;
  font-family: ui-monospace, monospace;
}
.item-empty {
  text-align: center;
  padding: 32px;
  color: #8b949e;
  background: #161b22;
  border: 1px dashed #30363d;
  border-radius: 8px;
  list-style: none;
}

@media (max-width: 640px) {
  .detail-hero { height: 280px; }
  .detail-hero-overlay { padding: 20px; }
  .detail-title { font-size: 1.5rem; }
  .detail-stats-bar { flex-wrap: wrap; }
  .stat-cell { flex: 1 1 50%; border-right: none; padding: 8px; }
  .detail-sync-btn { width: 100%; margin: 12px 0 0 0; }
  .item-list { grid-template-columns: 1fr; }
}

/* ============================================
   ----ҳ "---ڱ--ϼ-" ------
   ============================================ */
.detail-about {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
  position: relative;
}
.detail-about::before {
  content: "";
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: linear-gradient(to bottom, #2f81f7, #3fb950);
  border-radius: 0 2px 2px 0;
}
.about-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e6edf3;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-title::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #2f81f7;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/><path d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/><path d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/></svg>") center/contain no-repeat;
}
.about-content {
  color: #c9d1d9;
  font-size: 0.92rem;
  line-height: 1.8;
  text-indent: 2em;
  white-space: pre-line;
  word-break: break-word;
}

/* -½ڱ-----ǿ */
.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e6edf3;
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #2f81f7;
  border-radius: 2px;
}
.section-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: #8b949e;
  background: #161b22;
  border: 1px solid #30363d;
  padding: 2px 10px;
  border-radius: 12px;
}

/* ===== 解锁按钮状态样式 ===== */
.detail-sync-btn {
  margin-left: 16px;
  white-space: nowrap;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
}
.detail-sync-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}
.detail-sync-btn:active:not(:disabled) {
  transform: translateY(0);
}
.detail-sync-btn.btn-primary {
  background: #2563eb;
  color: #fff;
}
.detail-sync-btn.btn-secondary {
  background: #374151;
  color: #d1d5db;
  border: 1px solid #4b5563;
}
.detail-sync-btn.btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #374151;
  cursor: not-allowed;
}

/* ===== 合集内容：评分徽章 + 链接区（底部同行） ===== */
.item-row {
  align-items: stretch;
}
.item-main { flex: 1; min-width: 0; }
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.item-bottom-spacer { flex: 0 0 0; }
.item-scores {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 0;
}
.score-douban,
.score-imdb,
.score-rotten {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0;
}
.score-douban {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.score-imdb {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.score-rotten {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.score-douban,
.score-imdb,
.score-rotten {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.score-douban {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
}
.score-imdb {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.score-rotten {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.item-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  margin-left: 12px;
  flex-shrink: 0;
  transition: all 0.15s;
  font-weight: 500;
}
.item-link:not(.locked):not(.disabled) {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  cursor: pointer;
}
.item-link:not(.locked):not(.disabled):hover {
  background: linear-gradient(135deg, #4a92f8 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.item-link.locked,
.item-link.disabled {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.08);
  border: 1px dashed #4b5563;
  cursor: pointer;
}
.item-link.locked:hover {
  border-color: #9aa7b4;
  color: #9aa7b4;
}
/* 条目可点击视觉提示 */
.item-row.clickable {
  cursor: pointer;
}
.item-row.clickable:hover {
  border-color: #2f81f7;
  background: #1c2128;
}
.item-row.clickable:hover .item-link:not(.locked):not(.disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ===== 2026-09-10 重构：评分徽章统一金色 + 按钮缩小 ===== */
.item-scores {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 6px;
  overflow: hidden;
}
.score-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.item-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  margin-left: 0;
  flex-shrink: 0;
  transition: all 0.15s;
  font-weight: 500;
  gap: 3px;
}
/* ----- 废除统一金色样式（恢复三色）----- */
.score-badge { display: none; }


/* ==== 影视详情 海报墙 & 主演标签 ==== */
.detail-credits {
  margin: 0 0 24px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
}
.credits-poster-wall {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.poster-item {
  flex-shrink: 0;
  width: 110px;
  border-radius: 8px;
  overflow: hidden;
  cursor: default;
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.poster-item.unlocked { cursor: pointer; }
.poster-item.unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.poster-item img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  display: block;
}
.poster-blur {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65) blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.78rem;
  text-align: center;
  padding: 8px;
}
.poster-name {
  padding: 5px 6px;
  font-size: 0.78rem;
  color: #c9d1d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.credits-cast {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.credits-section-label {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 8px;
}
.cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cast-tag {
  padding: 3px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.82rem;
  color: #d1d5db;
  white-space: nowrap;
}
