@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@700;800&display=swap');

/* ── AI Tool Root ──────────────────────────────────────────── */
.mtk-ai-root {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	box-shadow: 0 4px 32px rgba(99,102,241,.09);
	padding: 28px;
	margin: 24px auto;
	max-width: 100%;
	position: relative;
	font-family: 'Nunito', sans-serif;
	color: #1e293b;
	overflow: hidden;
}
.mtk-ai-root::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; height: 5px;
	border-radius: 20px 20px 0 0;
}
.mtk-ai-root.fantasy::before  { background: linear-gradient(90deg,#8b5cf6,#6366f1,#a855f7); }
.mtk-ai-root.business::before { background: linear-gradient(90deg,#0ea5e9,#06b6d4,#6366f1); }
.mtk-ai-root.dnd::before      { background: linear-gradient(90deg,#dc2626,#9f1239,#7c3aed); }

/* ── Title ────────────────────────────────────────────────── */
.mtk-ai-title {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(18px, 2.5vw, 26px);
	font-weight: 800;
	text-align: center;
	margin: 6px 0 22px;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}
.fantasy  .mtk-ai-title { background-image: linear-gradient(135deg,#8b5cf6,#ec4899); }
.business .mtk-ai-title { background-image: linear-gradient(135deg,#0ea5e9,#6366f1); }
.dnd      .mtk-ai-title { background-image: linear-gradient(135deg,#dc2626,#7c3aed); }

/* ── Controls ─────────────────────────────────────────────── */
.mtk-ai-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px;
	margin-bottom: 22px;
}
.mtk-ai-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 160px; }
.mtk-ai-field-full { flex-basis: 100%; min-width: 100%; }
.mtk-ai-field-btn  { flex: 0 0 auto; justify-content: flex-end; }
.mtk-ai-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #64748b; }

.mtk-ai-input,
.mtk-ai-select,
.mtk-ai-textarea {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	color: #1e293b;
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 12px;
	transition: border-color .15s, box-shadow .15s;
	width: 100%;
	box-sizing: border-box;
}
.mtk-ai-textarea { resize: vertical; min-height: 72px; }
.mtk-ai-input:focus, .mtk-ai-select:focus, .mtk-ai-textarea:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

/* Toggle pill group */
.mtk-pill-group { display: flex; gap: 0; border: 1.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; }
.mtk-pill { flex: 1; background: none; border: none; border-right: 1.5px solid #e2e8f0; color: #64748b; cursor: pointer; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700; padding: 9px 8px; transition: background .15s, color .15s; }
.mtk-pill:last-child { border-right: none; }
.fantasy  .mtk-pill.active { background: linear-gradient(135deg,#8b5cf6,#a855f7); color: #fff; }
.business .mtk-pill.active { background: linear-gradient(135deg,#0ea5e9,#06b6d4); color: #fff; }
.dnd      .mtk-pill.active { background: linear-gradient(135deg,#dc2626,#9f1239); color: #fff; }
.mtk-pill:hover:not(.active) { background: #f1f5f9; }

/* Count stepper */
.mtk-count-wrap { display: flex; align-items: center; border: 1.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; }
.mtk-count-btn { background: none; border: none; color: #6366f1; cursor: pointer; font-size: 20px; font-weight: 700; line-height: 1; padding: 6px 13px; transition: background .12s; }
.mtk-count-btn:hover { background: #ede9fe; }
.mtk-count-input { flex: 1; background: none; border: none; border-left: 1.5px solid #e2e8f0; border-right: 1.5px solid #e2e8f0; color: #1e293b; font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 800; padding: 6px 0; text-align: center; width: 44px; -moz-appearance: textfield; }
.mtk-count-input::-webkit-inner-spin-button, .mtk-count-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.mtk-count-input:focus { outline: none; }

/* Generate button */
.mtk-gen-btn {
	border: none;
	border-radius: 50px;
	color: #fff;
	cursor: pointer;
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 28px;
	transition: transform .15s, box-shadow .15s;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.fantasy  .mtk-gen-btn { background: linear-gradient(135deg,#8b5cf6,#a855f7); box-shadow: 0 4px 16px rgba(139,92,246,.32); }
.business .mtk-gen-btn { background: linear-gradient(135deg,#0ea5e9,#06b6d4); box-shadow: 0 4px 16px rgba(14,165,233,.32); }
.dnd      .mtk-gen-btn { background: linear-gradient(135deg,#dc2626,#7c3aed); box-shadow: 0 4px 16px rgba(220,38,38,.32); }
.mtk-gen-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.38); }
.mtk-gen-btn:active { transform: translateY(0); }
.mtk-gen-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Spinner */
.mtk-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: mtk-spin .7s linear infinite; }
@keyframes mtk-spin { to { transform: rotate(360deg); } }

/* ── Results ──────────────────────────────────────────────── */
.mtk-results-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}
.mtk-results-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #64748b; }
.mtk-copy-all-btn {
	background: #f1f5f9;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	color: #475569;
	cursor: pointer;
	font-family: 'Nunito', sans-serif;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 14px;
	transition: background .15s, border-color .15s, color .15s;
}
.mtk-copy-all-btn:hover  { background: #ede9fe; border-color: #6366f1; color: #6366f1; }
.mtk-copy-all-btn.copied { background: #d1fae5; border-color: #10b981; color: #065f46; }

.mtk-names-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 10px; }
.mtk-name-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 11px 14px;
	animation: mtk-fadeup .2s ease both;
}
.mtk-name-item:hover { border-color: #c4b5fd; background: #faf5ff; }
@keyframes mtk-fadeup { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.mtk-name-num  { font-size: 11px; font-weight: 800; color: #94a3b8; min-width: 20px; }
.mtk-name-text { flex: 1; font-size: 15px; font-weight: 800; color: #1e293b; }
.mtk-name-sub  { font-size: 11px; color: #94a3b8; font-weight: 600; }
.mtk-name-copy-btn { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 3px 5px; border-radius: 5px; transition: color .12s, background .12s; flex-shrink: 0; }
.mtk-name-copy-btn:hover  { color: #6366f1; background: #ede9fe; }
.mtk-name-copy-btn.copied { color: #10b981; }

/* ── Empty / Loading states ───────────────────────────────── */
.mtk-empty-state { text-align: center; padding: 44px 20px; color: #94a3b8; }
.mtk-empty-icon  { font-size: 48px; display: block; margin-bottom: 12px; }
.mtk-empty-state p { font-size: 15px; font-weight: 600; margin: 0; }
.mtk-loading { text-align: center; padding: 44px 20px; }
.mtk-loading p { color: #6366f1; font-weight: 700; font-size: 15px; margin: 12px 0 0; }
.mtk-loading-dots { display: inline-flex; gap: 6px; }
.mtk-loading-dots span { width: 8px; height: 8px; background: #a855f7; border-radius: 50%; animation: mtk-bounce .6s infinite alternate; }
.mtk-loading-dots span:nth-child(2) { animation-delay: .2s; }
.mtk-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes mtk-bounce { from { transform: translateY(0); opacity:.4; } to { transform: translateY(-8px); opacity:1; } }

/* Error */
.mtk-error { background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 10px; padding: 14px 18px; color: #991b1b; font-size: 14px; font-weight: 600; margin-top: 12px; }
.mtk-error a { color: #7c3aed; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
	.mtk-ai-root { padding: 16px 12px; }
	.mtk-ai-controls { padding: 12px; gap: 10px; }
	.mtk-ai-field { min-width: 100%; }
	.mtk-ai-field-btn { width: 100%; }
	.mtk-gen-btn { width: 100%; justify-content: center; }
	.mtk-names-list { grid-template-columns: 1fr; }
}
