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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #f0f4f8;
  color: #1f2933;
  line-height: 1.6;
}

.site-header {
  background: linear-gradient(135deg, #1e5aa8 0%, #2f7bd1 100%);
  color: #fff;
  text-align: center;
  padding: 28px 16px 22px;
}
.site-header h1 { font-size: 26px; letter-spacing: 6px; }
.site-header .subtitle { margin-top: 6px; font-size: 15px; opacity: .92; letter-spacing: 2px; }
.site-header .version { font-size: 12px; opacity: .75; letter-spacing: 0; }

main { max-width: 1080px; margin: 20px auto 40px; padding: 0 16px; }

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 40, 80, .08);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h2 { font-size: 17px; color: #1e5aa8; margin-bottom: 12px; }
.card-title-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.card-title-row h2 { margin-bottom: 0; }

.tips { padding-left: 20px; font-size: 14px; color: #3e4c59; }
.tips li { margin-bottom: 6px; }

#inputArea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
  overflow: auto;
}
#inputArea:focus { outline: 2px solid #2f7bd1; outline-offset: -1px; border-color: transparent; }

.action-row { margin-top: 14px; text-align: center; }

.btn {
  border: none; border-radius: 8px; cursor: pointer;
  font-size: 15px; padding: 10px 28px;
  font-family: inherit;
  transition: background .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: #1e5aa8; color: #fff; font-size: 17px; letter-spacing: 6px;
  padding: 12px 46px;
}
.btn-primary:hover { background: #174a8c; }
.btn-plain {
  background: #eef2f7; color: #1e5aa8; border: 1px solid #c4d3e8;
  font-size: 14px; padding: 7px 16px; margin-left: 8px;
}
.btn-plain:hover { background: #dfe9f5; }

.error-panel {
  margin-top: 14px;
  border: 1px solid #f5c2c7;
  background: #fdf2f3;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #b02a37;
  max-height: 220px;
  overflow: auto;
}
.error-panel .error-title { font-weight: bold; margin-bottom: 6px; }
.error-panel ul { padding-left: 18px; }
.error-panel li { margin-bottom: 4px; }
.error-panel .line-content {
  font-family: Consolas, monospace;
  background: #fbe3e5;
  padding: 0 4px;
  border-radius: 4px;
  word-break: break-all;
}
.hidden { display: none; }

.result-summary { font-size: 14px; color: #52606d; margin-bottom: 10px; }
.result-summary strong { color: #1e5aa8; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  border: 1px solid #d9e2ec;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}
thead th { background: #eaf1f9; color: #1e5aa8; font-weight: 600; }
tbody tr:nth-child(even) { background: #f7fafc; }
tbody tr:hover { background: #eef4fb; }
.empty-row td { color: #9aa5b1; padding: 26px 0; }

.site-footer {
  text-align: center; font-size: 12px; color: #9aa5b1;
  padding: 18px 0 30px;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  main { margin: 0; max-width: none; }
  .card { box-shadow: none; border: none; padding: 0; }
  th, td { border: 1px solid #000; }
}
