/* Homepage layout - the sections, "Top of the week + Mixes" side by side, one line of videos per row */
.hm-home .video.hm-trim { display: none !important; }
.hm-home .hm-sec { margin-bottom: 6px; }

/* ---------------------------------------------------------------- Top (left) + Mixes (right) */
.hm-tm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 10px 0 30px; align-items: stretch; }
.hm-tw, .hm-mix { position: relative; min-width: 0; padding: 16px 16px 14px; border-radius: 22px; background: var(--surface, #fff); border: 1px solid var(--border, rgba(0, 0, 0, .08)); display: flex; flex-direction: column; }
.hm-tw { border-color: rgba(245, 180, 0, .38); background: radial-gradient(circle at 0 0, rgba(245, 180, 0, .14), transparent 48%), var(--surface, #fff); }
.hm-mix { background: radial-gradient(circle at 100% 0, rgba(255, 45, 85, .10), transparent 50%), var(--surface, #fff); }
.hm-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.hm-ico { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.hm-tw .hm-ico { filter: drop-shadow(0 5px 12px rgba(245, 180, 0, .45)); }
.hm-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-ht b { font-size: 18px; font-weight: 900; color: var(--text, #111); line-height: 1.2; }
.hm-ht small { font-size: 12px; color: var(--text-2, #666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-all { display: inline-flex; align-items: center; gap: 2px; padding: 6px 6px 6px 12px; border-radius: 18px; background: var(--surface-2, #f0f0f4); color: var(--text, #111) !important; font-weight: 800; font-size: 12.5px; white-space: nowrap; text-decoration: none !important; }
.hm-all .material-icons { font-size: 18px; }
.hm-all:hover { background: var(--surface-3, #e5e5eb); }

/* the top list: compact lines */
.hm-tw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; justify-content: space-around; }
.hm-tw-it { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; color: var(--text, #111) !important; text-decoration: none !important; transition: background .15s; }
.hm-tw-it:hover { background: var(--surface-2, #f0f0f4); }
.hm-tw-rk { flex: 0 0 26px; text-align: center; font-size: 17px; font-weight: 900; color: var(--text-2, #666); }
.hm-tw-it.is-podium .hm-tw-rk { font-size: 21px; }
.hm-tw-th { position: relative; flex: 0 0 124px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #000; }
.hm-tw-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-tw-th .timer { position: absolute; right: 4px; bottom: 4px; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-weight: 700; }
.hm-tw-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-tw-tx b { font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-tw-tx small { font-size: 12px; color: var(--text-2, #666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tw-bar { display: block; height: 3px; border-radius: 3px; background: var(--surface-3, #e5e5eb); overflow: hidden; margin-top: 3px; }
.hm-tw-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #f5b400, #ff6a3d); }

/* the mixes: 2 x 2 cards */
.hm-mx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; align-content: start; }
.hm-mx, .hm-mv { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--text, #111) !important; text-decoration: none !important; }
.hm-mx-mos { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 6px -6px 0 -2px var(--surface-3, #e5e5eb); margin-top: 6px; transition: transform .2s; }
.hm-mx:hover .hm-mx-mos { transform: translateY(-2px); }
.hm-mx-mos img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.hm-mx-mos.n1 img { grid-column: 1 / 3; grid-row: 1 / 3; }
.hm-mx-mos.n2 img { grid-row: 1 / 3; }
.hm-mx-mos.n3 img:first-child { grid-row: 1 / 3; }
.hm-mx-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 800; font-size: 13px; opacity: 0; transition: opacity .2s; }
.hm-mx:hover .hm-mx-play { opacity: 1; }
.hm-mx-n { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 11.5px; font-weight: 800; }
.hm-mx-n .material-icons, .hm-mx-play .material-icons { font-size: 16px; }
.hm-mx-tag { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 6px; background: #f5b400; color: #111; font-style: normal; font-size: 11px; font-weight: 900; }
.hm-mx-tx { display: flex; flex-direction: column; min-width: 0; }
.hm-mx-tx b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mx-tx small { font-size: 12px; color: var(--text-2, #666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* no mixes yet: small video cards of the same category */
.hm-mv-th { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.hm-mv-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-mv-th .timer { position: absolute; right: 5px; bottom: 5px; font-size: 11px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-weight: 700; }
.hm-mv b { font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-mv small { font-size: 12px; color: var(--text-2, #666); margin-top: -4px; }

@media (max-width: 1000px) { .hm-tm { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .hm-tw, .hm-mix { padding: 12px; border-radius: 18px; }
    .hm-tw-th { flex-basis: 92px; }
    .hm-ht b { font-size: 16px; }
    .hm-mx-grid { gap: 10px; }
    .hm-ht small { white-space: normal; }
}

/* v2: Top + Mixes much lower (about a third of the screen): small lines on the left, 4 small mixes per line on the right */
.hm-tm { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 14px; margin: 6px 0 22px; }
.hm-tw, .hm-mix { padding: 12px 14px; border-radius: 18px; }
.hm-h { margin: 0 0 8px; gap: 8px; }
.hm-ico { font-size: 22px; }
.hm-ht b { font-size: 16px; }
.hm-ht small { font-size: 11.5px; }
.hm-all { padding: 4px 4px 4px 10px; font-size: 12px; }
.hm-tw-list { gap: 2px; justify-content: flex-start; }
.hm-tw-it { gap: 10px; padding: 4px 6px; border-radius: 10px; }
.hm-tw-rk { flex-basis: 22px; font-size: 14px; }
.hm-tw-it.is-podium .hm-tw-rk { font-size: 17px; }
.hm-tw-th { flex-basis: 84px; border-radius: 7px; }
.hm-tw-th .timer { font-size: 9.5px; padding: 0 4px; right: 3px; bottom: 3px; }
.hm-tw-tx { gap: 1px; }
.hm-tw-tx b { font-size: 12.5px; -webkit-line-clamp: 1; }
.hm-tw-tx small { font-size: 11.5px; }
.hm-tw-bar { height: 2px; margin-top: 2px; }
.hm-mx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-mx, .hm-mv { gap: 5px; }
.hm-mx-mos { border-radius: 10px; margin-top: 4px; box-shadow: 4px -4px 0 -1px var(--surface-3, #e5e5eb); }
.hm-mx-tx small, .hm-mx-play { display: none; }
.hm-mx-tx b, .hm-mv b { font-size: 12.5px; }
.hm-mx-n { font-size: 10.5px; padding: 1px 5px; right: 4px; bottom: 4px; }
.hm-mx-n .material-icons { font-size: 13px; }
.hm-mx-tag { font-size: 9.5px; padding: 1px 6px; left: 4px; top: 4px; }
.hm-mv-th { border-radius: 10px; }
.hm-mv b { -webkit-line-clamp: 1; }
.hm-mv small { font-size: 11px; }
@media (max-width: 1000px) { .hm-tm { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .hm-mx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-mx-grid > :nth-child(n+5) { display: none; }
    .hm-tw-th { flex-basis: 76px; }
}
@media (max-width: 600px) { .hm-mix .hm-ht small { display: none; } .hm-tw .hm-ht small { white-space: nowrap; } }

/* v3: Top + Mixes about as tall as one row of videos */
.hm-tm { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; margin: 4px 0 18px; }
.hm-tw, .hm-mix { padding: 10px 12px; border-radius: 14px; }
.hm-h { margin: 0 0 6px; gap: 8px; }
.hm-ico { font-size: 18px; }
.hm-ht b { font-size: 14.5px; }
.hm-ht small { font-size: 11px; }
.hm-all { padding: 2px 2px 2px 8px; font-size: 11.5px; }
.hm-all .material-icons { font-size: 16px; }
.hm-tw-list { gap: 0; }
.hm-tw-it { gap: 8px; padding: 2px 4px; border-radius: 8px; }
.hm-tw-rk { flex-basis: 18px; font-size: 12px; }
.hm-tw-it.is-podium .hm-tw-rk { font-size: 14px; }
.hm-tw-th { flex-basis: 56px; border-radius: 5px; }
.hm-tw-th .timer { display: none; }
.hm-tw-tx b { font-size: 12px; line-height: 1.25; }
.hm-tw-tx small { font-size: 10.5px; }
.hm-tw-bar { display: none; }
.hm-mx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hm-mx-grid > :nth-child(n+5) { display: none; }
.hm-mx-mos { border-radius: 8px; margin-top: 3px; box-shadow: 3px -3px 0 -1px var(--surface-3, #e5e5eb); }
.hm-mx-tx b, .hm-mv b { font-size: 12px; }
.hm-mv small { display: none; }
.hm-mx-tag { font-size: 9px; padding: 1px 5px; }
@media (max-width: 1000px) { .hm-tm { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hm-mx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v3.1: the Top spread over the whole height (no crowding), a bit bigger pictures */
.hm-tw { display: flex; flex-direction: column; }
.hm-tw-list { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.hm-tw-list li { flex: 0 0 auto; }
.hm-tw-it { gap: 12px; padding: 3px 8px 3px 4px; border-radius: 10px; }
.hm-tw-rk { flex-basis: 22px; font-size: 13px; }
.hm-tw-it.is-podium .hm-tw-rk { font-size: 16px; }
.hm-tw-th { flex-basis: 64px; border-radius: 6px; }
.hm-tw-tx { gap: 2px; }
.hm-tw-tx b { font-size: 12.5px; }
.hm-tw-tx small { font-size: 11px; }
@media (max-width: 1000px) { .hm-tw-list { justify-content: flex-start; } }
.hm-tw-th { flex-basis: 56px; }
.hm-tw-it { padding: 2px 8px 2px 4px; }
.hm-tw-list { gap: 2px; }
