/* Universal Channel Sync — frontend grid & modal.
   Namespaced under .ucs- so it stays out of your theme's way.
   Typography is inherited from your theme on purpose, so it blends in;
   character comes from layout, depth, and motion instead. */

.ucs-wrap {
	--ucs-cols: 3;
	--ucs-gap: clamp(14px, 2vw, 24px);
	--ucs-radius: 14px;
	--ucs-accent: #ff2d55;
	--ucs-shadow: 0 6px 22px rgba(15, 18, 25, 0.12);
	--ucs-shadow-hover: 0 16px 40px rgba(15, 18, 25, 0.22);
	width: 100%;
	box-sizing: border-box;
}

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

.ucs-grid {
	display: grid;
	grid-template-columns: repeat(var(--ucs-cols), minmax(0, 1fr));
	gap: var(--ucs-gap);
}

/* List layout */
.ucs-layout-list .ucs-grid {
	grid-template-columns: 1fr;
}
.ucs-layout-list .ucs-card {
	display: grid;
	grid-template-columns: minmax(180px, 280px) 1fr;
	align-items: stretch;
	gap: 18px;
}

.ucs-card {
	display: flex;
	flex-direction: column;
	background: var(--ucs-card-bg, transparent);
	border-radius: var(--ucs-radius);
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ucs-card:hover {
	transform: translateY(-4px);
}

.ucs-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 0;
	margin: 0;
	cursor: pointer;
	background: #0e1119;
	border-radius: var(--ucs-radius);
	overflow: hidden;
	box-shadow: var(--ucs-shadow);
	transition: box-shadow 0.35s ease;
}
.ucs-card:hover .ucs-card__thumb {
	box-shadow: var(--ucs-shadow-hover);
}
.ucs-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}
.ucs-card:hover .ucs-card__thumb img {
	transform: scale(1.06);
	filter: saturate(1.08);
}

/* Play button */
.ucs-card__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: rgba(10, 12, 18, 0.55);
	backdrop-filter: blur(4px);
	display: grid;
	place-items: center;
	transition: transform 0.3s ease, background 0.3s ease;
}
.ucs-card__play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
	margin-left: 3px;
}
.ucs-card__thumb:hover .ucs-card__play {
	transform: scale(1.12);
	background: var(--ucs-accent);
}

.ucs-card__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(8, 10, 15, 0.85);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 5px;
	letter-spacing: 0.02em;
}

.ucs-card__badge {
	position: absolute;
	left: 8px;
	top: 8px;
	background: rgba(8, 10, 15, 0.7);
	color: #fff;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 4px 8px;
	border-radius: 999px;
}

.ucs-card__meta {
	padding: 12px 2px 4px;
}
.ucs-card__title {
	font-size: 1rem;
	line-height: 1.35;
	margin: 0 0 4px;
	font-weight: 600;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ucs-card__date {
	font-size: 0.8rem;
	opacity: 0.6;
}

.ucs-empty {
	grid-column: 1 / -1;
	text-align: center;
	opacity: 0.7;
	padding: 40px 0;
}

/* New-arrival highlight (live refresh) */
.ucs-card--new {
	animation: ucs-pop 0.6s ease;
}
@keyframes ucs-pop {
	0%   { opacity: 0; transform: translateY(12px) scale(0.98); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal */
.ucs-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
}
.ucs-modal[hidden] {
	display: none;
}
.ucs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 8, 12, 0.82);
	backdrop-filter: blur(6px);
	animation: ucs-fade 0.25s ease;
}
.ucs-modal__inner {
	position: relative;
	width: min(92vw, 1000px);
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	animation: ucs-rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ucs-modal__player,
.ucs-modal__player iframe {
	width: 100%;
	height: 100%;
	border: 0;
}
.ucs-modal__close {
	position: absolute;
	top: -42px;
	right: 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ucs-modal__close:hover {
	opacity: 1;
	transform: scale(1.1);
}

@keyframes ucs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ucs-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 900px) {
	.ucs-wrap { --ucs-cols: 2 !important; }
	.ucs-layout-list .ucs-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.ucs-wrap { --ucs-cols: 1 !important; }
}
