/* =========================================================================
   锦囊 · AI 提示词库 —— 样式（七步之内 · less7.com 工具站）
   配色：墨曜黑 + 鎏金。暗色高级感，克制的金色点缀，零外部字体、零框架。
   ========================================================================= */

:root {
  /* 底色 */
  --bg:         #0B0D12;
  --bg-soft:    #10131A;
  --surface:    #151923;
  --surface-2:  #1B2030;
  --line:       #252B3B;
  --line-soft:  #1C212E;

  /* 文字 */
  --text:   #ECEEF2;
  --text-2: #A6AEBC;
  --text-3: #6E7686;

  /* 强调：鎏金 */
  --accent:       #F0B429;
  --accent-hi:    #FFC94D;
  --accent-dim:   #C9971C;
  --accent-ink:   #1A1206;
  --accent-soft:  rgba(240, 180, 41, .12);
  --accent-line:  rgba(240, 180, 41, .35);

  /* 功能色 */
  --success:      #34D399;
  --success-soft: rgba(52, 211, 153, .14);
  --danger:       #F87171;
  --danger-soft:  rgba(248, 113, 113, .14);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .40);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .50);

  /* 尺寸 */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #313a4d; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ */
/* 顶部导航（品牌统一结构）                                              */
/* ------------------------------------------------------------------ */
.site-header {
  background: rgba(11, 13, 18, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-dim));
  display: grid; place-items: center; color: var(--accent-ink);
  box-shadow: 0 2px 8px rgba(240, 180, 41, .25);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--text-3); line-height: 1.1; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a, .site-nav .nav-btn {
  color: var(--text-2);
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.site-nav a:hover, .site-nav .nav-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.site-nav a.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Hero 区                                                             */
/* ------------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(800px 360px at 50% -120px, rgba(240, 180, 41, .18), transparent 60%),
    radial-gradient(600px 320px at 85% 8%, rgba(240, 180, 41, .08), transparent 55%),
    var(--bg);
  color: var(--text);
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--line-soft);
}
.hero .container { text-align: center; }
.tool-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.tool-logo svg { filter: drop-shadow(0 10px 28px rgba(240, 180, 41, .32)); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-hi);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.15;
}
.hero h1 .accent {
  color: var(--accent-hi);
  text-shadow: 0 0 40px rgba(240, 180, 41, .35);
}
.hero p.lead {
  max-width: 620px; margin: 16px auto 0;
  color: var(--text-2); font-size: 16px;
}
.hero-stats { display: flex; justify-content: center; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-size: 26px; color: var(--accent-hi); font-weight: 800; }
.hero-stats .stat span { font-size: 12px; color: var(--text-3); }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); box-shadow: 0 8px 24px rgba(240, 180, 41, .28); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); background: rgba(255,255,255,.03); }

/* ------------------------------------------------------------------ */
/* 工具说明（赞/正文/署名 玩法）                                       */
/* ------------------------------------------------------------------ */
.how-it-works { padding: 46px 0 8px; }
.how-it-works .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.how-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color .15s, transform .15s;
}
.how-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.how-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 12px;
}
.how-card .icon svg { width: 22px; height: 22px; }
.how-card.i-head .icon { background: var(--accent-soft); color: var(--accent-hi); }
.how-card.i-body .icon { background: var(--success-soft); color: var(--success); }
.how-card.i-tail .icon { background: rgba(255,255,255,.06); color: var(--text-2); }
.how-card h3 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.how-card p { font-size: 13px; color: var(--text-2); }

/* ------------------------------------------------------------------ */
/* 工具栏：分类 + 排序                                                  */
/* ------------------------------------------------------------------ */
.toolbar {
  position: sticky; top: 60px; z-index: 40;
  background: rgba(11, 13, 18, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.toolbar .container { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; padding-bottom: 2px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .15s;
}
.cat-tab:hover { border-color: var(--accent-line); color: var(--text); }
.cat-tab.active {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); font-weight: 600;
}

.sort-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.sort-switch button { padding: 8px 14px; font-size: 13px; color: var(--text-2); background: var(--surface); }
.sort-switch button + button { border-left: 1px solid var(--line); }
.sort-switch button.active { background: var(--surface-2); color: var(--accent-hi); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* 提示词列表 / 卡片                                                    */
/* ------------------------------------------------------------------ */
.main { padding: 26px 0 60px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.list-head h2 { font-size: 18px; color: var(--text); }
.list-head .count { font-size: 13px; color: var(--text-3); }

.prompt-list { display: flex; flex-direction: column; gap: 16px; }

.prompt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.prompt-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }

/* 赞 */
.prompt-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px 12px;
}
.prompt-head .rank {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.05); color: var(--text-2);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.prompt-head .rank svg { width: 18px; height: 18px; }
.prompt-head .rank.top { background: var(--accent-soft); color: var(--accent-hi); }
.prompt-head .meta { flex: 1; min-width: 0; }
.prompt-title { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--text); }
.prompt-tags { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.cat-pill {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.05); color: var(--text-2);
  border: 1px solid var(--line-soft);
}
.cat-pill.badge-top { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-line); }

