/**
 * Grade XND — estilos encapsulados (.xnd-scope).
 * Cores explícitas para não herdar link/título do tema.
 */

.xnd-scope {
	--xnd-surface: #141414;
	--xnd-surface-2: #1f1f1f;
	--xnd-border: rgba(255, 255, 255, 0.08);
	--xnd-text: #f5f5f5;
	--xnd-text-muted: #cbd5e1;
	--xnd-heading: #f5f5f5;
	--xnd-link: #f5f5f5;
	--xnd-link-hover: #ffffff;
	--xnd-accent: #2563eb;
	--xnd-radius: 10px;
	--xnd-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	display: block;
	width: 100%;
	max-width: 100%;
	clear: both;
	font-family: var(--xnd-font);
	font-size: 14px;
	line-height: 1.45;
	color: var(--xnd-text);
	text-align: left;
}

.xnd-scope *,
.xnd-scope *::before,
.xnd-scope *::after {
	box-sizing: border-box;
}

.xnd-scope a {
	color: var(--xnd-link);
	text-decoration: none;
}

.xnd-scope a:hover,
.xnd-scope a:focus {
	color: var(--xnd-link-hover);
	text-decoration: none;
}

.xnd-scope ul,
.xnd-scope ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.xnd-scope h2,
.xnd-scope h3,
.xnd-scope p {
	margin: 0;
	font-weight: inherit;
	font-family: inherit;
}

.xnd-grid-root,
.xnd-mount {
	width: 100%;
	max-width: 100%;
	clear: both;
}

.xnd-grid__header {
	margin: 1rem 0 0.75rem;
}

.xnd-grid__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--xnd-heading) !important;
}

.xnd-grid__empty {
	margin: 0.75rem 0 0;
	color: var(--xnd-text-muted);
	font-size: 0.95rem;
}

.xnd-grid__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

@media (min-width: 640px) {
	.xnd-grid__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.xnd-grid__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 14px;
	}
}

.xnd-card {
	margin: 0;
}

.xnd-card__link {
	display: block;
	color: var(--xnd-text) !important;
	text-decoration: none !important;
	background: var(--xnd-surface);
	border: 1px solid var(--xnd-border);
	border-radius: var(--xnd-radius);
	overflow: hidden;
}

.xnd-card__link:hover,
.xnd-card__link:focus {
	color: var(--xnd-link-hover) !important;
	background: var(--xnd-surface-2);
}

.xnd-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.xnd-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

.xnd-card__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	pointer-events: none;
}

.xnd-card__body {
	padding: 8px 10px 10px;
	background: var(--xnd-surface);
}

.xnd-card__title {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.35;
	font-weight: 500;
	color: var(--xnd-text) !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.xnd-grid__skeleton {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

@media (min-width: 640px) {
	.xnd-grid__skeleton {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.xnd-grid__skeleton-card {
	aspect-ratio: 16 / 9;
	border-radius: var(--xnd-radius);
	background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
	background-size: 200% 100%;
	animation: xnd-shimmer 1.2s infinite;
}

@keyframes xnd-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
