:root {
  --blue: #0b5fff;
  --blue-dark: #0847c4;
  --teal: #17c3b2;
  --ink: #0f172a;
  --muted: #5b6472;
  --bg: #f7f8fb;
  --card: #ffffff;
  --border: #e4e7ee;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

nav.site-nav { display: flex; gap: 20px; font-weight: 600; font-size: 0.95rem; }
nav.site-nav a { color: var(--muted); }
nav.site-nav a:hover { color: var(--blue); }

main { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }

.hero { text-align: center; padding: 40px 0 20px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 95, 255, 0.12);
  text-decoration: none;
}
.tool-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.4rem; margin-bottom: 14px;
}
.tool-card h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.05rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.tool-page-header { text-align: center; padding: 20px 0 8px; }
.tool-page-header h1 { font-size: 1.8rem; margin: 0 0 8px; }
.tool-page-header p { color: var(--muted); }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-top: 24px;
}
.dropzone.dragover { border-color: var(--blue); background: #eef4ff; }
.dropzone .icon { font-size: 2.4rem; margin-bottom: 12px; }
.dropzone h3 { margin: 0 0 6px; }
.dropzone p { color: var(--muted); margin: 0; }
.dropzone input[type="file"] { display: none; }

.file-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.file-row .file-icon { color: var(--blue); font-size: 1.3rem; }
.file-row .file-name { flex: 1; font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-remove { cursor: pointer; color: var(--muted); background: none; border: none; font-size: 1.1rem; }
.file-row .file-remove:hover { color: #dc2626; }

.actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  border: none; border-radius: 10px; padding: 13px 26px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: #f1f3f8; }

.status { margin-top: 18px; text-align: center; font-weight: 600; }
.status.error { color: #dc2626; }
.status.success { color: #16a34a; }

.result-box {
  margin-top: 24px; text-align: center; padding: 28px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}

.privacy-note {
  margin-top: 32px; text-align: center; color: var(--muted); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.field-row { display: flex; gap: 14px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.field {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input, .field select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; width: 120px;
}

.seo-content {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.95rem;
}
.seo-content h2 { color: var(--ink); font-size: 1.3rem; }

.ad-slot {
  margin: 28px auto; max-width: 728px; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  background: #eef1f6; border-radius: 10px; color: #9aa3b2; font-size: 0.85rem;
}

footer.site-footer {
  text-align: center; padding: 32px 24px; color: var(--muted); font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

canvas.sig-pad { border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; touch-action: none; width: 100%; max-width: 480px; height: 180px; display: block; margin: 20px auto 0; }