/* 正文 */
.prompt-body { position: relative; padding: 4px 20px 14px; }
.prompt-body pre {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 16px 44px;
  color: var(--text-2);
  max-height: 300px;
  overflow-y: auto;
}
.copy-btn {
  position: absolute; right: 32px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.copied { background: var(--success-soft); border-color: transparent; color: var(--success); }

/* 署名 */
.prompt-tail {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.prompt-author { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.prompt-author svg { width: 14px; height: 14px; }
.prompt-author .name { color: var(--text-2); font-weight: 600; }

.vote-area { display: flex; gap: 8px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all .15s;
}
.vote-btn svg { width: 16px; height: 16px; }
.vote-btn:hover { border-color: var(--accent-line); color: var(--text); }
.vote-btn.up.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vote-btn.down.active { background: var(--danger-soft); color: var(--danger); border-color: rgba(248,113,113,.4); }
.vote-btn .num { min-width: 12px; text-align: center; }

.net-badge { font-size: 12px; color: var(--accent-hi); white-space: nowrap; font-weight: 600; }

/* 空状态 */
.empty {
  text-align: center; padding: 70px 20px;
  color: var(--text-3);
}
.empty svg { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--line); }
.empty p { font-size: 14px; }

/* ------------------------------------------------------------------ */
/* 提交弹窗                                                            */
/* ------------------------------------------------------------------ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 30px 16px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg);
  margin: auto 0;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { font-size: 17px; color: var(--text); }
.modal-close { font-size: 24px; color: var(--text-3); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.form-group label .req { color: var(--accent-hi); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg-soft);
  transition: border-color .15s, box-shadow .15s;
}
.form-group select option { background: var(--surface); color: var(--text); }
.form-group textarea { resize: vertical; min-height: 140px; font-family: var(--mono); line-height: 1.6; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, .15);
}
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.modal-foot { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-foot .btn { padding: 11px 20px; font-size: 14px; }
.btn-line { background: transparent; color: var(--text-2); border: 1px solid var(--line); }
.btn-line:hover { background: rgba(255,255,255,.04); color: var(--text); }

/* 提示条 Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
  padding: 11px 18px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--danger-soft); border-color: rgba(248,113,113,.4); color: var(--danger); }

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */
.faq { padding: 40px 0 50px; background: var(--bg-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.faq h2 { text-align: center; margin-bottom: 26px; font-size: 22px; color: var(--text); }
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; padding: 16px 20px;
  font-size: 15px; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q .chev { transition: transform .2s; color: var(--text-3); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 20px 16px; font-size: 14px; color: var(--text-2); }
.faq-item.open .faq-a { display: block; }

/* ------------------------------------------------------------------ */
/* 相关工具推荐                                                        */
/* ------------------------------------------------------------------ */
.related { padding: 50px 0 10px; }
.related h2 { text-align: center; margin-bottom: 24px; font-size: 22px; color: var(--text); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  display: block; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color .15s, transform .15s;
}
.related-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.related-card .t { font-size: 15px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.related-card .t svg { width: 18px; height: 18px; color: var(--accent-hi); }
.related-card p { font-size: 13px; color: var(--text-2); }

/* ------------------------------------------------------------------ */
/* 页脚（品牌统一结构）                                                 */
/* ------------------------------------------------------------------ */
.site-footer { background: var(--bg); border-top: 1px solid var(--line-soft); }
.site-footer .container { padding: 44px 20px 30px; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--text-2); }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; color: var(--text); margin-bottom: 12px; letter-spacing: .5px; }
.footer-col a, .footer-col button { display: block; font-size: 13px; color: var(--text-2); padding: 4px 0; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--accent-hi); }
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--text-3);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* 管理后台                                                            */
/* ------------------------------------------------------------------ */
.admin-wrap { padding: 30px 0 70px; }
.login-card {
  max-width: 400px; margin: 60px auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-md); text-align: center;
}
.login-card .brand-mark { margin: 0 auto 16px; width: 48px; height: 48px; border-radius: 14px; }
.login-card .brand-mark svg { width: 30px; height: 30px; }
.login-card h2 { margin-bottom: 20px; color: var(--text); }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; margin-bottom: 14px; text-align: center; background: var(--bg-soft); color: var(--text); }
.login-card input:focus { outline: none; border-color: var(--accent-line); }
.login-card .btn { width: 100%; justify-content: center; }

.admin-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.admin-bar h2 { font-size: 18px; color: var(--text); }
.admin-actions { display: flex; gap: 8px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: top; color: var(--text-2); }
.admin-table th { background: var(--bg-soft); font-weight: 600; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .t-title { font-weight: 600; max-width: 260px; color: var(--text); }
.admin-table .t-title .sub { font-weight: 400; color: var(--text-3); font-size: 12px; display: block; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-pill.ok { background: var(--success-soft); color: var(--success); }
.status-pill.hide { background: var(--danger-soft); color: var(--danger); }
.status-pill.top { background: var(--accent-soft); color: var(--accent-hi); }

.num-edit { display: flex; align-items: center; gap: 5px; }
.num-edit input { width: 54px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; text-align: center; background: var(--bg-soft); color: var(--text); }
.num-edit input:focus { outline: none; border-color: var(--accent-line); }
.mini-btn {
  padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  white-space: nowrap; transition: all .12s;
}
.mini-btn:hover { border-color: var(--accent-line); color: var(--text); }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.mini-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mini-btn.primary:hover { background: var(--accent-hi); }
.mini-btn.gold { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-line); }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }

.table-scroll { overflow-x: auto; }

/* ------------------------------------------------------------------ */
/* 响应式                                                              */
/* ------------------------------------------------------------------ */
@media (max-width: 760px) {
  .site-header .container { height: 56px; }
  .brand { font-size: 15px; }
  .site-nav a, .site-nav .nav-btn { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 40px 0 54px; }
  .hero-stats { gap: 22px; }
  .how-it-works .grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .toolbar { top: 56px; }
  .prompt-body pre { font-size: 13px; max-height: 260px; }
  .prompt-tail { flex-direction: column; align-items: flex-start; }
  .prompt-head { padding: 15px 16px 10px; }
  .prompt-body { padding: 2px 16px 12px; }
  .prompt-tail { padding: 12px 16px; }
  .copy-btn { right: 24px; bottom: 20px; }
  .footer-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
