:root {
    --primary: #ff4d6d;
    --primary-dark: #d93658;
    --secondary: #ff8fa3;
    --ink: #0c0d12;
    --darker: #111219;
    --dark: #191b24;
    --surface: #20232e;
    --surface-soft: #292c38;
    --light: #f7f7fa;
    --muted: #aeb3c2;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --transition: 180ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 143, 163, 0.42) #111219;
}

html::-webkit-scrollbar {
    width: 9px;
}

html::-webkit-scrollbar-track {
    background: #111219;
}

html::-webkit-scrollbar-thumb {
    border: 2px solid #111219;
    border-radius: 999px;
    background: rgba(255, 143, 163, 0.42);
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 143, 163, 0.68);
}

body,
button,
input {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-width: 280px;
    background:
        radial-gradient(circle at 90% 26%, rgba(255, 77, 109, 0.08), transparent 26rem),
        var(--darker);
    color: var(--light);
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid rgba(255, 143, 163, 0.95);
    outline-offset: 3px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto minmax(240px, 430px) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    width: 100%;
    min-height: 76px;
    padding: 12px clamp(24px, 4vw, 60px);
    background: linear-gradient(to bottom, rgba(7, 8, 12, 0.9), rgba(7, 8, 12, 0));
    transition: background-color var(--transition), box-shadow var(--transition);
}

header.scrolled,
header.menu-open {
    background: rgba(17, 18, 25, 0.98);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(19, 21, 29, 0.68);
    color: var(--light);
    font-size: 0.94rem;
    transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.search-container input::placeholder {
    color: #b3b6c0;
}

.search-container input:focus {
    border-color: rgba(255, 143, 163, 0.75);
    outline: none;
    background: rgba(25, 27, 36, 0.94);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.12);
}

.search-container input::-webkit-search-cancel-button {
    filter: invert(1);
}

.search-button {
    position: absolute;
    top: 50%;
    right: 5px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color var(--transition), color var(--transition);
}

.search-button:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(12px, 1.5vw, 24px);
}

.nav-links a {
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 3px;
    background: #fff;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Hero: se conserva el banner principal y su imagen actual. */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px;
    margin-bottom: 50px;
    scroll-margin-top: 76px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/hero-bg.jpg") no-repeat center center/cover;
    filter: brightness(0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    margin-bottom: 20px;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 1.02;
    text-wrap: balance;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.62);
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffd166;
}

.year,
.episodes,
.hero-country {
    color: #d1d4dc;
}

.hero-description {
    max-width: 58ch;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(74, 75, 83, 0.78);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(95, 97, 108, 0.9);
}

main {
    display: block;
    scroll-margin-top: 92px;
}

.container {
    width: min(100%, 1520px);
    margin: 0 auto 58px;
    padding: 0 clamp(24px, 4vw, 60px);
}

.catalog-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 26px;
}

