:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #d9e2ef;
  --text: #1a2a40;
  --muted: #5a6c82;
  --brand: #0f3d91;
  --brand-2: #165dff;
  --ok: #167a46;
  --warn: #c97900;
  --error: #c3352b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}

body {
  background: linear-gradient(165deg, #edf3ff 0%, #f8faff 100%);
  color: var(--text);
}

.navbar {
  width: 100%;
  min-height: 60px;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(11, 33, 73, 0.25);
}

.site-title {
  font-size: 18px;
  font-weight: 700;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

.menu-btn {
  font-size: 22px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 6px;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-menu {
  position: absolute;
  right: 0;
  top: 60px;
  min-width: 180px;
  background: #0d3276;
  display: none;
  border-bottom-left-radius: 8px;
  overflow: hidden;
}

.nav-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--brand-2);
}

.nav-menu.show {
  display: block;
}

.container {
  max-width: 1260px;
  margin: 84px auto 24px;
  padding: 0 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(18, 38, 70, 0.07);
  padding: 16px;
}

.page-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.category {
  margin-top: 18px;
}

.category-title {
  font-size: 17px;
  margin-bottom: 10px;
  border-left: 4px solid var(--brand-2);
  padding-left: 8px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.tool-link {
  display: block;
  text-decoration: none;
  color: #18304f;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.18s;
}

.tool-link:hover {
  border-color: var(--brand-2);
  transform: translateY(-1px);
}

.tool-link .name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}

.tool-link .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.breadcrumb {
  margin-bottom: 10px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--brand-2);
  text-decoration: none;
}

.field-label {
  display: block;
  font-size: 14px;
  margin: 8px 0 5px;
  font-weight: 600;
  color: #2b3d59;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c9d5e5;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--brand-2);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.btn-row {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  border-radius: 7px;
  padding: 8px 13px;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
  background: var(--brand-2);
}

.btn:hover {
  opacity: 0.92;
}

.btn.secondary {
  background: #5b6b80;
}

.btn.warn {
  background: #d97706;
}

.info {
  min-height: 18px;
  font-size: 13px;
  margin-bottom: 8px;
  color: #405470;
}

.info.ok {
  color: var(--ok);
}

.info.warn {
  color: var(--warn);
}

.info.error {
  color: var(--error);
}

.output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 56px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f7ff;
  color: #244064;
}

.tag {
  display: inline-block;
  font-size: 12px;
  color: #0e4ac1;
  border: 1px solid #b9cff7;
  background: #ecf3ff;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

@media (max-width: 960px) {
  .row,
  .row3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    min-width: auto;
    background: none;
    border-radius: 0;
  }

  .nav-menu a {
    border: none;
    padding: 0 12px;
  }
}
