/* ============================================================
 * 子龙影院 · 黑金会员版 —— 黑色夜幕 + 香槟金
 * 配色跟随 ZL 头像：黑底金字，高端私人影院感
 * ============================================================ */
:root {
  --bg: #0b0c0f;
  --card: #15161c;
  --card-hover: #1a1b23;
  --border: #262830;
  --border-strong: #33353f;
  --text: #ece9e2;
  --text-dim: #9a978f;
  --text-mute: #6d6b64;
  --gold: #d9b45b;              /* 香槟金（主色） */
  --gold-bright: #f0d48a;
  --gold-deep: #a8842f;
  --gold-grad: linear-gradient(135deg, #e8c97a, #c19a3f);
  --gold-soft: rgba(217, 180, 91, 0.12);
  --green: #7ddb9a;
  --green-soft: rgba(74, 222, 128, 0.12);
  --tag-blue-bg: rgba(96, 140, 255, 0.14);
  --tag-blue-fg: #8fb0ff;
  --tag-pink-bg: rgba(255, 99, 99, 0.13);
  --tag-pink-fg: #ff9d9d;
  --tag-yellow-bg: rgba(217, 180, 91, 0.16);
  --tag-yellow-fg: #e6c778;
  --tag-default-bg: rgba(255, 255, 255, 0.07);
  --tag-default-fg: #b8b5ad;
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

/* ===== Hero：黑色夜幕 + 金色光晕 ===== */
.hero {
  position: relative;
  background:
    radial-gradient(700px 300px at 80% -10%, rgba(217, 180, 91, 0.16), transparent 65%),
    radial-gradient(600px 280px at 12% 110%, rgba(217, 180, 91, 0.10), transparent 60%),
    linear-gradient(160deg, #0c0d11 0%, #111017 55%, #17140e 100%);
  color: var(--text);
  padding: 18px 0 46px;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  border-bottom: 1px solid rgba(217, 180, 91, 0.25);
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* Hero 顶排：logo 左 / 入口右 */
.hero-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
}

.hero-title {
  margin: 18px 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.25;
  background: linear-gradient(120deg, #f5e3ae 0%, #d9b45b 45%, #f0d48a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #d9b45b;
}

.hero-sub {
  margin: 0;
  font-size: 15px;
  color: rgba(236, 233, 226, 0.6);
}

/* Hero 里的搜索框：深色玻璃 + 金色聚焦光环 */
.search-wrap {
  position: relative;
  width: min(580px, 100%);
  margin-top: 6px;
}

.search-wrap input {
  width: 100%;
  padding: 15px 62px 15px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap input::placeholder { color: var(--text-mute); }

.search-wrap input:focus {
  border-color: rgba(217, 180, 91, 0.65);
  box-shadow: 0 0 0 3px rgba(217, 180, 91, 0.22), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.search-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #171310;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.search-btn:hover { filter: brightness(1.12); }

/* Hero 卖点标签：金色描边 pill */
.trust-tags {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: #e0c88f;
}

.trust-tags li {
  background: rgba(217, 180, 91, 0.08);
  border: 1px solid rgba(217, 180, 91, 0.30);
  padding: 4px 14px;
  border-radius: 999px;
}

/* Hero 上的入口按钮 */
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 91, 0.40);
  background: rgba(217, 180, 91, 0.08);
  color: #e0c88f;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.header-link:hover, .header-link:focus-visible {
  background: rgba(217, 180, 91, 0.18);
}

/* ===== 小节标题 ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 2px;
}

/* ===== 推广位（广告卡片） ===== */
.promo-section {
  margin-top: 22px;
}

.promo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

/* 单条广告时占满整行，多条时自动并排 */
.promo-list > .promo-card:only-child {
  grid-column: 1 / -1;
}

.promo-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(217, 180, 91, 0.10), rgba(217, 180, 91, 0.03)), var(--card);
  border: 1px solid rgba(217, 180, 91, 0.38);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.promo-card:hover,
.promo-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 4px 22px rgba(217, 180, 91, 0.14);
  transform: translateY(-2px);
}

/* 左上角"推广"角标：合规又低调 */
.promo-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 10px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #171310;
  background: var(--gold-grad);
  border-radius: 0 0 0 10px;
  font-weight: 700;
}

.promo-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 24px;
  border-radius: 12px;
  background: var(--gold-soft);
  border: 1px solid rgba(217, 180, 91, 0.25);
}

.promo-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promo-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
}

.promo-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.promo-cta {
  flex-shrink: 0;
  align-self: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #171310;
  background: var(--gold-grad);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .promo-card { flex-wrap: wrap; padding: 14px; }
  .promo-cta { width: 100%; text-align: center; margin-top: 4px; }
}


.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--gold-grad);
}

/* ===== 来源 Tab ===== */
.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 12px;
}

