.ytt50 {
	--ytt50-accent: #ff2d55;
	--ytt50-bg: #101014;
	--ytt50-surface: #1a1a21;
	--ytt50-text: #f5f5f7;
	--ytt50-muted: #a1a1ad;
	color: var(--ytt50-text);
	font-family: inherit;
	max-width: 900px;
	margin: 0 auto;
}

.ytt50__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.ytt50__heading {
	margin: 0;
	font-size: 1.6rem;
	letter-spacing: -0.02em;
	color: var(--ytt50-text);
}

.ytt50__play-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--ytt50-accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 12px 22px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.15s ease;
}
.ytt50__play-all:hover { transform: translateY(-1px); filter: brightness(1.08); }

.ytt50__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }

.ytt50__item {
	display: grid;
	grid-template-columns: 44px 160px 1fr auto;
	gap: 14px;
	align-items: center;
	background: var(--ytt50-surface);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 14px;
	padding: 10px 14px;
}
.ytt50__item.is-voted { border-color: rgba(255, 45, 85, 0.45); }

.ytt50__rank { font-size: 1.4rem; font-weight: 700; color: var(--ytt50-muted); text-align: center; }

.ytt50__thumb {
	position: relative;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	border-radius: 10px;
	overflow: hidden;
}
.ytt50__thumb img { width: 160px; height: 90px; object-fit: cover; display: block; }
.ytt50__thumb-play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 1.6rem;
	background: rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.15s ease;
}
.ytt50__thumb:hover .ytt50__thumb-play { opacity: 1; }

.ytt50__meta { min-width: 0; }
.ytt50__title { margin: 0; font-weight: 600; font-size: 1rem; }
.ytt50__artist, .ytt50__score { margin: 2px 0 0; font-size: 0.82rem; color: var(--ytt50-muted); }

.ytt50__votes { display: flex; gap: 8px; }
.ytt50__vote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--ytt50-text);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 0.9rem;
	cursor: pointer;
}
.ytt50__vote--up:hover:not(:disabled) { background: rgba(52, 199, 89, 0.2); }
.ytt50__vote--down:hover:not(:disabled) { background: rgba(255, 69, 58, 0.2); }
.ytt50__vote:disabled { opacity: 0.45; cursor: not-allowed; }

.ytt50__note { grid-column: 1 / -1; margin: 0; font-size: 0.78rem; color: var(--ytt50-muted); min-height: 0; }
.ytt50__note:empty { display: none; }
.ytt50__empty { color: var(--ytt50-muted); }

/* Suggestion form */
.ytt50__form { background: var(--ytt50-surface); border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.ytt50__hint { margin: 0; color: var(--ytt50-muted); font-size: 0.88rem; }
.ytt50__label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--ytt50-muted); }
.ytt50__label input {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 10px 12px;
	color: var(--ytt50-text);
	font-size: 0.95rem;
}
.ytt50__submit {
	justify-self: start;
	background: var(--ytt50-accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 11px 22px;
	font-weight: 600;
	cursor: pointer;
}
.ytt50__form-msg { margin: 0; font-size: 0.88rem; }
.ytt50__form-msg.is-error { color: #ff6b6b; }
.ytt50__form-msg.is-ok { color: #34c759; }

/* Modal */
.ytt50-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
}
.ytt50-modal[hidden] { display: none; }
.ytt50-modal__box { width: min(960px, 100%); }
.ytt50-modal__frame { position: relative; padding-top: 56.25%; background: #000; border-radius: 14px; overflow: hidden; }
.ytt50-modal__frame iframe, .ytt50-modal__frame > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytt50-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: #fff; }
.ytt50-modal__title { margin: 0; font-size: 1rem; font-weight: 600; }
.ytt50-modal__close {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	border: 0;
	border-radius: 999px;
	width: 36px;
	height: 36px;
	font-size: 1.1rem;
	cursor: pointer;
}
.ytt50-modal__progress {
	background: var(--ytt50-surface, #1a1a21);
	color: var(--ytt50-text, #f5f5f7);
	padding: 14px 16px 16px;
	border-radius: 0 0 14px 14px;
}
.ytt50-modal__frame:has(+ .ytt50-modal__progress:not([hidden])) { border-radius: 14px 14px 0 0; }
.ytt50-modal__progress-copy { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ytt50-modal__progress-rank, .ytt50-modal__progress-remaining { color: var(--ytt50-muted, #a1a1ad); font-size: 0.82rem; white-space: nowrap; }
.ytt50-modal__progress-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.ytt50-modal__progress-track { height: 4px; margin-top: 11px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.ytt50-modal__progress-track span { display: block; width: 0; height: 100%; background: var(--ytt50-accent, #ff2d55); transition: width 0.3s ease; }

@media (max-width: 720px) {
	.ytt50__item { grid-template-columns: 34px 1fr; }
	.ytt50__thumb img { width: 100%; height: auto; aspect-ratio: 16/9; }
	.ytt50__thumb { grid-column: 1 / -1; }
	.ytt50__meta { grid-column: 1 / -1; }
	.ytt50__votes { grid-column: 1 / -1; }
	.ytt50-modal__progress-copy { grid-template-columns: auto 1fr; }
	.ytt50-modal__progress-remaining { grid-column: 1 / -1; }
}
