/* HuntPDF — shared tool page styles */
:root {
  --brand: #E53E3E;
  --brand-dark: #B91C1C;
  --brand-soft: #FEE7E7;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #0A0A0A;
  --text-2: #3A3A38;
  --text-3: #6A6A66;
  --border: rgba(0,0,0,0.12);
  --r-md: 12px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }

/* Centered content column for all tool/sub pages (header stays full-width).
   Everything between the header and footer sits in a comfortable centered
   column with generous space on all four sides. */
.hp-header ~ section,
.hp-header ~ div,
.hp-header ~ main,
.hp-header ~ form {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
/* top & bottom breathing room — first block after header, last before footer */
.hp-header ~ section:first-of-type { margin-top: 56px; }
.tool-footer { margin-top: 64px; }

@media (max-width: 700px) {
  .hp-header ~ section,
  .hp-header ~ div,
  .hp-header ~ main,
  .hp-header ~ form { padding-left: 14px; padding-right: 14px; }
  .hp-header ~ section:first-of-type { margin-top: 28px; }
  .tool-footer { margin-top: 36px; }
}

.container { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* Top bar (simple, links back to home) */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 1240px; margin: 0 auto; border-bottom: 1px solid var(--border); }
.topbar .brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.topbar .brand img { height: 28px; width: auto; }
.topbar .brand strong { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.topbar .back { font-size: 14px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.topbar .back:hover { color: var(--brand); }

/* Hero / heading */
.tool-hero { text-align: center; padding: 40px 20px 20px; }
.tool-hero h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 700; letter-spacing: -1px; margin: 0 0 10px; }
.tool-hero p { color: var(--text-2); font-size: 16px; margin: 0; max-width: 560px; margin: 0 auto; line-height: 1.5; }

/* Drop zone */
.dropzone {
  margin: 30px auto;
  max-width: 720px;
  border: 2px dashed var(--border);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--brand); background: #FFF5F5; }
.dropzone .icon { font-size: 44px; line-height: 1; margin-bottom: 12px; color: var(--brand); }
.dropzone h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.dropzone p { margin: 0; color: var(--text-3); font-size: 14px; }
.dropzone input[type=file] { display: none; }

/* File list */
.file-list { max-width: 720px; margin: 16px auto 0; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 8px; font-size: 14px; }
.file-item .name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .size { color: var(--text-3); font-size: 12px; }
.file-item .remove { background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 18px; padding: 0 4px; }
.file-item .remove:hover { color: var(--brand); }

/* Action button */
.actions { text-align: center; margin: 24px 0 40px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(229, 62, 62, .3);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(229,62,62,.4); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
}
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* Options panel */
.options { max-width: 720px; margin: 0 auto; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 16px; }
.options label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-2); font-size: 14px; }
.options input[type=text], .options select, .options textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px; background: var(--bg); color: var(--text);
}
.options input:focus, .options select:focus, .options textarea:focus { outline: 0; border-color: var(--brand); }

/* Status */
.status { text-align: center; margin: 20px 0; font-size: 14px; }
.status.ok { color: #047857; }
.status.err { color: #B91C1C; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #ddd; border-top-color: var(--brand); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result box */
.result { max-width: 540px; margin: 30px auto; padding: 36px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); text-align: center; display: none; box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
.result.show { display: block; }
.result .ok-icon { font-size: 38px; color: #10B981; margin-bottom: 10px; }
.result .result-icon {
  width: 76px; height: 76px; margin: 0 auto 16px;
  background: #ECFDF5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.result h3 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }
.result p { color: var(--text-3); font-size: 13.5px; margin: 0 0 22px; }
.result a.download {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--brand); color: #fff; width: 100%; max-width: 320px;
  padding: 15px 24px; border-radius: 12px; text-decoration: none;
  font-weight: 600; font-size: 16px;
  box-shadow: 0 6px 18px rgba(229,62,62,.32);
  transition: background .15s, transform .15s;
}
.result a.download:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* Share row */
.result .share-row {
  display: flex; gap: 10px; margin: 18px auto 0; max-width: 360px;
}
.result .share-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text-2); cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  transition: all .15s;
}
.result .share-btn svg { display: block; }
.result .share-btn:hover { transform: translateY(-2px); }
.result .share-btn.wa:hover { border-color: #25D366; color: #25D366; background: #F0FFF4; }
.result .share-btn.em:hover { border-color: #4285F4; color: #4285F4; background: #EFF5FF; }
.result .share-btn.cp:hover { border-color: var(--brand); color: var(--brand); background: #FFF5F5; }
.result .share-btn.copied { border-color: #10B981; color: #10B981; background: #ECFDF5; }

.result .result-again {
  margin-top: 22px; background: none; border: 0; color: var(--text-3);
  font-family: inherit; font-size: 13px; cursor: pointer; text-decoration: underline;
}
.result .result-again:hover { color: var(--brand); }
.result pre { text-align: left; background: var(--bg); border: 1px solid var(--border); padding: 16px; border-radius: 8px; max-height: 400px; overflow: auto; font-size: 13px; }

/* Footer */
footer.tool-footer { text-align: center; padding: 8px 20px; color: #000000; font-size: 11px; border-top: 1px solid var(--border); margin-top: 16px; background: #FFFFFF; }
footer.tool-footer a { color: #000000; margin: 0 7px; text-decoration: none; }
footer.tool-footer a:hover { color: var(--brand); }
footer.tool-footer br { display: none; }
footer.tool-footer a::after { content: "·"; margin-left: 7px; color: var(--border); }
footer.tool-footer a:last-of-type::after { content: ""; }

@media (max-width: 600px) {
  .dropzone { padding: 36px 16px; }
  .tool-hero { padding: 24px 16px 16px; }
}
