/* ═══════════════════════════════════════════════════════════════
   三苹米片场工具 · launcher（tools.spmstudio.cn）样式
   家族暗色皮肤：#0b0b0c 底 + #e6a23c 橙（与提词器家族一致）
   列表卡类名沿用主站 .tool-card 结构，样式在本页独立成套
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0b0c;
  --panel: #101012;
  --panel2: #17171a;
  --line: rgba(255, 255, 255, 0.09);
  --txt: #eceae4;
  --dim: #8f8d84;
  --accent: #e6a23c;
}

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

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- 视图切换器（hero 副题下方，居中） ---------- */
.tl-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  margin: 26px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tl-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.tl-seg button svg { width: 14px; height: 14px; }

.tl-seg button.on {
  background: var(--panel2);
  color: var(--txt);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- hero ---------- */
.tl-hero {
  text-align: center;
  padding: clamp(44px, 9vh, 80px) 20px clamp(22px, 4vh, 36px);
}

.tl-logo {
  display: block;
  height: clamp(36px, 5vw, 48px);
  width: auto;
  margin: 0 auto 26px;
}

.tl-kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 14px;
}

.tl-hero h1 {
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.tl-hero p {
  margin: 14px auto 0;
  max-width: 460px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.9;
}

/* ---------- 列表视图（沿用主站 .tool-card 结构） ---------- */
.tl-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 28px) clamp(20px, 3vh, 36px);
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.tool-card:hover {
  border-color: rgba(230, 162, 60, 0.55);
  transform: translateY(-1px);
}

.tool-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(230, 162, 60, 0.08);
  border-radius: 12px;
}

.tool-icon svg { width: 26px; height: 26px; }

.tool-body { flex: 1; min-width: 0; }

.tool-body strong .nm { white-space: nowrap; }

.tool-body strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tool-body em {
  display: block;
  font-style: normal;
  color: var(--dim);
  font-size: 13.5px;
  margin-top: 6px;
}

.ver-badge, .beta-badge {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(230, 162, 60, 0.1);
  border: 1px solid rgba(230, 162, 60, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 2px;
  white-space: nowrap;
}

.tool-open {
  flex: none;
  color: var(--dim);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.tool-card:hover .tool-open { color: var(--accent); }

/* ---------- APP 图标网格视图 ---------- */
.tl-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 18px 10px;
  padding-top: 8px;
}

.tl-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: 16px;
  transition: transform 0.18s ease;
}

.tl-app:hover { transform: translateY(-2px); }
.tl-app:hover .tl-app-icon { border-color: rgba(230, 162, 60, 0.55); }

.tl-app-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: border-color 0.18s ease;
}

.tl-app-icon svg { width: 38px; height: 38px; }

.tl-app-name {
  font-size: 16px;
  letter-spacing: 0.03em;
}

.tl-app-ver {
  font-style: normal;
  font-size: 11.5px;
  color: var(--dim);
  margin-top: -4px;
}

.tl-app-soon { opacity: 0.45; }
.tl-app-soon .tl-app-icon { border-style: dashed; box-shadow: none; }

/* ---------- 分组头（轻量化本地运行小工具）+ 平台徽章 ----------
   列表视图是块流、网格视图是 grid：.tl-apps 下组头跨整行 */
.tool-cat {
  margin: 20px 2px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tool-cat strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--txt);
}
.tool-cat strong::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(230, 162, 60, .45);
  flex: none;
}
.tool-cat span { font-size: 12px; color: var(--dim); }
.tl-apps .tool-cat { grid-column: 1 / -1; margin: 10px 2px 4px; }
.plat-badge {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 2px;
  white-space: nowrap;
}

/* ---------- 视图切换过渡 ---------- */
.tl-swap { animation: tlSwap 0.22s ease; }

@keyframes tlSwap {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tl-swap { animation: none; }
  .tool-card, .tl-app, .tl-app-icon, .tl-seg button, .tl-foot-btn, .wx-overlay, .wx-card, .tl-toast { transition: none; }
}

/* ---------- 打赏钮：页面顶部右侧普通按钮 ---------- */
.tl-tip-row {
  display: flex;
  justify-content: flex-end;
  padding: 14px clamp(16px, 4vw, 28px) 0;
}

/* ---------- 工作室简介（Kevin 文案）：咖啡钮之下、联系按钮之上 ---------- */
.tl-intro {
  max-width: 640px;
  margin: 20px auto 24px;
  color: var(--dim);
  font-size: 13px;
  line-height: 2.1;
  text-align: center;
}

.tl-intro-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(230, 162, 60, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tl-intro-link:hover { color: #f0b45a; text-decoration-color: #f0b45a; }
}

/* ---------- 操作行：分栏线以上（了解工作室 / 联系我） ---------- */
.tl-foot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 clamp(16px, 4vw, 28px) clamp(26px, 4vh, 36px);
}

/* 按钮基础样式（咖啡钮用：正常大小与亮度） */
.tl-foot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

/* 操作行两颗（了解工作室/联系我）：小一号、更低调 */
.tl-foot-actions .tl-foot-btn {
  padding: 8px 16px;
  border-radius: 11px;
  border-color: rgba(255, 255, 255, 0.07);
  background: var(--panel2);
  color: #c9c7bf;
  font-size: 13px;
}

@media (hover: hover) and (pointer: fine) {
  .tl-foot-btn:hover { border-color: var(--accent); color: var(--accent); }
}

/* ---------- 页脚（分栏线以下：版权 + 备案） ---------- */
.tl-foot {
  border-top: 1px solid var(--line);
  padding: 18px 20px 22px;
  text-align: center;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 2;
}

.tl-foot a { color: var(--dim); margin: 0 8px; }
.tl-foot a:hover { color: var(--accent); }

/* ---------- 微信弹层（与主站同款交互，样式自带） ---------- */
.wx-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 8, 9, 0.74);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.wx-overlay[hidden] { display: none; }
.wx-overlay.show { opacity: 1; }

.wx-card {
  position: relative;
  width: min(330px, 88vw);
  background: #ffffff;
  color: #1c1c1e;
  border-radius: 16px;
  padding: 20px 20px 18px;
  text-align: center;
  transform: translateY(10px) scale(0.96);
  transition: transform 0.26s ease;
}

.wx-overlay.show .wx-card { transform: none; }
.wx-qr { width: 100%; display: block; border-radius: 8px; }
.wx-tip { margin-top: 13px; font-size: 12.5px; line-height: 1.7; color: #6b6b70; }
.wx-id { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14.5px; color: #1c1c1e; }
.wx-id strong { font-weight: 600; letter-spacing: 0.05em; }

.wx-copy {
  font-family: inherit;
  border: 1px solid #dcdce0;
  background: #f4f4f6;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: #1c1c1e;
  cursor: pointer;
}

.wx-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: #f0f0f3;
  color: #7a7a80;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .wx-copy:hover { background: #eaeaee; }
  .wx-close:hover { background: #e6e6ea; }
}

/* 复制成功轻提示 */
.tl-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(8px);
  z-index: 120;
  background: #1f1f23;
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 窄屏 ---------- */
@media (max-width: 480px) {
  .tl-seg button { padding: 6px 10px; font-size: 0; gap: 0; }
  .tl-seg button svg { width: 16px; height: 16px; }
  .tool-card { padding: 15px; gap: 12px; }
  .tool-open { display: none; }
  .tl-apps { grid-template-columns: repeat(4, 1fr); gap: 18px 6px; }
  .tl-app-icon { width: 68px; height: 68px; }
  .tl-app-icon svg { width: 34px; height: 34px; }
}
