:root {
  --bg: #0c1021;
  --surface: #141a2e;
  --surface-2: #1b2340;
  --border: hsla(0, 0%, 100%, 0.08);
  --tx: #e2e6f0;
  --tx2: #7e8ba4;
  --accent: #6c8cff;
  --accent2: #4f6ef0;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

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

body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(108, 140, 255, 0.18), transparent 60%),
    radial-gradient(700px 360px at 90% 0%, rgba(52, 211, 153, 0.1), transparent 55%),
    var(--bg);
  color: var(--tx);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
}

.brand-label {
  font-size: 12px;
  color: var(--tx2);
}

.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.hero {
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-sub {
  color: var(--tx2);
  font-size: 15px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 16px;
}

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

.field-row {
  display: flex;
  gap: 10px;
}

.input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--tx);
  font-size: 15px;
  letter-spacing: 0.04em;
  outline: none;
}

.input:focus {
  border-color: rgba(108, 140, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15);
}

.btn {
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #fff;
}

.btn-warn {
  background: linear-gradient(180deg, #f0b429, #d97706);
  color: #1a1205;
}

.btn-ghost {
  background: transparent;
  color: var(--tx2);
  border: 1px solid var(--border);
}

.form-error,
.action-msg,
.reset-hint {
  margin-top: 12px;
  font-size: 13px;
}

.form-error {
  color: var(--red);
}

.action-msg {
  color: var(--green);
}

.reset-hint {
  color: var(--tx2);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.result-head h2 {
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(126, 139, 164, 0.15);
  color: var(--tx2);
}

.badge.active {
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
}

.badge.warn {
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
}

.badge.danger {
  background: rgba(248, 113, 113, 0.14);
  color: var(--red);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.meta-grid dt {
  font-size: 12px;
  color: var(--tx2);
  margin-bottom: 2px;
}

.meta-grid dd {
  font-size: 14px;
  word-break: break-all;
}

.reset-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.reset-tip {
  font-size: 14px;
  color: var(--tx2);
  margin-bottom: 14px;
}

.reset-tip strong {
  color: var(--amber);
}

.confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.confirm-dialog {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  animation: pop 0.18s ease;
}

.confirm-dialog h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.confirm-dialog p {
  color: var(--tx2);
  font-size: 14px;
  margin-bottom: 18px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 24px;
  }

  .field-row {
    flex-direction: column;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
