/* ============================================================
 * Gothic Font Generator – frontend stylesheet
 * Glassmorphism + neon gradients + dark/light theme
 * Scoped under .fmai-app to never leak.
 * ============================================================ */

.fmai-app,
.fmai-app *,
.fmai-app *::before,
.fmai-app *::after {
	box-sizing: border-box;
}

.fmai-app {
	--fmai-radius: 18px;
	--fmai-radius-sm: 12px;
	--fmai-radius-lg: 28px;
	--fmai-shadow-1: 0 4px 20px rgba(0,0,0,0.18);
	--fmai-shadow-2: 0 12px 40px rgba(0,0,0,0.22);
	--fmai-shadow-glow: 0 0 36px rgba(168,85,247,0.45);
	--fmai-grad: linear-gradient(135deg, #a855f7 0%, #6366f1 35%, #ec4899 100%);
	--fmai-grad-2: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 60%, #f43f5e 100%);
	--fmai-trans-fast: 160ms cubic-bezier(.4,0,.2,1);
	--fmai-trans-med: 280ms cubic-bezier(.4,0,.2,1);
	--fmai-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Inter", system-ui, sans-serif;

	position: relative;
	font-family: var(--fmai-font-ui);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: var(--fmai-text);
	width: 100%;
	margin: 0;
	padding: 0 0 80px;
	isolation: isolate;
}

/* Inner content rail — centers everything below the hero band. */
.fmai-app .fmai-toolbar,
.fmai-app .fmai-chips,
.fmai-app .fmai-grid,
.fmai-app .fmai-empty,
.fmai-app .fmai-load-more-wrap {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(16px, 4vw, 32px);
	padding-right: clamp(16px, 4vw, 32px);
	box-sizing: border-box;
}

/* ============= TOKENS (light theme) ============= */

.fmai-app {
	--fmai-bg:        #fafaff;
	--fmai-bg-2:      #f3f0ff;
	--fmai-surface:   rgba(255, 255, 255, 0.65);
	--fmai-surface-2: rgba(255, 255, 255, 0.85);
	--fmai-border:    rgba(15, 23, 42, 0.10);
	--fmai-border-strong: rgba(15, 23, 42, 0.18);
	--fmai-text:      #0f172a;
	--fmai-text-2:    rgba(15, 23, 42, 0.7);
	--fmai-text-3:    rgba(15, 23, 42, 0.5);
	--fmai-accent:    #7c3aed;
	--fmai-accent-2:  #db2777;
	--fmai-hover-text: #ffffff;
	--fmai-input-bg:  rgba(255, 255, 255, 0.7);
	--fmai-dot-color: rgba(15, 23, 42, 0.07);
	background:
		radial-gradient(ellipse at top left,  rgba(168, 85, 247, 0.12), transparent 50%),
		radial-gradient(ellipse at bottom right, rgba(236, 72, 153, 0.10), transparent 55%),
		linear-gradient(135deg, var(--fmai-bg) 0%, var(--fmai-bg-2) 100%);
}

/* ============= ANIMATED BG ============= */

.fmai-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}
.fmai-blob {
	position: absolute;
	width: 480px;
	height: 480px;
	border-radius: 50%;
	filter: blur(90px);
	opacity: 0.35;
	will-change: transform;
}
.fmai-blob-1 {
	background: radial-gradient(circle, #a855f7, transparent 70%);
	top: -120px; left: -120px;
	animation: fmai-float-1 18s ease-in-out infinite;
}
.fmai-blob-2 {
	background: radial-gradient(circle, #06b6d4, transparent 70%);
	bottom: -140px; right: -100px;
	animation: fmai-float-2 22s ease-in-out infinite;
}
.fmai-blob-3 {
	background: radial-gradient(circle, #ec4899, transparent 70%);
	top: 40%; left: 50%;
	transform: translate(-50%, -50%);
	animation: fmai-float-3 26s ease-in-out infinite;
	opacity: 0.2;
}
@keyframes fmai-float-1 {
	0%,100% { transform: translate(0,0) scale(1); }
	50%     { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes fmai-float-2 {
	0%,100% { transform: translate(0,0) scale(1); }
	50%     { transform: translate(-70px, -60px) scale(0.95); }
}
@keyframes fmai-float-3 {
	0%,100% { transform: translate(-50%,-50%) scale(1); }
	50%     { transform: translate(-40%,-60%) scale(1.15); }
}

/* ============= HERO (full-bleed band) ============= */

.fmai-hero {
	/* Override this from custom CSS to swap the image without editing the plugin:
	   .fmai-app .fmai-hero { --fmai-hero-bg: url(my-image.png); } */
	--fmai-hero-bg: url("https://devnom.site/wp-content/uploads/2026/05/tools-hero-2.png");

	position: relative;
	z-index: 1;
	width: 100%;
	margin: 0 0 44px;
	padding: clamp(64px, 10vw, 130px) clamp(20px, 5vw, 48px) clamp(48px, 7vw, 88px);
	box-sizing: border-box;
	text-align: center;
	overflow: hidden;
	isolation: isolate;
	background-image: var(--fmai-hero-bg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Layer 1 — Light wash overlay above the image. Keeps text readable
   regardless of what's in the photo and harmonizes it with the page tone. */
.fmai-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg,
			rgba(250, 250, 255, 0.55) 0%,
			rgba(250, 250, 255, 0.40) 35%,
			rgba(250, 250, 255, 0.65) 100%),
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168, 85, 247, 0.10), transparent 70%);
	-webkit-backdrop-filter: saturate(105%);
	        backdrop-filter: saturate(105%);
	pointer-events: none;
}

/* Hero inner — caps content width while the band stays full-bleed.
   Excludes the decoration layer which spans the full hero width. */
.fmai-hero > *:not(.fmai-hero-decor) {
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
	position: relative;
}

/* ============= HERO DECORATIONS ============= */
/* Sample-style chips floating around content + geometric accents.
   Pure decoration — sits between the bg layers (-1, -2) and content (1+). */

.fmai-hero-decor {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

/* Sample text chips — show off the product on the hero itself. */
.fmai-decor-chip {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	padding: 10px 16px;
	font-size: 18px;
	font-weight: 600;
	color: var(--fmai-text);
	/* More solid surface so chips read clearly against any image background. */
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	        backdrop-filter: blur(20px) saturate(180%);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.5) inset,
		0 8px 24px -8px rgba(15, 23, 42, 0.18),
		0 24px 50px -20px rgba(168, 85, 247, 0.40);
	opacity: 0.95;
	will-change: transform;
}

/* Six positioned chips — placed in a loose ring around the central content,
   far enough out to never collide with the title or input on common widths. */
.fmai-decor-chip--tl { top: 8%;  left: 6%;   --r: -8deg; animation: fmai-float-chip 11s ease-in-out infinite; }
.fmai-decor-chip--tr { top: 12%; right: 7%;  --r:  7deg; animation: fmai-float-chip 13s ease-in-out infinite -2s; }
.fmai-decor-chip--ml { top: 46%; left: 3%;   --r: -5deg; animation: fmai-float-chip 14s ease-in-out infinite -5s; }
.fmai-decor-chip--mr { top: 50%; right: 4%;  --r:  6deg; animation: fmai-float-chip 12s ease-in-out infinite -3s; }
.fmai-decor-chip--bl { bottom: 14%; left: 9%; --r:  4deg; animation: fmai-float-chip 15s ease-in-out infinite -7s; }
.fmai-decor-chip--br { bottom: 11%; right: 8%; --r: -6deg; animation: fmai-float-chip 13s ease-in-out infinite -1s; }

/* Single keyframe — uses the chip's --r for its base rotation so each chip
   keeps its own tilt while bobbing on a similar drift curve. */
@keyframes fmai-float-chip {
	0%, 100% { transform: translate3d(0, 0, 0)        rotate(var(--r, 0deg)); }
	33%      { transform: translate3d(8px, -14px, 0)  rotate(calc(var(--r, 0deg) + 2deg)); }
	66%      { transform: translate3d(-6px, 10px, 0)  rotate(calc(var(--r, 0deg) - 2deg)); }
}

/* Hide some chips on narrow screens so they never overlap the input card. */
@media (max-width: 1100px) {
	.fmai-decor-chip--ml,
	.fmai-decor-chip--mr { opacity: 0; visibility: hidden; }
}
@media (max-width: 760px) {
	.fmai-decor-chip { display: none; }
}

/* Sparkle accents — small twinkling stars near the title. */
.fmai-decor-sparkle {
	position: absolute;
	font-size: 18px;
	color: var(--fmai-accent);
	pointer-events: none;
	opacity: 0;
	filter: drop-shadow(0 0 6px currentColor);
}
.fmai-decor-sparkle--1 { top: 22%; left: 18%; animation: fmai-twinkle 4s ease-in-out infinite; animation-delay: 0.5s; }
.fmai-decor-sparkle--2 { top: 30%; right: 22%; font-size: 22px; color: var(--fmai-accent-2); animation: fmai-twinkle 5s ease-in-out infinite; animation-delay: 1.8s; }
.fmai-decor-sparkle--3 { bottom: 28%; left: 24%; font-size: 14px; animation: fmai-twinkle 4.5s ease-in-out infinite; animation-delay: 3s; }
@keyframes fmai-twinkle {
	0%, 100% { opacity: 0;    transform: scale(0.6) rotate(0deg); }
	50%      { opacity: 0.85; transform: scale(1)   rotate(45deg); }
}

.fmai-hero-title {
	font-size: clamp(34px, 6.4vw, 72px);
	font-weight: 800;
	letter-spacing: -0.03em;
	margin: 0 auto 18px;
	line-height: 1.02;
}
.fmai-hero-title .fmai-gradient-text {
	display: inline-block;
	padding: 0 0.04em;
}
.fmai-gradient-text {
	background: var(--fmai-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	background-size: 220% 220%;
	animation: fmai-shine 7s ease-in-out infinite;
}
@keyframes fmai-shine {
	0%,100% { background-position: 0% 50%; }
	50%     { background-position: 100% 50%; }
}
.fmai-hero-sub {
	color: var(--fmai-text-2);
	font-size: clamp(15px, 1.55vw, 18px);
	margin: 0 auto 40px;
	max-width: 540px;
	line-height: 1.55;
	font-weight: 400;
}

/* ============= ENTRANCE ANIMATIONS ============= */
/* Subtle staggered fade-up so content settles in instead of just appearing. */
.fmai-hero-title,
.fmai-hero-sub,
.fmai-input-wrap {
	animation: fmai-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fmai-hero-title   { animation-delay: 80ms; }
.fmai-hero-sub     { animation-delay: 200ms; }
.fmai-input-wrap   { animation-delay: 300ms; }
.fmai-hero-decor   { animation: fmai-fade-in 1200ms ease-out 200ms both; }

@keyframes fmai-rise {
	0%   { opacity: 0; transform: translateY(16px); }
	100% { opacity: 1; transform: translateY(0); }
}
@keyframes fmai-fade-in {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}

/* ============= INPUT CARD ============= */

.fmai-input-wrap {
	position: relative;
	max-width: 720px;
	margin: 0 auto;
	border-radius: 22px;
	/* Higher opacity surface — sits cleanly over the image. */
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(28px) saturate(180%);
	        backdrop-filter: blur(28px) saturate(180%);
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.6) inset,
		0 12px 40px -12px rgba(15, 23, 42, 0.15),
		0 40px 100px -32px rgba(168, 85, 247, 0.45);
	overflow: hidden;
	transition: box-shadow var(--fmai-trans-med), transform var(--fmai-trans-med);
}
/* Animated gradient border using the mask-composite trick. */
.fmai-input-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(135deg, rgba(168,85,247,0.5), rgba(236,72,153,0.5) 50%, rgba(99,102,241,0.5));
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	        mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--fmai-trans-med);
	pointer-events: none;
}
.fmai-input-wrap:focus-within::before {
	opacity: 1;
}
.fmai-input-wrap:focus-within {
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.1) inset,
		0 16px 50px -16px rgba(0, 0, 0, 0.4),
		0 40px 100px -32px rgba(168, 85, 247, 0.55),
		0 0 60px rgba(168, 85, 247, 0.18);
	transform: translateY(-2px);
}
.fmai-input {
	display: block;
	width: 100%;
	padding: 26px 26px 16px;
	background: transparent;
	border: 0;
	outline: 0;
	color: var(--fmai-text);
	font-family: var(--fmai-font-ui);
	font-size: clamp(18px, 2vw, 22px);
	font-weight: 500;
	letter-spacing: -0.01em;
	resize: vertical;
	min-height: 72px;
	max-height: 220px;
	line-height: 1.45;
}
.fmai-input::placeholder {
	color: var(--fmai-text-3);
	font-weight: 400;
}
.fmai-input-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px 16px;
	border-top: 1px solid var(--fmai-border);
}
.fmai-input-actions-right {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.fmai-counter {
	font-size: 12px;
	color: var(--fmai-text-3);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}
.fmai-btn-mini {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--fmai-surface);
	color: var(--fmai-text-2);
	border: 1px solid var(--fmai-border);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all var(--fmai-trans-fast);
}
.fmai-btn-mini:hover {
	color: var(--fmai-text);
	border-color: var(--fmai-accent);
	background: var(--fmai-surface-2);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px -4px rgba(168, 85, 247, 0.3);
}
.fmai-btn-mini .fmai-icon svg {
	width: 14px; height: 14px;
}

