:root, .yvt-wrap {
	--yvt-navy: #1a2744;
	--yvt-navy-dk: #080e1a;
	--yvt-surface: #131e30;
	--yvt-border: #1e2e47;
	--yvt-gold: #DDB913;
	--yvt-gold-lt: #f0d040;
	--yvt-teal: #6EC1E4;
	--yvt-text: #dde6f0;
	--yvt-muted: #6e849e;

	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px;
	direction: rtl;
	box-sizing: border-box;
}

.yvt-wrap *,
.yvt-wrap *::before,
.yvt-wrap *::after {
	box-sizing: border-box;
}

.yvt-title {
	color: var(--yvt-gold);
	font-size: 28px;
	font-weight: 700;
	text-align: center;
	margin: 0 0 16px;
}

.yvt-subtitle {
	text-align: center;
	color: var(--yvt-text);
	font-size: 15px;
	line-height: 1.65;
	max-width: 720px;
	margin: 0 auto 32px;
	opacity: .85;
}

.yvt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.yvt-card {
	background: var(--yvt-surface);
	border: 1px solid var(--yvt-border);
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	text-align: right;
	font: inherit;
	color: var(--yvt-text);
	transition: border-color .2s, transform .2s;
}

.yvt-card:hover,
.yvt-card:focus-visible {
	border-color: var(--yvt-gold);
	transform: translateY(-3px);
	outline: none;
}

.yvt-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--yvt-navy-dk);
}

.yvt-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.yvt-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	color: var(--yvt-gold);
	background: rgba(8, 14, 26, .25);
	opacity: 0;
	transition: opacity .2s;
}

.yvt-card:hover .yvt-play,
.yvt-card:focus-visible .yvt-play {
	opacity: 1;
}

.yvt-duration {
	position: absolute;
	left: 8px;
	bottom: 8px;
	background: rgba(8, 14, 26, .85);
	color: var(--yvt-teal);
	font-size: 12px;
	padding: 2px 6px;
	border-radius: 4px;
}

.yvt-card-title {
	display: block;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.4;
}

.yvt-empty {
	text-align: center;
	color: var(--yvt-muted);
}

.yvt-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--yvt-border);
	padding-bottom: 0;
}

.yvt-tab {
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	padding: 10px 20px;
	color: var(--yvt-muted);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	transition: color .15s, border-color .15s;
}

.yvt-tab:hover {
	color: var(--yvt-text);
}

.yvt-tab-active {
	color: var(--yvt-gold);
	border-bottom-color: var(--yvt-gold);
}

.yvt-card[hidden] {
	display: none;
}

.yvt-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 24px 16px;
}

/* קריטי: בלי ה-:not([hidden]) הזה, ה-display:flex "מנצח" את [hidden] של הדפדפן
   (סטייל מפתח-אתר גובר על ברירת המחדל גם בלי קשר ל-specificity) — והחלון נשאר מוצג תמיד. */
.yvt-modal:not([hidden]) {
	display: flex;
}

.yvt-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(8, 14, 26, .9);
	z-index: 0;
}

.yvt-modal-frame {
	position: relative;
	/* רוחב מוגבל גם לפי vw וגם לפי vh (124vh = 70vh * 16/9), כדי שהחלון כולו יישאר שלם בתוך המסך */
	width: min(90vw, 960px, 124vh);
	background: var(--yvt-navy);
	border: 1px solid var(--yvt-gold);
	border-radius: 12px;
	padding: 12px;
	z-index: 1;
	margin: auto;
}

.yvt-modal-header {
	position: relative;
	height: 34px;
	margin-bottom: 8px;
}

.yvt-modal-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.yvt-modal-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	border: 0;
}

.yvt-modal-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 8px;
	background: var(--yvt-gold);
	color: var(--yvt-navy-dk);
	border: none;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.yvt-modal-close:hover {
	background: var(--yvt-gold-lt);
}

.yvt-modal-download {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border-radius: 8px;
	background: var(--yvt-teal);
	color: var(--yvt-navy-dk);
	text-decoration: none;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
}

.yvt-modal-download:hover {
	background: #8fd4f0;
	color: var(--yvt-navy-dk);
}

.yvt-modal-download svg {
	flex-shrink: 0;
}

@media (max-width: 480px) {
	.yvt-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 12px;
	}
	.yvt-title {
		font-size: 22px;
	}
	.yvt-subtitle {
		font-size: 13px;
	}
}