/* ============================================================
   妈妈画报 · 淡紫Q萌主题  style.css?v=1
   ============================================================ */
:root {
  --bg: #faf7ff;
  --card: #ffffff;
  --primary: #7c4dff;
  --primary-deep: #5b3aa8;
  --primary-soft: #efe6ff;
  --accent: #ffb3d9;
  --gold: #ffd75e;
  --text: #3a2a55;
  --muted: #8a7aa8;
  --line: #eadfff;
  --ok: #3f9e5b;
  --err: #d94f6b;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(124, 77, 255, .10);
  --logo-size: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  font: 15px/1.75 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(600px 300px at 8% -4%, #f1e6ff 0%, transparent 60%),
    radial-gradient(500px 260px at 96% 4%, #ffe9f4 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
h1, h2, h3 { line-height: 1.35; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 66px; padding: 8px 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: var(--logo-size); height: var(--logo-size); display: block; }
.brand-name { font-size: 21px; font-weight: 800; color: var(--primary-deep); letter-spacing: 1px; }
.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.main-nav a {
  padding: 7px 14px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: 14.5px;
}
.main-nav a:hover { background: var(--primary-soft); }
.main-nav a.on { background: var(--primary); color: #fff; }
.header-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.credits-chip {
  background: var(--primary-soft); color: var(--primary-deep);
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-align: center;
  padding: 9px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary-deep);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, #9b6ad9, #7c4dff); color: #fff; }
.btn-lg { padding: 13px 34px; font-size: 17px; }
.btn-gold { background: linear-gradient(135deg, #ffd75e, #ffb347); color: #6b4a00; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-danger { background: #ffe9ee; color: var(--err); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- cards & hero ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 26px;
}
.hero { text-align: center; padding: 44px 0 10px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; color: var(--primary-deep); }
.hero h1 .hl { color: var(--primary); }
.hero p.sub { color: var(--muted); font-size: 16px; margin: 0 0 26px; }
.hero .emoji-row { font-size: 30px; letter-spacing: 12px; margin-bottom: 6px; }

/* ---------- generator form ---------- */
.gen-box { max-width: 860px; margin: 0 auto; }
.gen-input-row { display: flex; gap: 12px; }
.gen-input-row input[type=text] {
  flex: 1; border: 2px solid var(--line); border-radius: 999px;
  padding: 14px 22px; font-size: 16px; outline: none; color: var(--text);
  background: #fff; transition: border .15s;
}
.gen-input-row input[type=text]:focus { border-color: var(--primary); }
.gen-opts { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 16px 6px 4px; font-size: 14px; }
.gen-opts label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.gen-opts select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 8px;
  color: var(--text); background: #fff; outline: none; font-size: 13.5px;
}
.gen-tip { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.7; }
.gen-note { font-size: 13px; color: var(--purple-700, #5b3aa8); background: #f5f0ff; border-radius: 999px;
            padding: 4px 14px; margin-left: 6px; display: none; }

/* ---------- theme chips ---------- */
.hot-themes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 8px; }
.chip {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 14px; font-weight: 700; color: var(--primary-deep);
  cursor: pointer; transition: all .12s;
}
.chip:hover, .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- result ---------- */
.result-area { margin-top: 30px; display: none; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pane { text-align: center; }
.pane h3 { margin: 0 0 10px; font-size: 17px; }
.pane .preview {
  border: 2px dashed var(--line); border-radius: 16px; background: #fff;
  padding: 10px; min-height: 220px; display: flex; align-items: center; justify-content: center;
}
.pane .preview svg, .pane .preview img { width: 100%; height: auto; display: block; border-radius: 8px; }
.pane .pane-actions { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.result-toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0 6px; }
.badge-wm {
  display: inline-block; background: #fff3cd; color: #8a6a00; border-radius: 8px;
  font-size: 12.5px; padding: 2px 10px; margin-left: 6px; font-weight: 700;
}
.gen-status { text-align: center; color: var(--primary); font-weight: 700; padding: 30px 0; display: none; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.gen-status .dots { font-size: 34px; display: inline-block; animation: bounce 1s infinite; }

/* ---------- sections ---------- */
.section { margin: 46px 0; }
.section > h2 { text-align: center; font-size: 24px; color: var(--primary-deep); margin-bottom: 6px; }
.section > .section-sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.grid-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.theme-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px; transition: all .15s; display: block; color: var(--text);
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.theme-card .tc-icon {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; margin-bottom: 10px; background: var(--primary-soft);
}
.theme-card h4 { margin: 0 0 4px; font-size: 16px; }
.theme-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.theme-card .tc-colors { display: flex; gap: 5px; margin-top: 10px; }
.theme-card .tc-colors i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.06); }
.cat-block { margin-bottom: 30px; }
.cat-title { font-size: 19px; font-weight: 800; margin: 0 0 12px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.plan {
  background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 30px 24px;
  text-align: center; position: relative; transition: all .15s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.best { border-color: var(--primary); }
.plan .tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #ff8fb0, #ff5f8f); color: #fff; border-radius: 999px;
  font-size: 12.5px; padding: 3px 16px; font-weight: 800;
}
.plan h3 { margin: 6px 0 4px; font-size: 18px; }
.plan .price { font-size: 40px; font-weight: 900; color: var(--primary); }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; color: var(--muted); font-size: 14px; }
.plan ul li { margin: 7px 0; }

/* ---------- pay ---------- */
.pay-page, .auth-page { max-width: 560px; margin: 36px auto; }
.pay-qr-box, .pay-choose { text-align: center; padding: 30px; }
.pay-qr { width: 260px; height: 260px; border: 1px solid var(--line); border-radius: 12px; }
.btn-pay { display: block; width: 100%; margin: 12px 0; padding: 14px; font-size: 16px; }
.btn-pay.wechat { background: #2aae67; color: #fff; }
.btn-pay.alipay { background: #2f7fd9; color: #fff; }
.pay-status { font-weight: 700; color: var(--primary); }

/* ---------- forms & tables ---------- */
form label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
form input[type=text], form input[type=email], form input[type=password], form input[type=number],
form select, form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  font-size: 14.5px; color: var(--text); outline: none; background: #fff;
}
form input:focus, form select:focus, form textarea:focus { border-color: var(--primary); }
.notice-ok, .error-box, .notice-warn {
  border-radius: 12px; padding: 12px 18px; margin: 14px 0; font-weight: 600; font-size: 14px;
}
.notice-ok { background: #e9f8ee; color: var(--ok); border: 1px solid #bfe8cd; }
.notice-warn { background: #fff8e6; color: #9a6b12; border: 1px solid #f0dca8; font-weight: 500; line-height: 1.9; }
.notice-ok { line-height: 1.9; }
.notice-warn code, .notice-ok code { background: #fff; padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.error-box { background: #fdeef2; color: var(--err); border: 1px solid #f3c1cf; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
table.tbl tr:hover td { background: #fbf8ff; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* ---------- user works ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.work-card { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; }
.work-card .wc-preview { background: #faf7ff; padding: 10px; }
.work-card .wc-preview svg, .work-card .wc-preview img { width: 100%; height: auto; display: block; }
.work-card .wc-body { padding: 12px 14px; }
.work-card h4 { margin: 0 0 4px; font-size: 15px; }
.work-card .wc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.work-card .wc-actions .btn { padding: 5px 12px; font-size: 12.5px; }

/* ---------- footer & ads ---------- */
.ad-slot { margin: 18px auto; text-align: center; overflow: hidden; }
.site-footer {
  margin-top: 60px; background: #2d2050; color: #cfc3ea; padding: 40px 0 26px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.site-footer a { color: #cfc3ea; display: block; margin: 5px 0; }
.footer-bottom { border-top: 1px solid #4a3a75; margin-top: 26px; padding-top: 18px; font-size: 13px; color: #9a8cc0; }

/* ---------- admin ---------- */
.admin-wrap { margin-top: 24px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.set-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 20px 22px;
}
.set-card h3 { margin: 0 0 6px; color: var(--primary-deep); }
.set-card.full { grid-column: 1 / -1; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px; text-align: center;
}
.stat-card .num { font-size: 30px; font-weight: 900; color: var(--primary); }
.stat-card .lbl { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .settings-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .print-holder { margin: 0; padding: 0; }
  .print-holder svg { width: 100vw; height: auto; }
}
@page { margin: 8mm; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .hero h1 { font-size: 26px; }
  .gen-input-row { flex-direction: column; }
  .brand-logo { --logo-size: 36px; }
}
