/* ===== SmartToolify shared styles ===== */
:root {
  --navy: #12355b;
  --blue: #1f6feb;
  --gold: #f4b400;
  --light: #f4f7fb;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d7e1ee;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 18px 40px rgba(18, 53, 91, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--light) 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { width: min(1000px, 92%); margin: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* Header */
header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.35rem; font-weight: 900; color: var(--navy); letter-spacing: -0.5px; }
.brand-icon {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white); display: grid; place-items: center; font-weight: 900; font-size: 1.25rem;
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.24);
}
nav { display: flex; gap: 18px; align-items: center; }
nav a { color: var(--muted); font-weight: 700; font-size: 0.95rem; }
nav a:hover { color: var(--blue); }

/* Breadcrumb / back link */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 0.92rem; margin: 22px 0 0; }
.back:hover { color: var(--blue); }

/* Hero */
.tool-hero { text-align: center; padding: 26px 0 18px; }
.tool-hero h1 { color: var(--navy); font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.12; letter-spacing: -1px; margin-bottom: 10px; }
.tool-hero p { color: var(--muted); font-size: 1.05rem; max-width: 680px; margin: 0 auto; }

/* Card */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow); padding: 26px; margin: 22px 0 36px;
}

/* Form elements */
label { display: block; color: var(--navy); font-weight: 800; margin-bottom: 8px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px;
  font-size: 1rem; color: var(--text); background: var(--white); outline: none;
  transition: 0.2s ease; font-family: inherit;
}
textarea { min-height: 180px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12); }
.field { margin-bottom: 18px; }
.hint { margin-top: 8px; color: var(--muted); font-size: 0.88rem; }

input[type="range"] { padding: 0; }
input[type="color"] { width: 52px; height: 46px; padding: 4px; cursor: pointer; }

/* Buttons */
.btn { border: none; border-radius: 14px; padding: 14px 20px; cursor: pointer; font-weight: 900; font-size: 1rem; transition: 0.2s ease; font-family: inherit; }
.btn-primary { color: var(--white); background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 12px 24px rgba(31, 111, 235, 0.22); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-light { color: var(--navy); background: var(--white); border: 1px solid var(--border); }
.btn-light:hover { border-color: var(--blue); color: var(--blue); background: #eef5ff; }
.btn-gold { color: var(--navy); background: #fff8df; border: 1px solid #f7df98; }
.btn-gold:hover { background: #fff1bd; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Upload / drop zone */
.drop {
  border: 2px dashed #9db4d0; background: #f8fbff; border-radius: 18px;
  padding: 34px 18px; text-align: center; cursor: pointer; transition: 0.2s ease; display: block;
}
.drop:hover { border-color: var(--blue); background: #eef5ff; }
.drop h2 { color: var(--navy); margin-bottom: 6px; font-size: 1.25rem; }
.drop p { color: var(--muted); }
.hidden-input { display: none; }

/* Result chips / stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 4px; }
.stat { background: #f8fbff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; }
.stat .num { color: var(--navy); font-size: 1.5rem; font-weight: 900; line-height: 1.2; }
.stat .lbl { color: var(--muted); font-size: 0.82rem; font-weight: 700; margin-top: 2px; }

/* Status */
.status { display: none; margin-top: 16px; padding: 13px 14px; border-radius: 14px; font-weight: 800; font-size: 0.95rem; }
.status.show { display: block; }
.status.success { color: var(--success); background: #ecfdf3; border: 1px solid #abefc6; }
.status.error { color: var(--danger); background: #fef3f2; border: 1px solid #fecdca; }
.status.info { color: #1d4ed8; background: #eef5ff; border: 1px solid #bfd7ff; }

/* Preview image */
.preview-img { max-width: 100%; border-radius: 14px; border: 1px solid var(--border); margin-top: 8px; }

/* SEO content */
.info { margin: 6px 0 36px; }
.info h2 { color: var(--navy); font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 22px 0 8px; }
.info p { color: var(--text); margin-bottom: 10px; max-width: 800px; }
.info ol, .info ul { color: var(--text); margin: 0 0 12px 20px; }
.info li { margin-bottom: 4px; }
.info .lead { color: var(--muted); font-size: 1.02rem; }

/* Footer */
footer { background: var(--white); border-top: 1px solid var(--border); padding: 24px 0; text-align: center; color: var(--muted); }
footer a { color: var(--blue); font-weight: 700; }

/* Responsive */
@media (max-width: 600px) {
  .header-inner { flex-direction: column; padding: 12px 0; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Shared two-column layout for tools that need it */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
