:root {
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  --page-bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #d8dee8;
  --primary: #0878ed;
  --primary-hover: #0068d3;
  --primary-soft: #eaf3ff;
  --success: #138a43;
  --success-soft: #ecf9f1;
  --danger: #c9362b;
  --danger-soft: #fff1ef;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(8, 120, 237, 0.08), transparent 36rem),
    var(--page-bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.tool-card {
  width: min(100%, 440px);
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid rgba(216, 222, 232, 0.8);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(22px, 5vw, 26px);
  line-height: 1.35;
  text-align: center;
}

.field-group {
  margin-bottom: 16px;
}

.field-group label:not(.file-picker) {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 120, 237, 0.13);
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  color: #315273;
  background: #f8fafc;
  border: 1px dashed #9cafc3;
  border-radius: 6px;
  cursor: pointer;
}

.file-picker:hover,
input[type="file"]:focus + .file-picker {
  color: var(--primary);
  border-color: var(--primary);
}

.primary-button {
  width: 100%;
  min-height: 43px;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  color: #f8fafc;
  background: #aeb8c5;
  cursor: wait;
}

body[data-site="zc"] .primary-button {
  background: #28a745;
}

body[data-site="zc"] .primary-button:hover:not(:disabled) {
  background: #218838;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #a9d9bc;
  border-radius: 6px;
  color: #0b6830;
  background: var(--success-soft);
  font-size: 14px;
  line-height: 1.6;
}

.status.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #efb5ae;
}

@media (max-width: 480px) {
  .page-shell {
    align-items: flex-start;
    padding: 18px 12px;
  }

  .tool-card {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