/* ============= TOOLBAR (tabs + search) ============= */

.fmai-toolbar {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 32px 0 14px;
	flex-wrap: wrap;
}
.fmai-tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: var(--fmai-surface);
	border: 1px solid var(--fmai-border);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.fmai-tabs::-webkit-scrollbar { display: none; }
.fmai-tab {
	flex-shrink: 0;
	padding: 7px 16px;
	border-radius: 999px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: var(--fmai-text-2);
	font-size: 13px;
	font-weight: 600;
	transition: all var(--fmai-trans-fast);
	white-space: nowrap;
}
.fmai-tab:hover {
	color: var(--fmai-hover-text, #fff);
	background: var(--fmai-grad);
	box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35);
}
.fmai-tab.is-active {
	background: var(--fmai-grad);
	color: var(--fmai-hover-text, #fff);
	box-shadow: 0 2px 12px rgba(168,85,247,0.45);
}
.fmai-search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 220px;
	min-width: 0;
	max-width: 360px;
	background: var(--fmai-surface);
	border: 1px solid var(--fmai-border);
	border-radius: 999px;
	padding: 0 12px;
	transition: all var(--fmai-trans-fast);
	box-sizing: border-box;
}
.fmai-search:focus-within {
	border-color: var(--fmai-accent);
	box-shadow: 0 0 0 3px rgba(168,85,247,0.18);
}
.fmai-search .fmai-icon { color: var(--fmai-text-3); flex-shrink: 0; }
.fmai-search-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: 0;
	color: var(--fmai-text);
	font-family: inherit;
	font-size: 14px;
	padding: 10px 8px;
	width: 100%;
	-webkit-appearance: none;
	appearance: none;
	-webkit-border-radius: 0;
	border-radius: 0;
}
.fmai-search-input::-webkit-search-decoration,
.fmai-search-input::-webkit-search-cancel-button,
.fmai-search-input::-webkit-search-results-button,
.fmai-search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
}
.fmai-search-input::placeholder { color: var(--fmai-text-3); }

