/* ToolPilot - Shared Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #dbeafe;
  --bg: #f8fafc; --surface: #ffffff; --text: #0f172a; --text-muted: #64748b;
  --border: #e2e8f0; --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --green: #16a34a; --red: #dc2626; --yellow: #ca8a04;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-logo { font-weight: 800; font-size: 1.2rem; color: var(--primary); }
.nav-logo span { color: var(--text); }
.nav-links { display: flex; gap: 20px; font-size: 0.9rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.tool-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 32px 0; }
.tool-main { min-width: 0; }
.tool-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* TOOL HEADER */
.tool-header { margin-bottom: 24px; }
.tool-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; line-height: 1.2; }
.tool-header p { color: var(--text-muted); font-size: 1rem; }
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* CARDS */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: space-between; }

/* FORM ELEMENTS */
textarea, input[type="text"], input[type="number"], select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; transition: border-color 0.2s; background: var(--surface);
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 160px; }
textarea.code { font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace; font-size: 0.85rem; tab-size: 2; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: #374151; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* AD SLOTS */
.ad-slot { background: #f1f5f9; border: 1px dashed var(--border); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.8rem; min-height: 100px; display: flex; align-items: center; justify-content: center; }
.ad-slot-horizontal { min-height: 90px; margin: 24px 0; }
.ad-slot-sidebar { min-height: 250px; }

/* RELATED TOOLS */
.related-tools h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; }
.related-link { display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; color: var(--text); transition: background 0.15s; font-weight: 500; }
.related-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }

/* SEO CONTENT SECTION */
.seo-content { margin-top: 40px; padding: 32px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.seo-content h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; margin-top: 24px; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content p { color: var(--text-muted); margin-bottom: 12px; font-size: 0.95rem; }

/* FOOTER */
.footer { margin-top: 60px; padding: 32px 0; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.8rem; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 8px; }

/* OUTPUT */
.output-area { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 16px; min-height: 100px; font-family: 'SF Mono', monospace; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; position: relative; overflow: auto; max-height: 400px; }
.copy-btn { position: absolute; top: 8px; right: 8px; }
.status { padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; margin-top: 8px; }
.status-success { background: #dcfce7; color: var(--green); }
.status-error { background: #fee2e2; color: var(--red); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { order: -1; }
  .nav-links { display: none; }
}
