/* Discovery page */
.discovery {
    --discovery-bg: #080808;
    --discovery-surface: #141414;
    --discovery-card: #1b1b1b;
    --discovery-red: #e50914;
    --discovery-text: #fff;
    --discovery-muted: #aaa;
    --discovery-line: rgba(255, 255, 255, .1);
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 132px 42px 90px;
    min-height: 75vh;
    color: var(--discovery-text);
    font-family: IRANSans, Vazirmatn, Tahoma, Arial, sans-serif;
    margin-top: 32px;
}
.discovery__hero {
    position: relative;
    padding: 28px 20px 45px;
    text-align: center;
}
.discovery__hero > span,
.discovery__filter-heading span,
.discovery__results-head > div > span {
    color: var(--discovery-red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .65px;
}
.discovery__hero h1 {
    margin: 7px 0 23px;
    font-size: clamp(27px, 3vw, 42px);
    font-weight: 900;
    letter-spacing: -.8px;
}
.discovery__search {
    position: relative;
    width: min(860px, 100%);
    margin: 0 auto;
}
.discovery__search input {
    width: 100%;
    height: 64px;
    padding: 0 22px 0 76px;
    border: 1px solid rgba(229, 9, 20, .3);
    border-radius: 14px;
    outline: 0;
    background: linear-gradient(100deg, #181818, #111);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
    color: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.discovery__search input::placeholder { color: #737373; }
.discovery__search input:focus {
    border-color: var(--discovery-red);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, .11), 0 18px 44px rgba(0, 0, 0, .25);
}
.discovery__search button {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: var(--discovery-red);
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.discovery__search button:hover { background: #f6121d; transform: scale(1.04); }
.discovery__search button i { font-size: 20px; }
.discovery__chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}
.discovery__chips button,
.discovery__reset {
    border: 1px solid var(--discovery-line);
    border-radius: 30px;
    background: rgba(255,255,255,.035);
    color: #bbb;
    padding: 7px 13px;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: .2s ease;
}
.discovery__chips button:hover {
    border-color: rgba(229,9,20,.55);
    background: rgba(229,9,20,.1);
    color: #fff;
}
.discovery__layout {
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}
.discovery__filters {
    position: sticky;
    top: 94px;
    padding: 18px;
    border: 1px solid var(--discovery-line);
    border-radius: 16px;
    background: linear-gradient(145deg, #181818, #111);
    box-shadow: 0 18px 40px rgba(0,0,0,.16);
}
.discovery__filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.discovery__filter-heading h2 {
    margin: 1px 0 0;
    font-size: 18px;
    font-weight: 800;
}
.discovery__reset-icon {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    padding: 0;
    border: 1px solid var(--discovery-line);
    border-radius: 50%;
    background: transparent;
    color: #999;
    cursor: pointer;
}
.discovery__reset-icon:hover { color: #fff; border-color: #555; }
.discovery__filter {
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.discovery__filter label {
    display: block;
    margin-bottom: 7px;
    color: #aaa;
    font-size: 11px;
}
.discovery__filters select {
    width: 100%;
    min-height: 39px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #202020;
    color: #eee;
    font: inherit;
    font-size: 11px;
    outline-color: var(--discovery-red);
}
.discovery__reset {
    width: 100%;
    margin-top: 6px;
    border-radius: 9px;
}
.discovery__reset:hover { border-color: #666; color: #fff; }
.discovery__results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 3px 0 17px;
}
.discovery__results-head h2 {
    margin: 1px 0 2px;
    font-size: 23px;
    font-weight: 900;
}
.discovery__results-head p {
    margin: 0;
    color: #777;
    font-size: 11px;
}
.discovery__result-note {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
}
.discovery__result-note i { color: var(--discovery-red); font-size: 17px; }
.discovery__suggestions {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 19px;
    padding: 14px 16px;
    border: 1px solid rgba(229,9,20,.2);
    border-radius: 13px;
    background: linear-gradient(100deg, rgba(229,9,20,.1), rgba(255,255,255,.025));
}
.discovery__suggestion-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: rgba(229,9,20,.14);
    color: #ff5961;
}
.discovery__suggestions strong { font-size: 12px; }
.discovery__suggestions p { margin: 1px 0 0; color: #989898; font-size: 10px; }
.discovery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.discovery__card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--discovery-line);
    border-radius: 13px;
    background: var(--discovery-card);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.discovery__card a { display: block; color: inherit; text-decoration: none; }
.discovery__card:hover {
    z-index: 1;
    transform: translateY(-6px);
    border-color: rgba(229,9,20,.45);
    box-shadow: 0 20px 38px rgba(0,0,0,.38);
}
.discovery__poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #242424;
}
.discovery__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .35s ease; }
.discovery__poster-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 20px;
    background: linear-gradient(145deg, #3a1417, #171717);
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}
.discovery__poster-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent 48%); transition: background .3s; }
.discovery__play {
    position: absolute;
    bottom: 11px;
    left: 11px;
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #151515;
    opacity: 0;
    transform: translateY(7px);
    transition: .25s ease;
}
.discovery__play i { margin-right: 2px; font-size: 17px; }
.discovery__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 7px;
    border-radius: 5px;
    background: var(--discovery-red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}
.discovery__card:hover .discovery__poster img { transform: scale(1.055); filter: brightness(.73); }
.discovery__card:hover .discovery__play { opacity: 1; transform: translateY(0); }
.discovery__card-info { padding: 11px 11px 12px; }
.discovery__card-info h3 {
    overflow: hidden;
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.discovery__meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: #888; font-size: 10px; }
.discovery__meta i { width: 3px; height: 3px; border-radius: 50%; background: #666; }
.discovery__meta strong { margin-right: auto; color: #e8b84b; font: 700 10px Arial, sans-serif; direction: ltr; }
.discovery__empty {
    padding: 65px 20px;
    border: 1px dashed #3b3b3b;
    border-radius: 15px;
    background: rgba(255,255,255,.018);
    color: #999;
    text-align: center;
}
.discovery__empty > div { color: #555; font-size: 40px; }
.discovery__empty h3 { margin: 7px 0 3px; color: #fff; font-size: 18px; }
.discovery__empty p { margin: 0; font-size: 12px; }
.discovery__empty button {
    margin-top: 18px;
    padding: 9px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--discovery-red);
    color: #fff;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
@media (max-width: 1100px) {
    .discovery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
    .discovery { padding: 105px 22px 65px; }
    .discovery__layout { grid-template-columns: 1fr; }
    .discovery__filters { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 15px; }
    .discovery__filter-heading, .discovery__reset { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .discovery { padding: 88px 14px 45px; }
    .discovery__hero { padding: 10px 0 28px; }
    .discovery__hero h1 { margin-bottom: 18px; font-size: 27px; }
    .discovery__search input { height: 55px; padding-left: 65px; font-size: 12px; }
    .discovery__search button { top: 7px; left: 7px; width: 41px; height: 41px; }
    .discovery__chips { justify-content: flex-start; }
    .discovery__chips button { font-size: 10px; }
    .discovery__layout { gap: 18px; }
    .discovery__filters { padding: 14px; border-radius: 12px; }
    .discovery__results-head { align-items: flex-start; }
    .discovery__results-head h2 { font-size: 18px; }
    .discovery__result-note { display: none; }
    .discovery__suggestions { align-items: flex-start; }
    .discovery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .discovery__card { border-radius: 10px; }
    .discovery__card-info { padding: 8px 9px 10px; }
    .discovery__card-info h3 { font-size: 12px; }
}
.discovery__lazy-sentinel { height: 1px; }
.discovery__lazy-status {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 17px;
    color: #8d8d8d;
    font-size: 11px;
}
.discovery__lazy-status.is-loading,
.discovery__lazy-status.is-complete,
.discovery__lazy-status.is-error { display: flex; }
.discovery__lazy-status span {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,.18);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: discovery-spin .7s linear infinite;
}
.discovery__lazy-status.is-complete { color: #767676; }
.discovery__lazy-status.is-error { color: #f27878; }
@keyframes discovery-spin {
    to { transform: rotate(360deg); }
}