/* ============= CHIP FILTERS ============= */

.fmai-chips {
	position: relative;
	z-index: 1;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 4px 0 14px;
	margin-bottom: 18px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.fmai-chips::-webkit-scrollbar { height: 6px; }
.fmai-chips::-webkit-scrollbar-thumb {
	background: var(--fmai-border-strong);
	border-radius: 999px;
}
.fmai-chip {
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--fmai-surface);
	color: var(--fmai-text-2);
	border: 1px solid var(--fmai-border);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all var(--fmai-trans-fast);
}
.fmai-chip:hover {
	color: var(--fmai-hover-text, #fff);
	background: var(--fmai-grad);
	border-color: transparent;
	box-shadow: 0 4px 14px -2px rgba(168, 85, 247, 0.45);
	transform: translateY(-1px);
}
.fmai-chip.is-active {
	background: var(--fmai-grad);
	color: var(--fmai-hover-text, #fff);
	border-color: transparent;
	box-shadow: 0 2px 12px rgba(168,85,247,0.4);
}
.fmai-chip.is-active:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(168, 85, 247, 0.55);
}

/* ============= GRID + CARDS ============= */

.fmai-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 14px;
}

.fmai-card {
	position: relative;
	background: var(--fmai-surface);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	backdrop-filter: blur(20px) saturate(180%);
	border: 1px solid var(--fmai-border);
	border-radius: var(--fmai-radius);
	padding: 14px 16px 14px;
	box-shadow: var(--fmai-shadow-1);
	transition: transform var(--fmai-trans-med), box-shadow var(--fmai-trans-med), border-color var(--fmai-trans-med);
	overflow: hidden;
	animation: fmai-card-in 420ms cubic-bezier(.2,.7,.3,1) both;
}
.fmai-card::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: var(--fmai-grad);
	-webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--fmai-trans-med);
	pointer-events: none;
}
.fmai-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--fmai-shadow-2), 0 0 30px rgba(168,85,247,0.18);
}
.fmai-card:hover::before { opacity: 1; }

