/**
 * Discover module: community, schedule, top anime, ranking, premieres, OSTs.
 * AnimeFLV palette: primary #01bcf3, accent #ff7e00, dark #313539.
 */

/* ---------- Shared ---------- */
.afl-disc-layout { display: flex; flex-wrap: wrap; align-items: flex-start; }
.afl-disc-layout > .afl-disc-main { order: 2; min-width: 0; }
.afl-disc-layout > .afl-disc-side { order: 1; }
.afl-disc-title { font-size: 1.75rem; font-weight: 300; color: #333; line-height: 1.25; margin: 0 0 16px; }
.afl-disc-title i { color: #ff7e00; margin-right: 4px; }
.afl-disc-title--schedule { font-size: 1.5rem; }
.afl-disc-subtitle { font-size: .875rem; font-weight: 700; text-transform: uppercase; color: #555; margin: 0 0 8px; }
.afl-disc-box { padding-bottom: 12px; overflow: hidden; }
.afl-disc-box > .Top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.afl-disc-box > .Top .Title i { color: #01bcf3; font-size: .9em; }
.afl-disc-top-btn { margin: 0 !important; }
.afl-disc-empty { color: #888; padding: 16px 0; margin: 0; }
.afl-disc-note { color: #777; font-size: .8125rem; margin: 0 0 12px; }
.afl-disc-muted { color: #888; }
.afl-disc-single { display: block; width: 100%; }
.afl-disc-comments { margin-top: 20px; }
.afl-disc-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #eee; }
.afl-disc-avatar--lg { width: 48px; height: 48px; }
.afl-disc-time { color: #999; font-size: .75rem; }
.afl-disc-time:before { margin-right: 3px; }

/* ---------- Links (pills) ---------- */
.afl-disc-links { margin: 0 0 20px; }
.afl-disc-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.afl-disc-pill { display: inline-block; padding: 6px 14px; border-radius: 30px; color: #fff !important; font-size: .8125rem; font-weight: 700; line-height: 1.4; background: #01bcf3; box-shadow: 0 2px 4px rgba(0,0,0,.12); transition: filter .2s; }
.afl-disc-pill:before { margin-right: 5px; }
.afl-disc-pill:hover { filter: brightness(1.1); text-decoration: none; }
.afl-disc-pill--1 { background: #ff7e00; }
.afl-disc-pill--2 { background: #e53935; }
.afl-disc-pill--3 { background: #313539; }

/* ---------- App card ---------- */
.afl-disc-app { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #01bcf3, #0194c0); color: #fff; border-radius: 6px; padding: 16px 20px; margin: 0 0 20px; }
.afl-disc-app__img { margin: 0; flex: 0 0 64px; }
.afl-disc-app__img img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.afl-disc-app__icon { flex: 0 0 56px; height: 56px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.afl-disc-app__body { flex: 1 1 auto; min-width: 0; }
.afl-disc-app__title { display: block; font-size: 1.125rem; margin-bottom: 2px; }
.afl-disc-app__body p { margin: 0; opacity: .95; }
.afl-disc-app__btn.Button { flex: 0 0 auto; background: #ff7e00 !important; color: #fff !important; margin: 0; white-space: nowrap; }

/* ---------- Activity feed ---------- */
.afl-disc-feed { list-style: none; margin: 0; padding: 0; }
.afl-disc-feed__item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.afl-disc-feed__item:last-child { border-bottom: 0; }
.afl-disc-feed__body { min-width: 0; flex: 1 1 auto; }
.afl-disc-feed__head { margin: 0; line-height: 1.4; color: #666; overflow-wrap: anywhere; }
.afl-disc-feed__head a { font-weight: 700; color: #01bcf3; }
.afl-disc-feed__head .afl-disc-user { color: #ff7e00; }
.afl-disc-feed__text { margin: 6px 0 0; padding: 8px 10px; background: #f6f7f9; border-radius: 4px; color: #555; font-size: .8125rem; overflow-wrap: anywhere; }

/* ---------- Recent playlists ---------- */
.afl-disc-pls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.afl-disc-pl { display: flex; gap: 10px; align-items: center; background: #f6f7f9; border-radius: 6px; padding: 8px; min-width: 0; }
.afl-disc-pl__thumb { position: relative; flex: 0 0 96px; height: 56px; border-radius: 4px; overflow: hidden; background: #313539; display: block; }
.afl-disc-pl__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.afl-disc-pl__count { position: absolute; right: 0; bottom: 0; background: rgba(0,0,0,.75); color: #fff; font-size: .6875rem; padding: 2px 6px; border-top-left-radius: 4px; }
.afl-disc-pl__body { min-width: 0; }
.afl-disc-pl__title { display: block; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afl-disc-pl__meta { margin: 2px 0 0; color: #888; font-size: .75rem; }
.afl-disc-pl__meta a { color: #ff7e00; }

/* ---------- Sidebar widgets ---------- */
.afl-disc-wdgt .Bod { padding: 0 15px 10px; }
.afl-disc-wdgt .Top:before { color: #ff7e00; }
.afl-disc-users, .afl-disc-ostlist, .afl-disc-plside { list-style: none; margin: 0; padding: 0; }
.afl-disc-users__item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.afl-disc-users__item:last-child { border-bottom: 0; }
.afl-disc-users__item .afl-disc-avatar { width: 36px; height: 36px; }
.afl-disc-users__body { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.afl-disc-users__body strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.afl-disc-users__body span { color: #888; font-size: .75rem; }
.afl-disc-users__body span:before { margin-right: 3px; color: #01bcf3; }
.afl-disc-users__link { flex: 0 0 auto; font-size: .6875rem; font-weight: 700; color: #fff !important; background: #01bcf3; border-radius: 30px; padding: 3px 9px; }
.afl-disc-rank { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #e9ecef; color: #555; font-weight: 700; font-size: .75rem; display: flex; align-items: center; justify-content: center; }
.afl-disc-rank--1 { background: #ffc107; color: #fff; }
.afl-disc-rank--2 { background: #adb5bd; color: #fff; }
.afl-disc-rank--3 { background: #cd7f32; color: #fff; }
.afl-disc-ostlist li + li, .afl-disc-plside li + li { border-top: 1px solid #f0f0f0; }
.afl-disc-ostlist__link { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: #333; }
.afl-disc-ostlist__thumb { position: relative; flex: 0 0 64px; height: 40px; border-radius: 4px; overflow: hidden; background: #313539; display: flex; align-items: center; justify-content: center; color: #fff; }
.afl-disc-ostlist__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.afl-disc-ostlist__thumb:before { position: relative; z-index: 1; }
.afl-disc-ostlist__body { min-width: 0; line-height: 1.3; }
.afl-disc-ostlist__body strong, .afl-disc-ostlist__body small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afl-disc-ostlist__body small { color: #888; }
.afl-disc-plside a { display: block; padding: 8px 0 8px 22px; position: relative; color: #333; line-height: 1.3; }
.afl-disc-plside a:before { position: absolute; left: 0; top: 10px; color: #01bcf3; }
.afl-disc-plside strong, .afl-disc-plside small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afl-disc-plside small { color: #888; }

/* ---------- Schedule ---------- */
.afl-disc-banner { position: relative; border-radius: 6px; overflow: hidden; margin: 0 0 20px; background: linear-gradient(120deg, #313539 0%, #01bcf3 100%); background-size: cover; background-position: center; min-height: 120px; display: flex; align-items: center; }
.afl-disc-banner.has-image:before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.15)); }
.afl-disc-banner__in { position: relative; padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.afl-disc-banner__title { color: #fff; font-size: 1.75rem; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.afl-disc-banner__btn.Button { background: #ff7e00 !important; color: #fff !important; margin: 0; }
.afl-disc-daybar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; }
.afl-disc-days { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 6px; flex: 1 1 520px; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.afl-disc-days li { flex: 0 0 auto; }
.afl-disc-day-tab { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 30px; background: #f1f3f5; color: #555 !important; font-weight: 700; font-size: .8125rem; white-space: nowrap; text-decoration: none !important; }
.afl-disc-day-tab:hover { background: #e3e7eb; }
.afl-disc-day-tab.is-active, .afl-disc-day-tab[aria-selected="true"] { background: #01bcf3; color: #fff !important; }
.afl-disc-day-count { font-style: normal; font-size: .6875rem; background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 6px; }
.afl-disc-today { display: inline-block; background: #ff7e00; color: #fff; font-size: .625rem; font-weight: 700; border-radius: 10px; padding: 1px 6px; letter-spacing: .03em; vertical-align: middle; }
.afl-disc-filter { position: relative; flex: 0 1 240px; min-width: 180px; }
.afl-disc-filter .form-control { padding-right: 32px; border-radius: 30px; height: 36px; }
.afl-disc-filter i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #aaa; pointer-events: none; }
.afl-disc-day { margin: 0 0 20px; }
.afl-disc-dayhead { font-size: 1.125rem; font-weight: 700; color: #333; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid #f1f3f5; }
.afl-disc-dayhead:before { color: #01bcf3; margin-right: 6px; }
.js-afl-disc .afl-disc-day:not(.is-shown) { display: none; }
.js-afl-disc .afl-disc-filtering .afl-disc-day.is-match { display: block; }
.js-afl-disc .afl-disc-filtering .afl-disc-day:not(.is-match) { display: none; }
.ListAnimes.afl-disc-sched-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.afl-disc-sched-grid > li.afl-disc-card { width: auto !important; float: none !important; padding: 0 !important; margin: 0 !important; }
.afl-disc-card[hidden] { display: none !important; }
.afl-disc-card__in { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.12); height: 100%; display: flex; flex-direction: column; }
.afl-disc-card__poster { position: relative; aspect-ratio: 2 / 3; background: #313539; overflow: hidden; }
.afl-disc-card__img, .afl-disc-card__img img { display: block; width: 100%; height: 100%; }
.afl-disc-card__img img { object-fit: cover; transition: transform .3s; }
.afl-disc-card__in:hover .afl-disc-card__img img { transform: scale(1.05); }
.afl-disc-card__poster > .Type { position: absolute !important; left: 8px !important; top: 8px !important; right: auto !important; bottom: auto !important; margin: 0 !important; transform: none !important; z-index: 2; }
.afl-disc-card__time { position: absolute; right: 8px; bottom: 44px; z-index: 2; background: rgba(0,0,0,.7); color: #fff; font-size: .6875rem; border-radius: 10px; padding: 1px 7px; }
.afl-disc-card__done { position: absolute; left: 0; right: 0; top: 40%; z-index: 2; text-align: center; background: rgba(229,57,53,.9); color: #fff; font-size: .75rem; text-transform: uppercase; padding: 3px 0; }
.afl-disc-card__poster .afl-save-icon { position: absolute; right: 8px; top: 8px; z-index: 3; }
.afl-disc-card__title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 28px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff !important; text-decoration: none !important; }
.afl-disc-card__title h3 { margin: 0; font-size: .8125rem; font-weight: 700; line-height: 1.25; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.afl-disc-card__last { display: flex; flex-direction: column; padding: 6px 8px 8px; font-size: .75rem; color: #555 !important; line-height: 1.35; text-decoration: none !important; }
.afl-disc-card__last span { font-weight: 700; color: #01bcf3; }
.afl-disc-card__last time { color: #999; }

/* ---------- Filters, tabs, ranking lists ---------- */
.afl-disc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.afl-disc-filters .form-group { margin: 0; flex: 1 1 160px; min-width: 0; }
.afl-disc-filters label { display: block; font-size: .75rem; font-weight: 700; color: #666; margin-bottom: 3px; }
.afl-disc-filters .btn { flex: 0 0 auto; }
.afl-disc-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.afl-disc-head-row .BtnNw { margin: 0; }
.afl-disc-tabs { margin: 0 0 12px; max-width: 100%; }
.afl-disc-head-row .afl-disc-tabs { margin: 0; }
.afl-disc-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.afl-disc-tabs li { flex: 0 0 auto; }
.afl-disc-tabs a { display: block; padding: 7px 14px; border-radius: 30px; background: #f1f3f5; color: #555; font-weight: 700; font-size: .8125rem; white-space: nowrap; }
.afl-disc-tabs li.is-active a { background: #01bcf3; color: #fff; }
.afl-disc-ranklist { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.afl-disc-rankrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.afl-disc-rankrow:last-child { border-bottom: 0; }
.afl-disc-rankrow .afl-disc-rank { flex-basis: 32px; height: 32px; font-size: .875rem; }
.afl-disc-rankrow__img { flex: 0 0 48px; height: 68px; border-radius: 4px; overflow: hidden; background: #313539; }
.afl-disc-rankrow__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.afl-disc-rankrow__body { flex: 1 1 auto; min-width: 0; }
.afl-disc-rankrow__title { display: block; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afl-disc-rankrow__meta { margin: 3px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .75rem; }
.afl-disc-rankrow__meta .Type, .afl-disc-rankrow__meta .Vts { position: static !important; float: none !important; display: inline-block; margin: 0 !important; transform: none !important; left: auto; right: auto; top: auto; bottom: auto; width: auto; }
.afl-disc-rankrow__meta .Type { width: auto !important; height: auto !important; min-width: 0 !important; padding: 1px 8px !important; line-height: 1.4 !important; font-size: .625rem; white-space: nowrap; overflow: visible !important; text-indent: 0 !important; }
.afl-disc-rankrow__meta .Vts { color: #ff7e00; font-size: .75rem; line-height: 1.4; padding: 0; background: none; }
.afl-disc-rankrow__meta { justify-content: flex-start; }
.afl-disc-rankrow__value { flex: 0 0 auto; align-self: center; color: #01bcf3; font-size: 1rem; font-weight: 700; white-space: nowrap; }

/* ---------- OSTs on the anime page ---------- */
.afl-disc-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.afl-disc-kind { border: 0; border-radius: 30px; background: #f1f3f5; color: #555; font-weight: 700; font-size: .75rem; padding: 5px 12px; cursor: pointer; }
.afl-disc-kind.is-active { background: #01bcf3; color: #fff; }
.afl-disc-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; margin: 0 0 10px; }
.afl-disc-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.afl-disc-ostrows { list-style: none; margin: 0; padding: 0; }
.afl-disc-ostrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.afl-disc-ostrow:last-child { border-bottom: 0; }
.afl-disc-ostrow[hidden] { display: none; }
.afl-disc-ostrow__play { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 0; background: #ff7e00; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; padding: 0 0 0 2px; }
.afl-disc-ostrow__play.is-playing { background: #01bcf3; }
.afl-disc-ostrow__play.is-disabled { background: #ced4da; cursor: default; padding: 0; }
.afl-disc-ostrow__text { margin: 0; min-width: 0; color: #444; overflow-wrap: anywhere; }
.afl-disc-ostrow__artist { color: #888; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.afl-disc-layout > .afl-disc-main, .afl-disc-layout > .afl-disc-side { order: 0; width: 100%; }
}
@media (max-width: 768px) {
	.afl-disc-title { font-size: 1.375rem; }
	.afl-disc-title--schedule { font-size: 1.125rem; }
	.afl-disc-pls { grid-template-columns: minmax(0, 1fr); }
	.afl-disc-daybar { display: block; max-width: 100%; }
	.afl-disc-days { max-width: 100%; }
	.afl-disc-filter { width: 100%; min-width: 0; margin-top: 10px; }
	.afl-disc-filter .form-control { width: 100%; box-sizing: border-box; }
	.ListAnimes.afl-disc-sched-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
	.afl-disc-banner__title { font-size: 1.25rem; }
}
@media (max-width: 480px) {
	.afl-disc-app { flex-wrap: wrap; }
	.afl-disc-app__btn.Button { width: 100%; text-align: center; }
	.ListAnimes.afl-disc-sched-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.afl-disc-filters .form-group { flex-basis: 100%; }
	.afl-disc-filters .btn { width: 100%; }
	.afl-disc-rankrow { gap: 8px; }
	.afl-disc-rankrow__img { flex-basis: 40px; height: 56px; }
}
