/* 工具子页共用：渐变背景 + 白卡片（与短链/二维码等页风格一致） */
/* 与全站 style.css 解耦：避免未加载 :root 变量时 calc 失效导致内容被 fixed 顶栏挡住 */
html {
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
}

.tool-standalone-main {
  min-height: 100vh;
  /* 双回退：先读全站变量，再读本文件 html 默认值 */
  padding: calc(var(--header-height, 64px) + 24px) 20px 48px;
}

.tool-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* 与 style.css 中 .tool-blog-links 配套；独立工具页可仅引用本文件时仍有基础间距 */
.tool-blog-links {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.tool-back {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  margin-bottom: 18px;
  opacity: 0.92;
  font-size: 0.95rem;
}

.tool-back:hover {
  opacity: 1;
}

.tool-hero {
  text-align: center;
  color: #fff;
  margin-bottom: 22px;
}

.tool-hero h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tool-hero p {
  font-size: 0.98rem;
  opacity: 0.92;
  line-height: 1.55;
}

.tool-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  /* 全站 body 常为浅色字（暗色主题变量）；白卡片内强制深色正文，避免 IP 等浅灰字贴在浅底上看不见 */
  color: #111827;
}

.t-field {
  margin-bottom: 18px;
}

.t-field label,
.t-field > span.t-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

.t-input,
.t-textarea,
.t-select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.t-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.t-input:focus,
.t-textarea:focus,
.t-select:focus {
  outline: none;
  border-color: #667eea;
}

.t-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.t-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.t-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.t-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45);
}

.t-btn-secondary {
  background: #e8eaf6;
  color: #333;
}

.t-btn-secondary:hover:not(:disabled) {
  background: #d8dcf0;
}

.t-out {
  margin-top: 16px;
  padding: 14px;
  background: #eef2ff;
  color: #0f172a;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid #c7d2fe;
}

.t-hint {
  font-size: 13px;
  color: #475569;
  margin-top: 10px;
  line-height: 1.5;
}

.t-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
  margin-right: 14px;
  margin-bottom: 6px;
}

.t-check input {
  width: 18px;
  height: 18px;
}