.fmai-card.is-hidden { display: none; }

@keyframes fmai-card-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.fmai-fadein {
	animation: fmai-card-in 420ms cubic-bezier(.2,.7,.3,1) both;
}

.fmai-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}
.fmai-card-title {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--fmai-text-3);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.fmai-card-head-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* "Site only" badge for visual / Google Fonts cards. */
.fmai-site-only {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fmai-hover-text, #fff);
	background: linear-gradient(135deg, #6366f1, #ec4899);
	border-radius: 999px;
	white-space: nowrap;
	cursor: help;
	box-shadow: 0 2px 6px -1px rgba(99, 102, 241, 0.4);
}

/* Webfont preview gets a slightly larger size so the typeface character shows. */
.fmai-preview--webfont {
	font-size: clamp(22px, 2.2vw, 26px) !important;
	line-height: 1.3;
}

/* Subtle accent on webfont cards so they're scannable. */
.fmai-card--webfont {
	background: linear-gradient(180deg,
		rgba(255, 255, 255, 0.92) 0%,
		rgba(245, 243, 255, 0.92) 100%);
}

.fmai-fav {
	width: 30px; height: 30px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--fmai-border);
	color: var(--fmai-text-3);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all var(--fmai-trans-fast);
}
.fmai-fav .fmai-icon svg { width: 15px; height: 15px; fill: none; }
.fmai-fav:hover {
	color: var(--fmai-accent-2);
	border-color: var(--fmai-accent-2);
	background: rgba(236, 72, 153, 0.08);
}
.fmai-fav.is-active {
	color: var(--fmai-accent-2);
	border-color: transparent;
	background: rgba(236, 72, 153, 0.18);
}
.fmai-fav.is-active .fmai-icon svg {
	fill: var(--fmai-accent-2);
}
.fmai-fav.fmai-pop {
	animation: fmai-pop 420ms cubic-bezier(.2,.9,.3,1.4);
}
@keyframes fmai-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.35); }
	100% { transform: scale(1); }
}

