/* ============================================================
 * styles.css —— 站点样式（配色由 config.js 的 primary/accent/deep 覆盖）
 * ============================================================ */
:root {
  --primary: #d4788f;
  --accent: #f0a0b8;
  --deep: #1f0d1a;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --text: #fdf3f6;
  --muted: rgba(253, 243, 246, .62);
  --ok: #4ecb8d;
  --warn: #ffc860;
  --err: #ff7a7a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #3a1626 0%, var(--deep) 60%) no-repeat, var(--deep);
  color: var(--text);
  font: 15px/1.7 "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 8px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 14px 96px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 22px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  box-shadow: 0 6px 18px rgba(212, 120, 143, .32); transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; background: rgba(255, 255, 255, .12); color: var(--muted); margin-right: 6px; }
.tag-hot { background: rgba(255, 120, 120, .18); color: #ffb3b3; }
.tag-time { background: rgba(255, 200, 96, .16); color: var(--warn); }

/* ============================================================
 * 首页
 * ============================================================ */
.store-top { text-align: center; font-size: 13px; color: var(--muted); padding: 12px 0 8px; letter-spacing: 1px; }

.store-hero {
  position: relative; border-radius: 18px; overflow: hidden; padding: 26px 18px;
  background: linear-gradient(135deg, rgba(212, 120, 143, .35), rgba(240, 160, 184, .18));
  border: 1px solid var(--line);
}
.store-hero.has-image { background-size: cover; background-position: center; }
.store-hero-in { position: relative; z-index: 2; }
.store-label {
  display: inline-block; font-size: 12px; padding: 3px 12px; border-radius: 20px;
  background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px);
}
.store-hero h1 { margin: 10px 0 6px; font-size: 26px; line-height: 1.3; }
.store-hero p { margin: 0 0 16px; color: rgba(255, 255, 255, .82); font-size: 13.5px; }
.store-hero > .store-hot { margin-top: 18px; }

.store-hot { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.store-hot h2 { margin: 0 0 10px; font-size: 15px; }
.store-hot-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px;
  background: rgba(255, 255, 255, .07); margin-bottom: 8px; color: var(--text);
}
.store-hot-item:last-child { margin-bottom: 0; }
.store-hot-icon { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .12); flex: none; }
.store-hot-icon img { width: 100%; height: 100%; object-fit: cover; }
.store-hot-name { flex: 1; font-size: 14px; font-weight: 600; }
.store-hot-tag { font-size: 11px; color: var(--accent); }

.store-search { display: block; margin: 16px 0 10px; }
.store-search-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.store-search input {
  width: 100%; padding: 12px 16px; border-radius: 999px; font-size: 14px; color: var(--text);
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); outline: none;
}
.store-search input:focus { border-color: var(--accent); }

.store-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; }
.store-tabs button {
  flex: none; padding: 7px 15px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); color: var(--muted);
}
.store-tabs button.on { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }

.store-sec { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 10px; font-size: 16px; font-weight: 700; }
.store-sec small { font-size: 12px; font-weight: 400; color: var(--muted); }

.store-list { display: grid; gap: 10px; }
.store-game {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.store-icon { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: none; background: rgba(255, 255, 255, .1); }
.store-icon img { width: 100%; height: 100%; object-fit: cover; }
.store-info { flex: 1; min-width: 0; }
.store-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.store-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.store-tag { padding: 1px 8px; border-radius: 20px; background: rgba(255, 255, 255, .12); font-size: 11px; }
.store-stars { color: var(--warn); }
.store-get {
  flex: none; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.store-empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }
.store-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0 10px; }

.proof { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.proof b { color: var(--accent); font-size: 16px; }

/* ---------- 领取滚动提示 ---------- */
.claim-toast {
  position: fixed; left: 14px; bottom: 86px; z-index: 60; max-width: 74%;
  display: flex; align-items: center; gap: 8px;
  background: rgba(31, 13, 26, .92); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .32s ease;
}
.claim-toast.show { transform: translateY(0); opacity: 1; }
.claim-toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------- 进入提示弹窗 ---------- */
.notice-mask {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 3, 7, .68); padding: 20px;
}
.notice-mask.is-hidden { display: none; }
.notice-card {
  width: 100%; max-width: 340px; background: #2a1120; border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 20px; text-align: center;
}
.notice-card h2 { margin: 0 0 10px; font-size: 17px; }
.notice-card p { margin: 0 0 18px; font-size: 13.5px; color: rgba(255, 255, 255, .8); white-space: pre-line; text-align: left; }

/* ============================================================
 * 客服
 * ============================================================ */
