* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #c9b6f0 0%, #a5d6c4 100%);
  color: #333;
  padding: 24px 12px 60px;
}
.container { max-width: 880px; margin: 0 auto; }

.site-header { text-align: center; margin-bottom: 22px; }
.site-header h1 {
  font-size: 34px; font-weight: 800;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo { -webkit-text-fill-color: initial; filter: saturate(1.2); }
.disclaimer { color: #ef5da8; font-size: 13px; margin-top: 8px; }

.tabs {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 22px;
}
.tab {
  border: none; cursor: pointer;
  background: rgba(255,255,255,.7);
  padding: 11px 20px; border-radius: 30px;
  font-size: 15px; font-weight: 600; color: #6b5b95;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: .2s;
}
.tab:hover { background: #fff; }
.tab.active {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  color: #fff; box-shadow: 0 4px 14px rgba(139,92,246,.4);
}

.panel { display: none; animation: fade .25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.card {
  background: rgba(255,255,255,.92);
  border-radius: 18px; padding: 26px;
  box-shadow: 0 8px 30px rgba(90,60,150,.12);
  margin-bottom: 18px;
}
.section-title { font-size: 20px; color: #16a34a; margin-bottom: 18px; font-weight: 800; }
.section-title.success { text-align: center; color: #16a34a; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; color: #555; margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid #e2d9f3; border-radius: 12px; outline: none;
  transition: .2s; background: #fbfaff;
}
.field input:focus { border-color: #8b5cf6; background: #fff; }

.btn {
  cursor: pointer; border: none; border-radius: 12px;
  padding: 12px 22px; font-size: 15px; font-weight: 700; transition: .2s;
}
.btn.primary { background: linear-gradient(90deg, #8b5cf6, #ec4899); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(139,92,246,.4); }
.btn.ghost { background: #fff; color: #6b5b95; border: 1.5px solid #e2d9f3; }
.btn.ghost:hover { border-color: #8b5cf6; color: #8b5cf6; }
.btn.block { width: 100%; margin-top: 6px; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.hint { color: #999; font-size: 12px; margin-top: 12px; }

.empty {
  text-align: center; color: #7c6ba0; padding: 50px 20px;
  background: rgba(255,255,255,.6); border-radius: 18px; font-size: 15px;
}

/* 结果页 */
.usage-bar {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: rgba(220,252,231,.7); color: #15803d;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; margin-bottom: 16px;
}
.usage-bar b { color: #16a34a; }
.result-detail { background: #fbfbff; }
.result-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.result-item { flex: 1; min-width: 200px; color: #6b5b95; font-size: 15px; }
.result-item b { color: #7c3aed; margin-left: 6px; font-size: 16px; }
.result-item.big { font-size: 17px; }
.result-item.big b { color: #ec4899; font-size: 22px; }
.result-url {
  background: #f4f0fc; padding: 12px 14px; border-radius: 10px;
  font-size: 13px; color: #7c6ba0; word-break: break-all;
}
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }

/* 表格 */
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head .section-title { margin-bottom: 0; }
.gen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; white-space: nowrap; }
th { color: #6b5b95; font-weight: 700; background: #faf8ff; }
td .mono { font-family: monospace; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.on { background: #dcfce7; color: #15803d; }
.badge.off { background: #fee2e2; color: #b91c1c; }
.tbtn { cursor: pointer; border: none; background: none; color: #8b5cf6; font-weight: 700; margin-right: 8px; }
.tbtn.del { color: #ef4444; }

/* toast */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: #1f2937; color: #fff; padding: 10px 22px; border-radius: 30px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: .3s; z-index: 999; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #dc2626; }
.toast.ok { background: #16a34a; }

@media (max-width: 560px) {
  .gen-grid { grid-template-columns: 1fr; }
  .site-header h1 { font-size: 26px; }
}