.fmai-preview {
	min-height: 64px;
	padding: 14px 0;
	font-size: 22px;
	line-height: 1.45;
	letter-spacing: 0.01em;
	color: var(--fmai-text);
	overflow-wrap: anywhere;
	word-break: break-word;
	cursor: copy;
	transition: color var(--fmai-trans-fast);
}
.fmai-preview:hover { color: var(--fmai-accent); }
.fmai-preview:focus { outline: none; }

.fmai-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px dashed var(--fmai-border);
}
.fmai-card-foot-extra {
	display: flex;
	gap: 4px;
}

.fmai-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 10px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: 0;
	transition: all var(--fmai-trans-fast);
	white-space: nowrap;
}
.fmai-btn-copy {
	background: var(--fmai-grad);
	color: var(--fmai-hover-text, #fff);
	box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35);
}
.fmai-btn-copy:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 18px rgba(168, 85, 247, 0.55);
}
.fmai-btn-copy:active {
	transform: translateY(0);
}
.fmai-btn-copy.is-copied {
	background: linear-gradient(135deg, #10b981, #059669);
	box-shadow: 0 2px 14px rgba(16, 185, 129, 0.55);
}
.fmai-btn .fmai-icon svg {
	width: 14px; height: 14px;
}

.fmai-btn-icon {
	width: 32px; height: 32px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid var(--fmai-border);
	color: var(--fmai-text-3);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all var(--fmai-trans-fast);
}
.fmai-btn-icon .fmai-icon svg {
	width: 14px; height: 14px;
}
.fmai-btn-icon:hover {
	color: var(--fmai-text);
	border-color: var(--fmai-accent);
	background: var(--fmai-surface);
}

/* ============= EMPTY STATE ============= */

.fmai-empty {
	display: none;
	text-align: center;
	color: var(--fmai-text-3);
	padding: 60px 20px;
	font-size: 15px;
}
.fmai-empty.is-shown { display: block; }

/* ============= LOAD MORE ============= */

.fmai-load-more-wrap {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 28px 0 0;
}
.fmai-load-more-wrap.is-hidden { display: none; }

.fmai-load-more-info {
	color: var(--fmai-text-3);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.fmai-load-more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 28px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	background: var(--fmai-grad);
	background-size: 200% 200%;
	color: var(--fmai-hover-text, #fff);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: 0 6px 20px -4px rgba(168,85,247,0.5), 0 2px 6px rgba(0,0,0,0.12);
	transition: transform var(--fmai-trans-fast), box-shadow var(--fmai-trans-fast), background-position var(--fmai-trans-med);
}
.fmai-load-more:hover {
	transform: translateY(-1px);
	background-position: 100% 50%;
	box-shadow: 0 10px 28px -4px rgba(168,85,247,0.65), 0 0 30px rgba(236,72,153,0.35);
}
.fmai-load-more:active {
	transform: translateY(0);
}
.fmai-load-more__arrow {
	display: inline-flex;
	font-size: 16px;
	line-height: 1;
	transition: transform var(--fmai-trans-fast);
}
.fmai-load-more:hover .fmai-load-more__arrow {
	transform: translateY(2px);
}

/* ============= TOAST ============= */

.fmai-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translate(-50%, 30px);
	background: var(--fmai-grad);
	color: var(--fmai-hover-text, #fff);
	font-weight: 600;
	font-size: 14px;
	padding: 12px 20px;
	border-radius: 999px;
	box-shadow: var(--fmai-shadow-2), 0 0 30px rgba(168,85,247,0.55);
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease, transform 280ms cubic-bezier(.2,.9,.3,1.4);
	z-index: 9999;
}
.fmai-toast.is-shown {
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

/* ============= ICON HELPER ============= */

.fmai-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

/* ============= RESPONSIVE ============= */

@media (max-width: 768px) {
	.fmai-app {
		padding-bottom: 60px;
	}
	.fmai-hero {
		margin-bottom: 28px;
	}
	.fmai-grid {
		grid-template-columns: 1fr;
	}
	.fmai-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.fmai-tabs {
		align-self: center;
		max-width: 100%;
		flex: 0 0 auto;
	}
	/* Reset the horizontal-layout flex props so the search wrapper doesn't
	   grow to fill vertical space when the toolbar is stacked. */
	.fmai-search {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}
	.fmai-input { font-size: 18px; padding: 18px 18px 12px; }
	.fmai-preview { font-size: 20px; }
}

@media (max-width: 420px) {
	.fmai-hero {
		padding-top: clamp(48px, 14vw, 80px);
	}
	.fmai-hero-title { font-size: 32px; letter-spacing: -0.025em; }
	.fmai-hero-sub { font-size: 14px; margin-bottom: 28px; }
	.fmai-input { padding: 20px 18px 12px; }
	.fmai-input-actions { padding: 8px 14px 14px; }
	.fmai-card { padding: 12px 14px; }
	.fmai-preview { font-size: 18px; min-height: 56px; }
	.fmai-btn { padding: 7px 12px; font-size: 12px; }
}

/* ============= REDUCED MOTION ============= */

@media (prefers-reduced-motion: reduce) {
	.fmai-app *,
	.fmai-app *::before,
	.fmai-app *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