.feedback-entry {
  position: fixed; right: 14px; bottom: 20px; z-index: 70; width: 54px; height: 54px; border-radius: 50%;
  border: 0; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 22px;
  box-shadow: 0 8px 20px rgba(212, 120, 143, .45);
}
.feedback-mask {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8, 3, 7, .6); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.feedback-mask.show { opacity: 1; pointer-events: auto; }
.chat-panel {
  width: 100%; max-width: 480px; height: 76vh; display: flex; flex-direction: column;
  background: #25101d; border-radius: 18px 18px 0 0; border: 1px solid var(--line); overflow: hidden;
  transform: translateY(20px); transition: transform .25s;
}
.feedback-mask.show .chat-panel { transform: translateY(0); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.chat-head .who { flex: 1; }
.chat-head .who b { display: block; font-size: 14.5px; }
.chat-status { font-size: 12px; color: var(--muted); }
.chat-status.online { color: var(--ok); }
.chat-close { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; }
.chat-scroll-region { flex: 1; overflow-y: auto; padding: 14px 16px; }
.chat-welcome { color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px 0; }
.visitor-msg { display: flex; flex-direction: column; align-items: flex-end; margin-bottom: 12px; }
.visitor-msg > span {
  max-width: 78%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  padding: 9px 13px; border-radius: 14px 14px 4px 14px; font-size: 14px; word-break: break-word;
}
.visitor-msg.admin { align-items: flex-start; }
.visitor-msg.admin > span { background: rgba(255, 255, 255, .1); border-radius: 14px 14px 14px 4px; }
.visitor-msg > span b { display: block; font-size: 11px; opacity: .8; margin-bottom: 2px; font-weight: 400; }
.visitor-msg time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 8px; }
.chat-quick button {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); color: var(--text);
}
.chat-typing { font-size: 12px; color: var(--muted); padding: 0 16px 6px; height: 18px; }
.chat-preview { display: none; gap: 8px; padding: 0 16px 8px; flex-wrap: wrap; }
.chat-preview.show { display: flex; }
.chat-preview span { position: relative; }
.chat-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.chat-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #000; color: #fff; border: 0; font-size: 13px; }
.chat-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px 16px; border-top: 1px solid var(--line); }
.chat-foot input[type=text] {
  flex: 1; padding: 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line); color: var(--text); outline: none; font-size: 14px;
}
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); color: var(--text); font-size: 16px; }

/* ============================================================
 * 任务详情页 activity.html
 * ============================================================ */
.act-head { padding: 16px 0 6px; display: flex; align-items: center; gap: 12px; }
.act-head .back { color: var(--muted); font-size: 13px; }
.act-title { font-size: 19px; font-weight: 700; margin: 0; }
.act-hero { display: flex; gap: 14px; align-items: center; padding: 14px; }
.act-hero .store-icon { width: 66px; height: 66px; }
.act-meta { font-size: 13px; color: var(--muted); }

.step { margin-bottom: 12px; }
.step h3 { margin: 0 0 8px; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.step .idx { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.step p { margin: 0 0 10px; font-size: 13.5px; color: rgba(255, 255, 255, .8); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, .08); border: 1px dashed var(--line); color: var(--text);
}
.chip.on { background: linear-gradient(135deg, var(--primary), var(--accent)); border-style: solid; }
.comment-box {
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; min-height: 46px; word-break: break-word;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.upload-grid .ph {
  aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px;
  background: rgba(255, 255, 255, .05); overflow: hidden;
}
.upload-grid img { width: 100%; height: 100%; object-fit: cover; }

.review { text-align: center; padding: 22px 0; }
.spinner { width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.claim-section { margin-top: 8px; }
.claim-group { margin-bottom: 14px; }
.claim-group h4 { margin: 0 0 8px; font-size: 14px; color: var(--accent); }
.claim-item {
  display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.claim-item .ci-text { flex: 1; font-size: 14px; }
.claim-item .go { font-size: 13px; color: var(--accent); }

.copy-tip {
  position: fixed; left: 50%; top: 24%; transform: translateX(-50%); z-index: 95;
  background: rgba(0, 0, 0, .82); color: #fff; padding: 8px 18px; border-radius: 999px; font-size: 13px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.copy-tip.show { opacity: 1; }

/* ============================================================
 * 后台 admin.html
 * ============================================================ */
.admin-wrap { max-width: 880px; margin: 0 auto; padding: 0 14px 80px; }
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; }
.top h1 { font-size: 17px; margin: 0; flex: 1; }
.status { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 12px; }
.tabs button { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); color: var(--muted); }
.tabs button.on { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.pane { display: none; }
.pane.on { display: block; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=number], .field textarea, .field select {
  width: 100%; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-family: inherit; outline: none;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.switch input { width: 18px; height: 18px; }

.item-card { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--card); }
.item-card > .hd { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.item-card > .hd b { flex: 1; font-size: 14px; font-weight: 600; }
.item-card .bd { display: none; padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.item-card.open .bd { display: block; }
.link-card { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.link-card input { padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--text); font-size: 13px; width: 100%; }
@media (max-width: 620px) { .link-card { grid-template-columns: 1fr 1fr; } }

.login-mask { position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center; background: rgba(8, 3, 7, .8); padding: 20px; }
.login-mask.hidden { display: none; }
.login-card { width: 100%; max-width: 330px; background: #2a1120; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; }
.login-card h2 { margin: 0 0 6px; font-size: 17px; text-align: center; }
.login-sub { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.login-card label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.login-card input { width: 100%; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); color: var(--text); font-size: 14px; margin-bottom: 12px; }
.login-err { color: var(--err); font-size: 12.5px; min-height: 18px; margin: 0 0 8px; text-align: center; }
.login-tip { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; }
.login-card .btn { width: 100%; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(16px); z-index: 120;
  background: rgba(0, 0, 0, .86); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat-box b { display: block; font-size: 22px; color: var(--accent); }
.stat-box span { font-size: 12px; color: var(--muted); }
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.stat-table th, .stat-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.stat-table th { background: rgba(255, 255, 255, .06); }
