/* Marketer — Multi-Profession Marketing Generator */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface2: #f1f3f5;
  --border: #dee2e6;
  --text: #212529;
  --text2: #6c757d;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

body.dark {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #252836;
  --border: #2e3147;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: #1e3a5f;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -0.3px; }
.logo span { color: var(--text2); font-weight: 400; font-size: 13px; margin-left: 6px; }

.header-actions { display: flex; gap: 8px; align-items: center; }

main { padding: 32px 0 80px; }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .step {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Form ── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

select, input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}

select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 580px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-group .hint { font-size: 12px; color: var(--text2); }

/* ── Profession Preview ── */
#profPreview {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
  font-size: 13px;
}

#profPreview.hidden { display: none; }

.preview-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.preview-header .emoji { font-size: 24px; }
.preview-header .name { font-weight: 700; font-size: 15px; color: var(--accent); }
.preview-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preview-item label { font-weight: 600; color: var(--text2); display: block; margin-bottom: 2px; }
.preview-item span { color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); width: 100%; justify-content: center; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ── Generate Button Area ── */
.generate-area { text-align: center; margin-top: 8px; }

/* ── Output Section ── */
#outputSection.hidden { display: none; }

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

#outputTitle { font-size: 22px; font-weight: 700; }

.output-actions { display: flex; gap: 8px; }

/* ── Section Tabs ── */
#sectionTabs { display: flex; gap: 8px; margin-bottom: 16px; }

.section-tab {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.section-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.section-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ── Content Tabs ── */
#contentTabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.content-tab {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.content-tab.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.content-tab:hover:not(.active) { background: var(--surface2); color: var(--text); }

/* ── Content Output ── */
#contentOutput {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.content-header h3 { font-size: 15px; font-weight: 700; }

.copy-btn {
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.copy-btn:hover { background: var(--accent-hover); }

.content-text {
  padding: 20px;
  font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  max-height: 600px;
  overflow-y: auto;
}

/* ── Misc ── */
.hidden { display: none !important; }

.divider { height: 1px; background: var(--border); margin: 24px 0; }

footer {
  text-align: center;
  color: var(--text2);
  font-size: 13px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ── Scrollbar ── */
.content-text::-webkit-scrollbar { width: 6px; }
.content-text::-webkit-scrollbar-track { background: var(--surface2); }
.content-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .output-header { flex-direction: column; align-items: flex-start; }
  #contentTabs { gap: 4px; }
  .content-tab { padding: 6px 10px; font-size: 12px; }
  .content-text { font-size: 12px; padding: 14px; max-height: 400px; }
  .preview-meta { grid-template-columns: 1fr; }
}