.catalog-intro h2 {
    margin-top: 5px;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.catalog-intro p {
    max-width: 46ch;
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow {
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.filter-section {
    position: sticky;
    top: 82px;
    z-index: 40;
    margin-bottom: 44px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(24, 26, 35, 0.98);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.category {
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #c6c9d3;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.category:hover {
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.category.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.catalog-section {
    scroll-margin-top: 156px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.section-title i {
    color: var(--primary);
}

.result-count {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.carousel-shell {
    position: relative;
}

.carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px 18px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 35%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 42px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: rgba(12, 13, 18, 0.88);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), background-color var(--transition);
}

.carousel-btn:hover:not(:disabled) {
    background: var(--primary);
    transform: translateY(-2px);
}

.carousel-btn:disabled {
    pointer-events: none;
    opacity: 0;
}

.carousel-btn.prev {
    left: -18px;
}

.carousel-btn.next {
    right: -18px;
}

.drama-card {
    flex: 0 0 220px;
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(165deg, #232631, #191b23);
    contain: layout style;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
    transition: transform var(--transition), border-color var(--transition);
}

.drama-card:hover {
    border-color: rgba(255, 143, 163, 0.42);
    transform: translateY(-3px);
}

.card-poster,
.modal-poster {
    position: relative;
    overflow: hidden;
    background: #171922;
}

.card-poster {
    aspect-ratio: 2 / 3;
}

.card-poster img,
.modal-poster img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 180ms ease;
}

.drama-card:hover .card-poster img {
    transform: scale(1.035);
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    text-align: center;
}

.fallback-1 {
    background: linear-gradient(145deg, #42275a, #734b6d);
}

.fallback-2 {
    background: linear-gradient(145deg, #16222a, #3a6073);
}

.fallback-3 {
    background: linear-gradient(145deg, #3f0d12, #a71d31);
}

.fallback-4 {
    background: linear-gradient(145deg, #1d4350, #a43931);
}

.fallback-5 {
    background: linear-gradient(145deg, #232526, #414345);
}

.fallback-mark {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}

.fallback-title {
    max-width: 15ch;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
}

.fallback-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.72rem;
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: 38%;
    background: linear-gradient(to top, rgba(8, 9, 13, 0.78), transparent);
    pointer-events: none;
}

.rating-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(11, 12, 17, 0.92);
    font-size: 0.76rem;
    font-weight: 800;
}

.rating-badge {
    left: 12px;
    color: #ffd166;
}

.favorite-card-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(11, 12, 17, 0.92);
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
}

.favorite-card-btn:hover,
.favorite-card-btn[aria-pressed="true"] {
    background: var(--primary);
    transform: scale(1.03);
}

.card-content {
    display: flex;
    flex-direction: column;
    min-height: 184px;
    padding: 15px;
}

.card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    min-height: 2.7rem;
}

.card-heading h3 {
    display: -webkit-box;
    min-width: 0;
    min-height: 2.7em;
    overflow: hidden;
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.card-heading > span {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.card-country {
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.76rem;
}

.card-country i {
    margin-right: 4px;
    color: var(--secondary);
}

.genre-list,
.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-list {
    margin: 11px 0 14px;
}

.genre-list span,
.modal-genres span {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #d5d7de;
    font-size: 0.67rem;
}

.detail-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding: 8px 0 0;
    border: 0;
    background: transparent;
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.detail-button i {
    transition: transform var(--transition);
}

.detail-button:hover i {
    transform: translateX(4px);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 22px;
}

.catalog-grid .drama-card {
    width: 100%;
}

.empty-state {
    max-width: 620px;
    margin: 30px auto 70px;
    padding: 50px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.17);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.025);
    text-align: center;
}

.empty-state > i {
    margin-bottom: 18px;
    color: var(--primary);
    font-size: 2rem;
}

.empty-state h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.empty-state p {
    margin-bottom: 22px;
    color: var(--muted);
}

footer {
    margin-top: 80px;
    padding: 50px clamp(24px, 4vw, 60px);
    border-top: 1px solid var(--line);
    background: #14161d;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.social-icons button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}

.social-icons button:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.copyright {
    color: #888d9b;
    font-size: 0.82rem;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 4, 7, 0.9);
}

.episode-grid,
.modal-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 143, 163, 0.42) transparent;
}

.episode-grid::-webkit-scrollbar,
.modal-panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.episode-grid::-webkit-scrollbar-track,
.modal-panel::-webkit-scrollbar-track {
    background: transparent;
}

.episode-grid::-webkit-scrollbar-thumb,
.modal-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 143, 163, 0.34);
}

.episode-grid::-webkit-scrollbar-thumb:hover,
.modal-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 143, 163, 0.58);
}

.modal-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
    width: min(900px, 100%);
    max-height: min(680px, 92vh);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: #1a1c25;
    box-shadow: var(--shadow);
}

.modal-poster {
    min-height: 540px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(12, 13, 18, 0.84);
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
}

.modal-close:hover {
    background: var(--primary);
    transform: rotate(5deg);
}

.modal-content {
    align-self: center;
    padding: 48px clamp(28px, 5vw, 58px) 42px;
}

.modal-content h2 {
    margin: 7px 45px 12px 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.modal-original-title {
    margin: -4px 45px 14px 0;
    color: var(--secondary) !important;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.4 !important;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
}

.modal-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #d9dbe2;
    font-size: 0.75rem;
    font-weight: 700;
}

.modal-meta span:first-child {
    color: #ffd166;
}

.modal-content > p {
    color: #c2c5cf;
    line-height: 1.75;
}

.modal-genres {
    margin: 20px 0;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 28px;
}

.detail-list div {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.detail-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.detail-list dd {
    font-size: 0.9rem;
    font-weight: 750;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 400;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 17px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: #292c37;
    box-shadow: var(--shadow);
    color: #fff;
    font-size: 0.86rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity var(--transition), transform var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


.player-view {
    min-height: 100vh;
    padding: 116px clamp(18px, 4vw, 60px) 70px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 77, 109, 0.16), transparent 30rem),
        linear-gradient(180deg, #0b0c12 0%, #14161e 100%);
}

.player-shell {
    width: min(100%, 1520px);
    margin: 0 auto;
}

.player-back {
    margin-bottom: 24px;
}

.player-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 22px;
}