.tab {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover { color: var(--gold-bright); border-color: rgba(217, 180, 91, 0.45); }

.tab.is-active {
  background: var(--gold-grad);
  border-color: transparent;
  color: #171310;
  font-weight: 700;
}

/* ===== 结果计数 ===== */
.result-meta {
  font-size: 13px;
  color: var(--text-dim);
  padding: 4px 2px 12px;
}

/* ===== 资源海报卡片 ===== */
.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px;
}

.resource {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* 有真实海报的卡片才分出海报栏 */
.resource.has-poster {
  grid-template-columns: 64px 1fr;
}

.resource:hover {
  border-color: rgba(217, 180, 91, 0.55);
  box-shadow: 0 4px 18px rgba(217, 180, 91, 0.10);
  transform: translateY(-2px);
  background: var(--card-hover);
}

/* 海报位（链接可点） */
.poster {
  display: block;
  width: 64px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resource-body { min-width: 0; }

.resource-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 8px;
  word-break: break-word;
}

.resource-title:hover { color: var(--gold-bright); }

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.resource-source {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.tag-blue { background: var(--tag-blue-bg); color: var(--tag-blue-fg); }
.tag-pink { background: var(--tag-pink-bg); color: var(--tag-pink-fg); }
.tag-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.tag-default { background: var(--tag-default-bg); color: var(--tag-default-fg); }

/* ===== 操作区 ===== */
.resource-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.status-ok {
  background: var(--green-soft);
  color: var(--green);
}

.btn-get {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #171310;
  font-size: 14px;
  font-weight: 700;
  transition: filter 0.15s ease;
}

.btn-get:hover, .btn-get:focus-visible { filter: brightness(1.12); }

/* ===== 口令按钮（点击复制） ===== */
.btn-pwd {
  display: inline-block;
  padding: 2px 10px;
  border: 1px dashed rgba(217, 180, 91, 0.55);
  border-radius: 4px;
  background: rgba(217, 180, 91, 0.08);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.6;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pwd:hover, .btn-pwd:focus-visible {
  background: var(--gold-grad);
  color: #171310;
  border-style: solid;
  border-color: transparent;
}

/* 弹窗里的大号口令按钮 */
.btn-pwd-lg {
  font-size: 14px;
  padding: 5px 16px;
  border-radius: 6px;
  margin-left: 6px;
}

/* ===== 弹窗：白底二维码中间页 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.modal {
  position: relative;
  width: min(340px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.modal-close:hover { background: #f5f5f5; color: #333; }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.modal-filename {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  word-break: break-word;
}

.modal-pwd {
  margin: 10px 0 0;
  font-size: 14px;
  color: #e54d3c;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
}

.modal-qr-wrap {
  width: 200px;
  height: 200px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px;
}

.modal-qr-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.modal-open-btn {
  display: block;
  width: 100%;
  padding: 13px 0;
  border-radius: 10px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease;
}

.modal-open-btn:hover { background: #d2e3fc; }

/* ===== 页脚 / 空状态 ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: #101116;
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

.site-footer p { margin: 4px 0; }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
  font-size: 15px;
}

.empty-state a { color: var(--gold-bright); }

/* Toast 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(12, 12, 16, 0.95);
  border: 1px solid rgba(217, 180, 91, 0.35);
  color: var(--gold-bright);
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.toast.is-visible { opacity: 1; }

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
  .hero { padding: 14px 0 36px; border-radius: 0 0 20px 20px; }
  .logo { font-size: 20px; }
  .logo-img { width: 34px; height: 34px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 13px; }
  .search-wrap input { padding: 13px 58px 13px 18px; font-size: 14px; }
  .search-btn { width: 36px; height: 36px; }
  .trust-tags { gap: 8px; font-size: 12px; }
  .trust-tags li { padding: 3px 11px; }

  .section-title { font-size: 17px; margin-top: 20px; }
  .resource { padding: 12px; gap: 12px; }
  .resource.has-poster { grid-template-columns: 56px 1fr; }
  .poster { width: 56px; height: 79px; }
  .resource-title { font-size: 14px; }
  .resource-source { width: 100%; margin-left: 0; margin-top: 2px; }
  .btn-get { padding: 7px 20px; }
}

/* ===== 平板（641px ~ 960px）===== */
@media (min-width: 641px) and (max-width: 960px) {
  .hero-title { font-size: 30px; }
  .search-wrap { width: min(520px, 100%); }
}

/* ===== 桌面端（>960px）：列表双列海报卡 ===== */
@media (min-width: 961px) {
  .hero-title { font-size: 38px; }
  .hero { padding: 20px 0 52px; }

  .resource-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .resource { padding: 16px; }
  .resource.has-poster { grid-template-columns: 72px 1fr; }
  .poster { width: 72px; height: 101px; }
  .resource-title { font-size: 16px; }
}

/* ===== 尊重系统"减少动态效果"设置 ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
