/* Fontxsis Studio — cloud projects dashboard */
:root {
	--st-bg: #0a0a0a;
	--st-panel: #141414;
	--st-panel-2: #1a1a1a;
	--st-border: #2a2a2a;
	--st-text: #f5f5f5;
	--st-muted: #a3a3a3;
	--st-faint: #737373;
	--st-accent: #e8eaed;
}

html[data-fx-theme='light'] {
	--st-bg: #f4f4f5;
	--st-panel: #ffffff;
	--st-panel-2: #fafafa;
	--st-border: #e4e4e7;
	--st-text: #18181b;
	--st-muted: #52525b;
	--st-faint: #71717a;
	--st-accent: #18181b;
}

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

html,
body {
	margin: 0;
	min-height: 100%;
}

body.fx-studio {
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
	background: var(--st-bg);
	color: var(--st-text);
	min-height: 100vh;
}

.fx-studio__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 24px;
	border-bottom: 1px solid var(--st-border);
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 10;
}

html[data-fx-theme='light'] .fx-studio__top {
	background: rgba(255, 255, 255, 0.9);
}

.fx-studio__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--st-text);
	text-decoration: none;
	font-weight: 700;
}

.fx-studio__brand img {
	display: block;
}

/* logo.svg is dark ink — invert for dark theme (same as /app) */
html[data-fx-theme='dark'] .fx-studio__brand img {
	filter: invert(1) brightness(1.2);
}

.fx-studio__badge {
	padding: 2px 8px;
	border: 1px solid var(--st-border);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	color: var(--st-muted);
}

.fx-studio__open-lab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 0 14px 0 10px;
	border-radius: 999px;
	background: var(--st-accent);
	color: #111;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
}

.fx-studio__open-lab img {
	display: block;
	flex-shrink: 0;
}

/* Button is light on dark theme — keep logo dark; invert on light theme (dark button). */
html[data-fx-theme='light'] .fx-studio__open-lab {
	color: #fff;
}

html[data-fx-theme='light'] .fx-studio__open-lab img {
	filter: invert(1) brightness(1.2);
}

.fx-studio__main {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 24px 64px;
}

.fx-studio__hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.fx-studio__hero h1 {
	margin: 0;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.fx-studio__welcome {
	margin: 8px 0 0;
	color: var(--st-muted);
	font-size: 14px;
}

.fx-studio__upgrade {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.fx-studio__upgrade[hidden] {
	display: none !important;
}

.fx-studio__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.fx-studio__search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 220px;
	max-width: 420px;
	padding: 0 12px;
	min-height: 40px;
	border: 1px solid var(--st-border);
	border-radius: 999px;
	background: var(--st-panel);
	color: var(--st-muted);
}

.fx-studio__search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--st-text);
	font: inherit;
	font-size: 13px;
	outline: none;
}

.fx-studio__meta {
	margin: 0;
	margin-left: auto;
	font-size: 12px;
	color: var(--st-faint);
}

.fx-studio__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.fx-studio__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	min-height: 220px;
	padding: 0;
	border: 1px solid var(--st-border);
	border-radius: 16px;
	background: var(--st-panel);
	color: var(--st-text);
	overflow: hidden;
}

.fx-studio__card-open {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	flex: 1;
	width: 100%;
	min-height: 220px;
	padding: 16px;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	font: inherit;
	cursor: pointer;
}

.fx-studio__card-delete {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--st-border);
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.85);
	color: var(--st-muted);
	cursor: pointer;
}

.fx-studio__card-delete:hover,
.fx-studio__card-delete:focus-visible {
	color: #fecaca;
	border-color: rgba(248, 113, 113, 0.45);
	background: rgba(127, 29, 29, 0.35);
	outline: none;
}

html[data-fx-theme='light'] .fx-studio__card-delete {
	background: rgba(255, 255, 255, 0.92);
}

.fx-studio__card--new {
	border-style: dashed;
	background: transparent;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--st-muted);
	padding: 16px;
	cursor: pointer;
	font: inherit;
}

.fx-studio__card--new strong {
	color: var(--st-text);
	font-size: 15px;
}

.fx-studio__card--new span:last-child {
	font-size: 12px;
	max-width: 16ch;
	line-height: 1.4;
}

.fx-studio__plus {
	font-size: 28px;
	line-height: 1;
	margin-bottom: 4px;
	color: var(--st-text);
}

.fx-studio__thumb {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	background: var(--st-panel-2);
	border: 1px solid var(--st-border);
	margin-bottom: 8px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.fx-studio__thumb.has-preview {
	border-color: rgba(255, 255, 255, 0.08);
}

.fx-studio__card strong {
	font-size: 14px;
}

.fx-studio__card small {
	font-size: 12px;
	color: var(--st-faint);
}

.fx-studio__cloud {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--st-border);
}

.fx-studio__cloud h2 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 16px;
}

.fx-studio__cloud p {
	margin: 0;
	max-width: 54ch;
	font-size: 13px;
	line-height: 1.5;
	color: var(--st-muted);
}

.fx-studio__cloud code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.92em;
}

.fx-studio__notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--st-border);
	border-radius: 12px;
	background: var(--st-panel);
	color: var(--st-muted);
	font-size: 13px;
	line-height: 1.45;
}

.fx-studio__notice a {
	color: var(--st-text);
	font-weight: 600;
}

@media (max-width: 640px) {
	.fx-studio__hero {
		flex-direction: column;
	}

	.fx-studio__meta {
		margin-left: 0;
		width: 100%;
	}
}
