/* Youtube4DL download tool. Scoped under .ytc / .y4-contact; colors come from --y4-* set in <head>. */
.ytc, .y4-contact {
	--t-primary: var(--y4-primary, #2b3ae8);
	--t-accent: var(--y4-accent, #ffc531);
	--t-ink: var(--y4-ink, #14162b);
	--t-paper: #f6f7fb;
	--t-line: #dde0ee;
	--t-muted: #5d6180;
	--t-ok: #0f7a52;
	--t-err: #b3261e;
	font-family: var(--y4-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	color: var(--t-ink);
	box-sizing: border-box;
}
.ytc *, .ytc *::before, .ytc *::after, .y4-contact *, .y4-contact *::before, .y4-contact *::after { box-sizing: inherit; }
.ytc { max-width: 820px; }
.ytc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ytc-title { margin: 0 0 6px; font-size: clamp(26px, 4vw, 38px); font-weight: 800; font-stretch: 120%; letter-spacing: -.02em; line-height: 1.1; }
.ytc-sub { margin: 0 0 20px; color: var(--t-muted); }

/* ---------- the deck: a strip of film holding the input ---------- */
.ytc-deck {
	--hole: rgba(255, 255, 255, .9);
	position: relative;
	display: flex; align-items: center; gap: 8px;
	padding: 22px 10px;
	border-radius: 16px;
	background:
		radial-gradient(circle at 50% 50%, var(--hole) 0 2.6px, transparent 3px) 0 5px / 16px 10px repeat-x,
		radial-gradient(circle at 50% 50%, var(--hole) 0 2.6px, transparent 3px) 0 calc(100% - 5px) / 16px 10px repeat-x,
		var(--t-ink);
	box-shadow: 0 18px 40px -18px rgba(10, 12, 40, .55);
}
.ytc-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.ytc .ytc-input {
	flex: 1; min-width: 0; width: 100%; height: 58px; margin: 0;
	padding: 0 84px 0 16px;
	font-weight: 500; font-size: 17px; line-height: 1.2; font-family: inherit; color: var(--t-ink);
	background: #fff; border: 0; border-radius: 10px;
	outline: none; box-shadow: inset 0 0 0 2px transparent;
	transition: box-shadow .15s;
}
.ytc .ytc-input::placeholder { color: #8b8fa8; }
.ytc .ytc-input:focus { box-shadow: inset 0 0 0 2px var(--t-primary); }
.ytc .ytc-input[readonly] { color: var(--t-muted); }
.ytc .ytc-paste {
	position: absolute; right: 10px; height: 38px; padding: 0 12px; margin: 0;
	font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit; color: var(--t-primary);
	background: #eef0fe; border: 0; border-radius: 8px; cursor: pointer;
}
.ytc .ytc-paste:hover { background: #e2e5fd; }
.ytc .ytc-start {
	position: relative; flex: none;
	height: 58px; min-width: 128px; padding: 0 26px; margin: 0;
	font-weight: 800; font-size: 17px; line-height: 1; font-family: inherit; font-stretch: 115%; letter-spacing: .01em;
	color: var(--t-ink); background: var(--t-accent);
	border: 0; border-radius: 10px; cursor: pointer;
	transition: transform .08s, filter .15s;
}
.ytc .ytc-start:hover { filter: brightness(1.06); }
.ytc .ytc-start:active { transform: translateY(1px); }
.ytc .ytc-start:disabled { cursor: progress; }

.ytc .ytc-start.is-loading span, .ytc .ytc-dl.is-loading span, .y4-contact .y4-btn.is-loading span { visibility: hidden; }
.ytc .ytc-start.is-loading::after, .ytc .ytc-dl.is-loading::after, .y4-contact .y4-btn.is-loading::after {
	content: ""; position: absolute; left: calc(50% - 10px); top: calc(50% - 10px);
	width: 20px; height: 20px; border-radius: 50%;
	border: 2.5px solid currentColor; border-right-color: transparent;
	animation: ytc-spin .7s linear infinite;
}
@keyframes ytc-spin { to { transform: rotate(360deg); } }

.ytc :focus-visible, .y4-contact :focus-visible { outline: 3px solid var(--t-accent); outline-offset: 2px; }
.ytc .ytc-input:focus-visible { outline: none; }

.ytc-msg { margin: 14px 0 0; padding: 12px 16px; border-radius: 10px; background: #fff1f0; color: var(--t-err); font-weight: 550; font-size: 15px; }
.ytc-terms { margin: 14px 0 0; font-size: 13px; color: var(--t-muted); }
.ytc-terms a { color: inherit; text-underline-offset: 2px; }
.y4-on-dark .ytc-terms { color: rgba(255, 255, 255, .62); }

/* ---------- result ---------- */
.ytc-result { margin-top: 22px; }
.ytc-card {
	display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px;
	padding: 18px; background: #fff; color: var(--t-ink);
	border-radius: 16px; border: 1px solid var(--t-line);
	box-shadow: 0 24px 50px -28px rgba(10, 12, 40, .45);
	text-align: left;
}
.ytc-media { position: relative; align-self: start; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--t-paper); }
.ytc-media img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.ytc-dur {
	position: absolute; left: 8px; bottom: 8px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 3px 8px; border-radius: 6px;
	background: rgba(12, 13, 30, .82); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ytc-dur::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4d3d; }
.ytc-body { min-width: 0; }
.ytc-vtitle { margin: 0 0 4px; font-size: 18px; line-height: 1.3; font-weight: 750; color: var(--t-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ytc-channel { margin: 0 0 14px; font-size: 14px; color: var(--t-muted); }

.ytc-tabs { display: inline-flex; padding: 4px; margin: 0 0 8px; background: var(--t-paper); border-radius: 11px; }
.ytc .ytc-tab {
	height: 36px; padding: 0 16px; margin: 0; border: 0; border-radius: 8px; cursor: pointer;
	font-weight: 650; font-size: 14px; line-height: 1; font-family: inherit; color: var(--t-muted); background: transparent;
}
.ytc .ytc-tab.is-active { background: var(--t-ink); color: #fff; }

.ytc-list { margin: 0; padding: 0; list-style: none; }
.ytc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--t-line); }
.ytc-row:last-child { border-bottom: 0; }
.ytc-q { font-weight: 700; font-size: 15px; }
.ytc-q small { margin-left: 8px; padding: 2px 6px; border-radius: 5px; background: #eef0fe; color: var(--t-primary); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.ytc-size { color: var(--t-muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ytc .ytc-dl {
	position: relative; height: 38px; padding: 0 16px; margin: 0;
	font-weight: 700; font-size: 14px; line-height: 1; font-family: inherit; color: #fff; background: var(--t-primary);
	border: 0; border-radius: 9px; cursor: pointer;
}
.ytc .ytc-dl:hover { filter: brightness(1.1); }
.ytc .ytc-dl:disabled { opacity: .55; cursor: default; }
.ytc .ytc-dl.is-loading { opacity: 1; }
.ytc-note { margin: 10px 0 0; color: var(--t-muted); }

.ytc-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 4px; }
.ytc-ok { margin: 0; font-weight: 750; font-size: 17px; }
.ytc-meta { display: block; font-weight: 500; font-size: 14px; color: var(--t-muted); margin-top: 2px; }
.ytc .ytc-get {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 54px; padding: 0 30px; border-radius: 12px;
	background: var(--t-accent); color: var(--t-ink) !important; text-decoration: none !important;
	font-weight: 800; font-size: 17px; font-stretch: 112%;
}
.ytc .ytc-get:hover { filter: brightness(1.05); }
.ytc-hint { margin: 0; font-size: 13px; color: var(--t-muted); }
.ytc-err { margin: 0; color: var(--t-err); font-weight: 650; }
.ytc-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ytc .ytc-link { padding: 4px 0; margin: 0; background: none; border: 0; cursor: pointer; font-weight: 650; font-size: 14px; line-height: 1.3; font-family: inherit; color: var(--t-primary); text-decoration: underline; text-underline-offset: 3px; }

.ytc-skeleton .ytc-media, .ytc-line { background: linear-gradient(90deg, #eceef6 25%, #f6f7fb 50%, #eceef6 75%); background-size: 200% 100%; animation: ytc-shimmer 1.2s infinite; }
.ytc-line { height: 16px; border-radius: 6px; margin-bottom: 12px; }
.ytc-line.w80 { width: 80%; } .ytc-line.w40 { width: 40%; } .ytc-line.tall { height: 120px; }
@keyframes ytc-shimmer { to { background-position: -200% 0; } }

@media (max-width: 720px) {
	.ytc-card { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
}
@media (max-width: 560px) {
	.ytc-deck { flex-wrap: wrap; padding: 22px 8px; }
	.ytc-field { flex-basis: 100%; }
	.ytc .ytc-input { height: 54px; }
	.ytc .ytc-start { width: 100%; height: 52px; }
	.ytc-row { grid-template-columns: minmax(0, 1fr) auto; }
	.ytc-row .ytc-size { grid-column: 1; grid-row: 2; margin-top: -6px; }
	.ytc-row .ytc-dl { grid-row: 1 / span 2; grid-column: 2; }
	.ytc .ytc-get { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.ytc *, .ytc *::before, .ytc *::after { animation: none !important; transition: none !important; }
}

/* ---------- contact form ---------- */
.y4-contact { max-width: 620px; margin: 8px 0 32px; }
.y4-field { margin-bottom: 16px; }
.y4-field label { display: block; margin-bottom: 6px; font-weight: 650; }
.y4-field input, .y4-field select, .y4-field textarea {
	width: 100%; margin: 0; padding: 12px 14px;
	font-size: 16px; line-height: 1.4; font-family: inherit; color: var(--t-ink);
	background: #fff; border: 1.5px solid #cfd3e3; border-radius: 10px;
}
.y4-field input:focus, .y4-field select:focus, .y4-field textarea:focus { border-color: var(--t-primary); outline: none; box-shadow: 0 0 0 3px rgba(43, 58, 232, .15); }
.y4-hp { position: absolute; left: -9999px; }
.y4-contact .y4-btn {
	position: relative; min-height: 50px; padding: 0 26px;
	font-weight: 750; font-size: 16px; line-height: 1; font-family: inherit; color: #fff; background: var(--t-primary);
	border: 0; border-radius: 10px; cursor: pointer;
}
.y4-contact-msg { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.y4-contact-msg.is-ok { background: #e6f6ee; color: var(--t-ok); }
.y4-contact-msg.is-err { background: #fff1f0; color: var(--t-err); }

/* ad slots */
.y4-ad { margin: 24px auto; text-align: center; overflow: hidden; max-width: 100%; }
