/* ============================================================
   广告合作页 · 完全重做（2026-11-05）
   ------------------------------------------------------------
   新结构：
     ① 大标题区（渐变背景 + 标题 + 数据 + 按钮）
     ② 投放流程（4 步横排）
     ③ 广告位展示卡（带**位置示意图** + 名称 + 说明 + 价格）
     ④ 时长价格卡（带折扣角标）
     ⑤ 右侧吸顶下单表单（选中位实时联动）
     ⑥ 投放须知
   ============================================================ */

/* ---------- ① 大标题区 ---------- */
.ad-hero {
  margin: 20px 0 0; border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(620px 320px at 12% -10%, rgba(120, 255, 225, .22), transparent 62%),
    radial-gradient(520px 300px at 88% 110%, rgba(255, 255, 255, .16), transparent 64%),
    linear-gradient(135deg, #4a7ff0 0%, #3b63d8 48%, #2f4fbf 100%);
  color: #fff;
  padding: 44px 40px 38px;
}
.ad-hero-inner { max-width: 900px; }
.ad-hero-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .74);
  padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}
.ad-hero h1 {
  margin: 16px 0 0; font-size: 40px; font-weight: 800;
  letter-spacing: -.02em; line-height: 1.2; color: #fff;
}
.ad-hero-sub {
  margin: 12px 0 0; font-size: 15px; line-height: 1.8;
  color: rgba(255, 255, 255, .88); max-width: 40em;
}
.ad-hero-stats {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.ad-hero-stat { display: flex; flex-direction: column; gap: 3px; }
.ad-hero-stat b {
  font-size: 26px; font-weight: 800; line-height: 1.1;
  color: #fff; font-variant-numeric: tabular-nums;
}
.ad-hero-stat b i { font-style: normal; font-size: 14px; font-weight: 600; margin-left: 2px; }
.ad-hero-stat span { font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.ad-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ad-hero-actions .btn { border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .12); color: #fff; }
.ad-hero-actions .btn:hover { background: rgba(255, 255, 255, .22); }
.ad-hero-actions .btn-primary { background: #fff; color: #2f4fbf; border-color: #fff; }
.ad-hero-actions .btn-primary:hover { background: #fff; filter: brightness(.96); }

/* ---------- ② 投放流程 ---------- */
.ad-steps {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.ad-steps li {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 16px 16px 15px;
  display: flex; flex-direction: column; gap: 3px;
}
.ad-steps li i {
  font-style: normal; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 800; margin-bottom: 8px;
}
.ad-steps li b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ad-steps li span { font-size: 12.5px; color: var(--muted); }

/* ---------- ③ 广告位展示卡 ---------- */
.ad-pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.ad-pos {
  position: relative; display: block; cursor: pointer;
  padding: 12px 14px 14px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--bg-2);
  transition: border-color .15s, background .15s, transform .15s;
}
.ad-pos:hover { border-color: var(--accent); transform: translateY(-2px); }
.ad-pos.on { border-color: var(--accent); background: var(--accent-soft); }

/* 位置示意图 */
.ad-pos-mock {
  position: relative; height: 92px; border-radius: 9px;
  background: linear-gradient(180deg, #eef2f8, #e6ecf6);
  border: 1px solid var(--border);
  overflow: hidden; margin-bottom: 12px;
}
html[data-theme="dark"] .ad-pos-mock { background: linear-gradient(180deg, #1b2438, #161d2e); }
.ad-mock-bar {
  position: absolute; left: 8%; right: 8%; top: 12px; height: 15px;
  border-radius: 4px;
  background: linear-gradient(90deg, #7aa2ff, #ffb347);
  opacity: .9;
}
.ad-mock-side {
  position: absolute; left: 0; right: 0; top: 34px; height: 44px;
  background:
    linear-gradient(180deg, rgba(122, 162, 255, .22), rgba(122, 162, 255, .06));
  border-top: 1px dashed rgba(122, 162, 255, .5);
  border-bottom: 1px dashed rgba(122, 162, 255, .5);
}
.ad-mock-foot {
  position: absolute; left: 8%; right: 8%; bottom: 8px; height: 12px;
  border-radius: 3px; background: rgba(120, 140, 180, .28);
}
/* 各广告位的高亮位置不同 */
.ad-mock-site-bottom .ad-mock-bar { display: none; }
.ad-mock-site-bottom .ad-mock-foot { background: linear-gradient(90deg, #7aa2ff, #ffb347); }
.ad-mock-tools-top .ad-mock-side,
.ad-mock-prompts-top .ad-mock-side,
.ad-mock-news-top .ad-mock-side { display: none; }
.ad-mock-tools-top .ad-mock-bar,
.ad-mock-prompts-top .ad-mock-bar,
.ad-mock-news-top .ad-mock-bar { top: 26px; left: 4%; right: 4%; height: 22px; }
.ad-mock-tools-top .ad-mock-foot,
.ad-mock-prompts-top .ad-mock-foot,
.ad-mock-news-top .ad-mock-foot { display: none; }
.ad-pos-mock em {
  position: absolute; right: 6px; bottom: 4px;
  font-style: normal; font-size: 9.5px; color: var(--muted);
  background: rgba(255, 255, 255, .78); padding: 1px 5px; border-radius: 4px;
}
html[data-theme="dark"] .ad-pos-mock em { background: rgba(0, 0, 0, .5); }

.ad-pos-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-pos-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.ad-pos-check {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 800;
  opacity: 0; transform: scale(.5); transition: all .18s;
}
.ad-pos.on .ad-pos-check { opacity: 1; transform: scale(1); }
.ad-pos-desc {
  margin: 8px 0 10px; font-size: 12.8px; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-pos-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ad-pos-size { font-size: 12px; color: var(--muted); }
.ad-pos-price { display: inline-flex; align-items: baseline; gap: 1px; }
.ad-pos-price i { font-style: normal; font-size: 12.5px; color: var(--accent); font-weight: 700; }
.ad-pos-price b {
  font-size: 20px; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ad-pos-price em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 2px; }

/* ---------- ④ 时长卡片 ---------- */
.ad-dur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ad-dur {
  position: relative; cursor: pointer; overflow: hidden;
  padding: 14px 15px 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .15s, background .15s, transform .15s;
}
.ad-dur:hover { border-color: var(--accent); transform: translateY(-2px); }
.ad-dur.on { border-color: var(--accent); background: var(--accent-soft); }
.ad-dur-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ad-dur-days { font-size: 12px; color: var(--muted); }
.ad-dur-price { display: inline-flex; align-items: baseline; gap: 1px; margin-top: 4px; }
.ad-dur-price i { font-style: normal; font-size: 12.5px; color: var(--accent); font-weight: 700; }
.ad-dur-price b {
  font-size: 19px; font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ad-dur-badge {
  position: absolute; top: 0; right: 0;
  background: var(--accent); color: var(--on-accent);
  font-size: 10.5px; font-weight: 700; padding: 3px 8px;
  border-radius: 0 12px 0 10px;
}

/* ---------- 面板 ---------- */
.ad-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 348px;
  gap: 22px; margin-top: 22px; align-items: start;
}
.ad-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ad-side { min-width: 0; position: sticky; top: calc(var(--header-h) + 16px); }
.ad-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.ad-panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ad-step {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 800;
}
.ad-panel-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.ad-panel-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 须知 ---------- */
.ad-faq { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ad-faq li {
  font-size: 13.2px; line-height: 1.7; color: var(--ink-2);
  padding-left: 16px; position: relative;
}
.ad-faq li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .5;
}
.ad-faq b { color: var(--ink); font-weight: 700; }

/* ---------- 右侧下单表单 ---------- */
.ad-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 20px 18px;
  box-shadow: 0 10px 30px -18px rgba(10, 18, 34, .22);
}
.ad-form-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 16px; padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}
.ad-form-head h2 { margin: 0; font-size: 16.5px; font-weight: 800; }
.ad-form-badge {
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px;
}
.ad-field { position: relative; margin-bottom: 13px; }
.ad-field label {
  display: block; margin-bottom: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.ad-field label i { color: var(--danger); font-style: normal; }
.ad-field input[type=text], .ad-field input[type=url],
.ad-field input[type=email], .ad-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; font-size: 13.5px; font-family: inherit;
  color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 9px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.ad-field input:focus, .ad-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ad-field textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.ad-field input::placeholder, .ad-field textarea::placeholder { color: var(--muted); opacity: .7; }
.ad-count {
  position: absolute; right: 10px; bottom: 9px;
  font-size: 11px; color: var(--muted); pointer-events: none;
}
.ad-pay-head { margin: 18px 0 9px; padding-top: 15px; border-top: 1px solid var(--border); }
.ad-pay-head h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.ad-pay-types { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-pay {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 9px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg-2);
  font-size: 13px; color: var(--ink-2); transition: all .15s;
}
.ad-pay:hover { border-color: var(--accent); }
.ad-pay input { display: none; }
.ad-pay:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent); font-weight: 700;
}
.ad-pay-ic { font-size: 13px; }
.ad-pay-none { margin: 0; font-size: 13px; color: var(--danger); }

.ad-summary {
  margin: 16px 0 14px; padding: 13px 14px;
  border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border);
}
.ad-summary-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 13px; color: var(--muted); padding: 3px 0;
}
.ad-summary-row b { color: var(--ink); font-weight: 600; text-align: right; }
.ad-summary-total {
  margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 13.5px; color: var(--ink-2);
}
.ad-summary-total b {
  font-size: 23px; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ad-submit {
  width: 100%; height: 46px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: filter .15s, transform .1s;
}
.ad-submit:hover { filter: brightness(1.08); }
.ad-submit:active { transform: translateY(1px); }
.ad-agree { margin: 12px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .ad-layout { grid-template-columns: 1fr; }
  .ad-side { position: static; }
  .ad-form { box-shadow: none; }
  .ad-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ad-hero { padding: 28px 20px 26px; border-radius: 14px; }
  .ad-hero h1 { font-size: 28px; margin-top: 12px; }
  .ad-hero-sub { font-size: 13.5px; }
  .ad-hero-stats { gap: 18px 22px; margin-top: 20px; padding-top: 18px; }
  .ad-hero-stat b { font-size: 21px; }
  .ad-steps { gap: 8px; margin-top: 16px; }
  .ad-steps li { padding: 12px 13px; }
  .ad-steps li b { font-size: 13.5px; }
  .ad-steps li span { font-size: 11.5px; }
  .ad-panel { padding: 16px 14px; border-radius: 12px; }
  .ad-pos-grid { grid-template-columns: 1fr; }
  .ad-pos-mock { height: 82px; }
  .ad-dur-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-form { padding: 16px 14px; }
  .ad-summary-total b { font-size: 21px; }
}