.player-heading h2 {
    margin-top: 6px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
}

.player-heading p {
    margin-top: 10px;
    color: var(--muted);
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.player-sidebar,
.player-main {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(32, 35, 46, 0.96), rgba(19, 21, 29, 0.96));
    box-shadow: var(--shadow);
}

.player-sidebar {
    position: sticky;
    top: 98px;
    padding: 16px;
}

.player-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 18px;
    background: #171922;
}

.player-poster img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.player-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.player-season-select {
    width: 100%;
    min-height: 42px;
    margin-bottom: 16px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #12141b;
    color: #fff;
    font-weight: 750;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 48vh;
    overflow: auto;
    padding-right: 4px;
}

.episode-button {
    min-height: 68px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition), opacity var(--transition);
}

.episode-button:hover:not(:disabled),
.episode-button.active {
    border-color: rgba(255, 143, 163, 0.78);
    background: rgba(255, 77, 109, 0.18);
    transform: translateY(-2px);
}

.episode-button span,
.episode-button small {
    display: block;
}

.episode-button span {
    margin-bottom: 6px;
    font-size: 0.86rem;
    font-weight: 850;
}

.episode-button small {
    color: var(--muted);
    font-size: 0.7rem;
}

.episode-button small i {
    margin-right: 4px;
}

.episode-button:disabled,
.episode-button.disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.player-main {
    padding: clamp(14px, 2vw, 22px);
}

.player-stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 77, 109, 0.14), transparent 36%),
        #05060a;
}

.player-stage iframe,
.player-stage video {
    grid-area: 1 / 1;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.player-stage video {
    object-fit: contain;
}

.player-loader {
    grid-area: 1 / 1;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: #151721;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.player-loader i {
    color: var(--secondary);
}

.ad-preroll-screen {
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 77, 109, 0.14), transparent 42%),
        #05060a;
}

.ad-preroll-content-video,
.ad-preroll-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ad-preroll-content-video {
    z-index: 1;
    object-fit: contain;
}

.ad-preroll-container {
    z-index: 2;
}

.ad-preroll-label {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(8, 9, 14, 0.82);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
}

.ad-preroll-status[hidden] {
    display: none;
}

.ad-preroll-status {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    padding: 24px;
    background: rgba(5, 6, 10, 0.82);
    text-align: center;
    pointer-events: none;
}

.ad-preroll-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(21, 23, 33, 0.96);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 750;
}

.ad-preroll-loader i {
    color: var(--secondary);
    animation: ad-preroll-spin 850ms linear infinite;
}

.ad-preroll-loader .fa-triangle-exclamation {
    animation: none;
}

.ad-continue-button {
    position: relative;
    z-index: 1;
    min-width: min(100%, 250px);
    pointer-events: auto;
}

.ad-continue-button[hidden] {
    display: none;
}

@keyframes ad-preroll-spin {
    to {
        transform: rotate(1turn);
    }
}

.player-state {
    display: grid;
    justify-items: center;
    max-width: 520px;
    padding: 32px 22px;
    color: #fff;
    text-align: center;
}

.player-state > i {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: var(--secondary);
    font-size: 1.45rem;
}

.player-state h3 {
    margin-bottom: 8px;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.player-state p {
    color: var(--muted);
    line-height: 1.65;
}


.next-episode-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 4, 8, 0.9);
    animation: next-episode-in 160ms ease-out both;
}

.next-episode-card {
    display: grid;
    justify-items: center;
    width: min(100%, 430px);
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(31, 33, 44, 0.98), rgba(14, 15, 22, 0.98));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
    color: #fff;
    text-align: center;
}

.next-episode-card > i {
    margin-bottom: 14px;
    color: var(--secondary);
    font-size: 2rem;
}

.next-episode-kicker {
    margin-bottom: 7px;
    color: var(--secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.next-episode-card h3 {
    margin-bottom: 20px;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.next-episode-button {
    min-width: min(100%, 270px);
}

.next-episode-button strong {
    display: inline-grid;
    place-items: center;
    min-width: 1.35em;
    margin-left: 2px;
    font-size: 1.05em;
}

.next-episode-cancel {
    margin-top: 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.next-episode-cancel:hover {
    color: #fff;
}

@keyframes next-episode-in {
    from {
        opacity: 0;
        transform: scale(1.015);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.external-watch-button {
    margin-top: 22px;
    text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
