:root {
  --bg0: #0f0a1a;
  --bg1: #1a1030;
  --card: rgba(36, 22, 64, 0.82);
  --line: rgba(232, 180, 255, 0.22);
  --text: #f7f0ff;
  --muted: #b9a4d6;
  --accent: #c084fc;
  --accent2: #f0abfc;
  --ok: #4ade80;
  --err: #fb7185;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(80, 20, 140, 0.35);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(192, 132, 252, 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(244, 114, 182, 0.18), transparent 50%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #120820);
  letter-spacing: 0;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}
.hero .mark {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(240, 171, 252, 0.45));
}
.hero h1 {
  margin: 10px 0 6px;
  font-size: 28px;
  font-weight: 700;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

input, textarea, select, button {
  font: inherit;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(12, 8, 22, 0.65);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.18);
}
textarea { min-height: 120px; resize: vertical; }

button, .btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #c084fc, #e879f9 55%, #f472b6);
  color: #1a0b2e;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
button:hover, .btn:hover { filter: brightness(1.05); }
button.secondary, .btn.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--line);
}
button.danger {
  background: rgba(251, 113, 133, 0.18);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.muted { color: var(--muted); font-size: 13px; }
.ok { color: var(--ok); }
.err { color: var(--err); }
.warn { color: var(--warn); }

.result {
  margin-top: 16px;
  display: none;
}
.result.show { display: block; }
.result .title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.content-box {
  background: rgba(8, 5, 16, 0.7);
  border: 1px dashed rgba(240, 171, 252, 0.35);
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.products {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.product {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(20, 12, 36, 0.55);
}
.product h3 { margin: 0 0 6px; font-size: 15px; }
.product p { margin: 0; color: var(--muted); font-size: 12px; min-height: 32px; }
.stock {
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.nav .links { display: flex; gap: 12px; font-size: 13px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}
.tab.active {
  background: rgba(192, 132, 252, 0.18);
  color: var(--text);
  border-color: rgba(192, 132, 252, 0.45);
}
.panel { display: none; }
.panel.active { display: block; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .grid2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: rgba(24, 14, 42, 0.95);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
  max-width: min(360px, calc(100% - 32px));
  display: none;
  z-index: 50;
}
.toast.show { display: block; }

.footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.api-block {
  background: rgba(8, 5, 16, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 16px;
}
