﻿/* =============================
   RESET
============================= */
html,
body {
    height: 100%;
    font-size: 16px;
}

/* Web-only default zoom (desktop browser preview), not applied on webOS TV runtime. */
html.web-zoom-70 {
    zoom: 0.7;
}

@supports not (zoom: 1) {
    html.web-zoom-70 body {
        transform: scale(0.7);
        transform-origin: top left;
        width: calc(100% / 0.7);
        height: calc(100% / 0.7);
    }
}

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

body {
    background: #000;
    color: #fff;
    font-family: "Cairo", Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
}

.splash-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.splash-screen img {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.splash-screen.splash-hidden {
    opacity: 0;
    pointer-events: none;
}

* {
    -webkit-tap-highlight-color: transparent;
    z-index: 4;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Larger base type for TV viewing (enabled via `body.tv-ui` from `app.js`). */
body.tv-ui {
    font-size: 30px;
}

/* Global scale down ~30% */
body {
    zoom: 1;
    transform-origin: top left;
}

body.tv-ui button {
    border-radius: 12px;
}

body.tv-ui input,
body.tv-ui select,
body.tv-ui textarea {
    padding: 16px 18px;
    border-radius: 12px;
    font-size: 28px;
}

#magic-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-100px, -100px);
    z-index: 9999;
    display: none;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

#magic-cursor.active {
    display: block;
}

#iptv-ads {
    display: none !important;
}

#video-ad-overlay {
    display: none !important;
}

body.rtl {
    direction: rtl;
}

body.rtl .top-menu {
    margin-left: 0;
    margin-right: 0;
}

body.rtl .profile-dropdown {
    right: auto;
    left: 0;
}

body.screen-home {
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.screen-home::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.screen-home #home-screen {
    overflow: visible;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.screen-home #home-screen::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.screen-home .home-content {
    /* max-height: calc(100vh - 120px); */
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.screen-home .home-content .rail {
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding-top: 16px;
    padding-inline: 10px;
    margin-inline: -10px;
}

body.screen-home .home-content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Hide scrollbar visuals on details screen (scroll stays enabled). */
body.screen-details #details-screen {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.screen-details #details-screen::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.screen-details #details-screen {
    overflow-y: auto !important;
    height: auto;
    max-height: none;
}

body.screen-details {
    height: 100%;
    max-height: none;
    overflow-y: auto !important;
}

body.screen-details .hero-content {
    padding: 96px 80px 10px;
}

body.screen-details .episodes-header {
    margin: 25px 80px 21px;
}

body.screen-details #episodes-row {
    margin: 0 80px 8px;
}

.lang-switcher {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 10050;
}

.lang-switcher button {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
}

body.rtl .lang-switcher {
    right: auto;
    left: 24px;
}

.focusable:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.rail-card:focus,
.episode-card:focus,
.plan-card:focus,
.profile-card:focus,
.season-btn:focus,
.settings-tab:focus,
.profile-menu-btn:focus,
.back-btn:focus,
.play-btn:focus,
.trailer-btn:focus,
.trailer-close-btn:focus,
.fav-btn:focus,
.see-all:focus {
    outline: none;
    box-shadow: none;
}

.focusable:focus-visible,
.focusable:focus {
    outline: none !important;
    box-shadow: none !important;
    background: inherit !important;
}

/* =============================
   COMMON
============================= */

.logo-big {
    font-family: "Bebas Neue";
    font-size: 92px;
}

.logo {
    font-family: "Bebas Neue";
    font-size: 48px;
}

.plans-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 20px 60px;
    background: radial-gradient(circle at top, rgba(255, 0, 0, .08), transparent 55%), #000;
}

.plans-screen .logo-big {
    margin: 0 0 24px;
    line-height: 1;
}

.plans-subtitle {
    margin-top: 0;
    margin-bottom: 20px;
    opacity: 0.75;
    font-family: inherit;
}

.plans-support {
    margin-bottom: 30px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 320px);
    column-gap: 52px;
    align-items: center;
    justify-content: center;
}

.plans-support .plan-cta {
    width: 100%;
}

.plans-legal-link {
    margin: -6px 0 24px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 1.6;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-family: inherit;
}

.plans-legal-link:hover {
    color: #ffffff;
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.legal-modal.hidden {
    display: none !important;
}

.legal-card {
    width: min(980px, 100%);
    max-height: 86vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: #111;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.legal-header {
    padding: 20px 22px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.legal-header h3 {
    margin: 0;
    font-size: 24px;
}

.legal-close-btn {
    margin-top: 0;
    min-width: 120px;
}

.legal-content {
    overflow: auto;
    padding: 18px 22px 24px;
    font-size: 18px;
    line-height: 1.8;
}

.legal-content h4 {
    margin: 0 0 10px;
    font-size: 22px;
}

.legal-content ul {
    margin: 0 0 18px;
    padding-inline-start: 22px;
}

.legal-content li {
    margin-bottom: 6px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: min(1700px, 97vw);
    justify-content: center;
    align-items: stretch;
}

#plans-grid-host {
    width: min(1700px, 97vw);
    display: flex;
    justify-content: center;
}

#promo-box {
    width: 100%;
}

.plan-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    cursor: pointer;
    position: relative;
}

.plans-grid>.plan-card {
    height: 100%;
}

.plan-card.disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.plan-card.featured {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.15);
}

.plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #e50914;
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
    white-space: nowrap;
    max-width: calc(100% - 28px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-now {
    font-weight: 800;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.price-old {
    margin-left: 10px;
    opacity: 0.65;
    text-decoration: line-through;
    font-size: 0.7em;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.plan-disabled-config {
    opacity: 0.55;
    filter: grayscale(0.15);
}

.plan-name {
    font-size: 24px;
    letter-spacing: 1px;
}

.plan-price {
    font-size: 28px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

body.rtl .plan-price {
    justify-content: flex-end;
}

.plan-note {
    font-size: 15px;
    opacity: 0.7;
    font-family: inherit;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
}

.plan-cta {
    margin-top: auto;
    background: #e50914;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

body.tv-ui .plan-card {
    padding: 26px;
    border-radius: 20px;
    min-height: 0;
}

body.tv-ui .plan-name {
    font-size: 30px;
}

body.tv-ui .plan-price {
    font-size: 36px;
}

body.tv-ui .plan-note,
body.tv-ui .plan-features {
    font-size: 18px;
}

body.tv-ui .plan-cta {
    font-size: 22px;
    padding: 14px 18px;
    border-radius: 14px;
}

.plan-cta:disabled {
    background: #3a3a3a;
    color: #cfcfcf;
    border: 1px solid #2a2a2a;
    cursor: not-allowed;
    opacity: 0.75;
}

.plan-cta.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

.plan-actions .plan-cta {
    margin-top: 0;
}

.promo-card .promo-row {
    display: flex;
    /* flex-direction: column; */
    gap: 10px;
    margin-top: 6px;
}

.promo-card .promo-row input,
.promo-card .promo-row .plan-cta {
    width: 100%;
}

.promo-card .plan-name {
    font-size: 30px !important;
}

.promo-card .plan-price {
    font-size: 24px !important;
    opacity: 0.9;
}

.promo-card .plan-note {
    font-size: 14px !important;
}

.promo-card .promo-row input,
.promo-input {
    font-size: 20px !important;
    height: 64px !important;
    line-height: 64px;
    padding: 0 16px;
}

.promo-card .plan-cta {
    font-size: 15px;
}

.promo-card .plan-actions {
    margin-top: auto;
    padding-top: 14px;
    gap: 8px;
    position: relative;
}

.plans-device-footer {
    margin-top: 24px;
    width: min(1200px, 100%);
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-family: inherit;
}

.plans-device-footer .footer-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.plans-device-footer .footer-label {
    opacity: 0.7;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.plans-device-footer .mono {
    font-size: 18px;
    font-weight: 600;
}

.plans-screen {
    position: relative;
    padding-bottom: 120px;
}

.plans-device-footer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: min(1200px, calc(100% - 80px));
    pointer-events: none;
}

body.tv-ui .plans-screen .logo-big {
    margin: 0 0 32px;
}

body.tv-ui .plans-screen {
    padding-top: 32px;
}

body.tv-ui .plans-support {
    margin-bottom: 34px;
    column-gap: 70px;
}

body.tv-ui .plans-support .plan-cta {
    min-width: 0;
}

body.tv-ui .plans-grid {
    gap: 28px;
    width: min(1760px, 97vw);
}

body.tv-ui #plans-grid-host {
    width: min(1760px, 97vw);
}

body.tv-ui .plan-note,
body.tv-ui .plan-features {
    font-size: 20px;
}

@media (max-width: 1260px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.promo-title {
    font-size: 14px;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.promo-row {
    display: flex;
    gap: 10px;
}

.promo-row input {
    flex: 1;
    height: 54px;
    border-radius: 10px;
    border: 1px solid #222;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0 12px;
    font-size: 16px;
    text-transform: uppercase;
}

.promo-status {
    min-height: 18px;
    font-size: 13px;
    opacity: 0.85;
    margin-top: 6px;
}

.promo-status.success {
    color: #4ade80;
}

.promo-status.error {
    color: #ff6b6b;
}


.payment-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.payment-modal.hidden {
    display: none;
}

.payment-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 0;
}

.payment-qr-modal.hidden {
    display: none;
}

.payment-qr-shell {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.payment-qr-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.payment-qr-fullscreen {
    width: min(92vw, 92vh);
    height: min(92vw, 92vh);
    max-width: 1600px;
    max-height: 1600px;
    min-width: 320px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    box-sizing: border-box;
}

.payment-qr-fullscreen canvas,
.payment-qr-fullscreen img,
.payment-qr-fullscreen table {
    display: block;
    margin: 0 auto;
}

.payment-card {
    background: #111;
    border: 1px solid #222;
    padding: 24px;
    border-radius: 16px;
    min-width: 280px;
    max-width: 640px;
    text-align: left;
    font-family: inherit;
}

.payment-modal.qr-fullscreen .payment-card {
    width: min(96vw, 1700px);
    max-width: min(96vw, 1700px);
    max-height: 98vh;
    overflow: auto;
    padding: 18px;
}

.payment-modal.qr-fullscreen #payment-title,
.payment-modal.qr-fullscreen #payment-desc,
.payment-modal.qr-fullscreen #payment-method-field,
.payment-modal.qr-fullscreen #payment-phone,
.payment-modal.qr-fullscreen #payment-status {
    margin-top: 6px;
    margin-bottom: 8px;
}

.payment-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin: 12px 0 8px;
}

.payment-field label {
    font-size: 13px;
    opacity: 0.8;
}

.payment-field input,
.payment-field select {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #222;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0 12px;
    font-size: 16px;
}

.payment-field select option {
    background: #121212;
    color: #fff;
}

.payment-qr {
    width: min(84vw, 84vh);
    height: min(84vw, 84vh);
    max-width: 1500px;
    max-height: 1500px;
    min-width: 320px;
    min-height: 320px;
    margin: 12px auto;
    border-radius: 14px;
    background: #0b0b0b;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid #222;
}

.payment-modal.qr-fullscreen .payment-qr {
    width: min(92vw, 92vh);
    height: min(92vw, 92vh);
    max-width: 1650px;
    max-height: 1650px;
    border-radius: 10px;
    margin: 8px auto 10px;
}

.payment-qr canvas,
.payment-qr img,
.payment-qr table {
    display: block;
    margin: 0 auto;
}

.payment-status {
    margin-top: 10px;
    min-height: 18px;
    font-size: 13px;
    opacity: 0.85;
}

.payment-status.info {
    color: #cbd5f5;
}

.payment-status.success {
    color: #4ade80;
}

.payment-status.error {
    color: #ff6b6b;
}

.payment-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.payment-actions .plan-cta:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.subscription-box {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

button {
    background: #e50914;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

input {
    padding: 12px;
    font-size: 18px;
    border-radius: 6px;
    border: none;
}

/* =============================
 LOGIN
============================= */

#login-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    background:
        radial-gradient(800px 400px at 50% -20%, rgba(229, 9, 20, .35), transparent 60%),
        radial-gradient(600px 300px at 10% 10%, rgba(255, 255, 255, .08), transparent 70%);
}

#qr-box {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    width: fit-content;
    margin: 12px auto;
}

#qr-box canvas,
#qr-box img,
#qr-box table {
    display: block;
    margin: 0 auto;
}

.login-url {
    font-size: 14px;
    color: #ddd;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: 999px;
}

#qr-box {
    width: 360px;
    height: 360px;
    background: #111;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================
 PROFILES
============================= */

#profiles-screen {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 70px 6vw 80px;
    gap: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    background: radial-gradient(circle at 20% 10%, rgba(255, 0, 0, 0.18), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.08), transparent 45%),
        #050505;
}

.profiles-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.profiles-hero {
    text-align: center;
}

.profiles-hero h1 {
    font-size: 48px;
    letter-spacing: 1px;
}

.profiles-subtitle {
    opacity: 0.7;
    margin-top: 6px;
}

.profiles-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

/* Profiles screen modes */
body.profiles-mode-select #profiles-screen .new-profile {
    display: none;
}

body.profiles-mode-add #profiles-screen #profiles-list {
    display: none;
}

body.profiles-mode-add #profiles-screen .profiles-subtitle {
    display: none;
}

body.profiles-mode-add #profiles-screen {
    padding-top: 34px;
    padding-bottom: 34vh;
}

body.profiles-mode-add.profiles-keyboard-open #profiles-screen {
    padding-bottom: 46vh;
}

body.profiles-mode-add .profiles-shell {
    width: min(760px, 94vw);
    align-items: center;
    gap: 14px;
}

body.profiles-mode-add .profiles-hero h1 {
    font-size: clamp(38px, 4.6vw, 64px);
    line-height: 1.1;
}

body.profiles-mode-add .profiles-row {
    width: 100%;
    justify-content: center;
}

#profiles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.profile-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 16px;
    width: 160px;
    min-height: 190px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover,
.profile-card:focus {
    transform: translateY(-4px);
    border-color: rgba(255, 0, 0, 0.6);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
    outline: none;
}

.profile-card img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #111;
}

.profile-card .profile-name {
    font-size: 16px;
    font-weight: 600;
}

.new-profile {
    /* background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px; */
    padding: 18px;
    min-width: 260px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform .22s ease;
}

body.profiles-mode-add.profiles-keyboard-open .new-profile {
    transform: none;
}

/* body.profiles-mode-add .new-profile {
    width: min(1100px, 96vw);
    min-width: 0;
    max-width: 1100px;
    padding: 16px 18px 18px;
    gap: 14px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
        rgba(11, 11, 11, 0.72);
} */

.new-profile input {
    width: 100%;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #0b0b0b;
    border: 1px solid #222;
    color: #fff;
    scroll-margin-block: 45vh;
}

body.profiles-mode-add .new-profile input {
    width: 100%;
    display: block;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    font-size: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(0, 0, 0, 0.78);
}

body.profiles-mode-add .new-profile #add-profile-btn {
    width: 100%;
    display: block;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    font-size: 20px;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 14px;
}

.avatar-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 320px;
}

body.profiles-mode-add .avatar-preview img {
    width: 92px;
    height: 92px;
}

body.profiles-mode-add .avatar-picker {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: hidden;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

body.profiles-mode-add .avatar-picker::-webkit-scrollbar {
    width: 8px;
}

body.profiles-mode-add .avatar-picker::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

body.profiles-mode-add .avatar-option {
    width: 100%;
    max-width: 72px;
    height: auto;
    aspect-ratio: 1 / 1;
    justify-self: center;
}

body.profiles-mode-add.profiles-keyboard-open .avatar-picker {
    max-height: none;
}

.avatar-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
}

.avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #e50914;
    background: #111;
    object-fit: cover;
}

.avatar-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #111;
}

.avatar-option.selected {
    border-color: #e50914;
    transform: scale(1.08);
}

/* TV readability (Profiles) */
body.tv-ui #profiles-screen {
    padding: 90px 6vw 100px;
    gap: 36px;
}

body.tv-ui.profiles-mode-add #profiles-screen {
    padding-top: 28px;
    padding-bottom: 40vh;
}

body.tv-ui.profiles-mode-add.profiles-keyboard-open #profiles-screen {
    padding-bottom: 54vh;
}

body.tv-ui.profiles-mode-add .profiles-shell {
    width: min(1400px, 96vw);
    gap: 16px;
}

body.tv-ui .profiles-shell {
    width: min(1300px, 100%);
    gap: 32px;
}

body.tv-ui .profiles-hero h1 {
    font-size: 62px;
}

body.tv-ui .profiles-subtitle {
    font-size: 24px;
}

body.tv-ui #profiles-list,
body.tv-ui .profiles-row {
    gap: 30px;
}

body.tv-ui .profile-card {
    width: 220px;
    min-height: 260px;
    padding: 22px 18px;
    border-radius: 20px;
    gap: 16px;
}

body.tv-ui .profile-card img {
    width: 120px;
    height: 120px;
}

body.tv-ui .profile-card .profile-name {
    font-size: 22px;
}

body.tv-ui .new-profile {
    min-width: 340px;
    max-width: 460px;
    padding: 22px;
    border-radius: 20px;
    gap: 16px;
}

body.tv-ui .new-profile input {
    font-size: 24px;
    padding: 14px 16px;
    border-radius: 14px;
    scroll-margin-block: 50vh;
}

body.tv-ui.profiles-mode-add.profiles-keyboard-open .new-profile {
    transform: none;
}

body.tv-ui.profiles-mode-add .new-profile {
    /* width: min(1380px, 96vw); */
    max-width: 1380px;
    min-width: 0;
    padding: 20px 28px;
    gap: 16px;
}

body.tv-ui.profiles-mode-add .new-profile input {
    width: 100%;
    display: block;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    font-size: 24px;
    padding: 14px 16px;
}

body.tv-ui.profiles-mode-add .new-profile #add-profile-btn {
    width: 100%;
    display: block;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
    font-size: 28px;
    border-radius: 14px;
    padding: 12px 16px;
}

body.tv-ui.profiles-mode-add .avatar-picker {
    width: 100%;
    max-width: none;
    max-height: none;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: hidden;
}

body.tv-ui.profiles-mode-add .avatar-option {
    width: 100%;
    max-width: 88px;
    height: auto;
    aspect-ratio: 1 / 1;
}

body.tv-ui.profiles-mode-add.profiles-keyboard-open .avatar-picker {
    max-height: none;
}

body.tv-ui .avatar-preview img {
    width: 110px;
    height: 110px;
}

body.tv-ui .avatar-picker {
    max-width: 420px;
    gap: 14px;
}

body.tv-ui .avatar-option {
    width: 64px;
    height: 64px;
}

body.tv-ui #profile-limit {
    font-size: 18px;
}

@media (max-width: 600px) {
    #profiles-screen {
        padding: 40px 6vw 60px;
    }

    .profile-card {
        width: 140px;
    }

    .new-profile {
        width: 100%;
        max-width: 420px;
    }
}

/* =============================
 HOME
============================= */

#home-screen {
    overflow-y: auto;
    /* height: 100vh; */
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
}



.home-content {
    padding: 100px 40px 80px;
    display: flex;
    flex-direction: column;
    gap: 28px;

    overflow: visible;


    padding-bottom: 130px;

}

body.tv-ui .home-content {
    padding: 120px 60px 100px;
    gap: 34px;
    padding-bottom: 170px;
}

body.tv-ui .header-clock #home-time {
    font-size: 30px;
}

body.tv-ui .header-clock #home-date {
    font-size: 18px;
}

body.tv-ui .home-footer {
    padding: 16px 60px;
    gap: 26px;
}

body.tv-ui .footer-label {
    font-size: 18px;
}

body.tv-ui #app-subscription,
body.tv-ui #home-expiry {
    font-size: 22px;
}

.header-clock {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    text-align: right;
    align-items: flex-end;
}

.header-clock #home-time {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
}

.header-clock #home-date {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.1;
}

body.rtl .header-clock {
    text-align: left;
    align-items: flex-start;
}

.home-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-radius: 16px;
    background: #111;
    border: 1px solid #222;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.status-clock {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#home-time {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

#home-date {
    font-size: 14px;
    opacity: .75;
}

.status-expiry {
    text-align: right;
}

.status-label {
    font-size: 12px;
    opacity: .6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#home-expiry {
    font-size: 16px;
    font-weight: 600;
}

.home-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.88);
    border-top: 1px solid #222;
    z-index: 190;

}

body.rtl .home-footer {
    flex-direction: row-reverse;
}

.home-footer-left,
.home-footer-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-footer-right {
    text-align: right;
}

.footer-label {
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#app-subscription,
#home-expiry {
    font-size: 14px;
    font-weight: 700;
}


/* =============================
 RAIL
============================= */

.rail {
    display: flex;
    gap: 14px;
    margin: 12px 0 30px;
    overflow-x: auto;
    overflow-y: hidden;


    padding-bottom: 6px;

    scrollbar-width: none;
}

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

body.tv-ui .rail {
    gap: 18px;
    margin: 14px 0 40px;
    padding-bottom: 10px;
}

body.tv-ui.screen-home .home-content .rail {
    padding-top: 20px;
    padding-inline: 14px;
    margin-inline: -14px;
}

body.tv-ui .card {
    min-width: 260px;
    height: 140px;
    border-radius: 14px;
    font-size: 18px;
}

.card {
    min-width: 220px;
    height: 120px;
    background: #000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

/* =============================
 PLAYER
============================= */

video {
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* =============================
 SETTINGS UI
============================= */

#settings-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
}

#support-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
}

.support-wrap {
    display: flex;
    justify-content: center;
    padding: 30px 40px 60px;
}

.support-card {
    width: min(720px, 100%);
    background: #111;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
}

.support-textarea {
    min-height: 140px;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    resize: vertical;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 40px;
    border-bottom: 1px solid #222;
}

.settings-header button {
    background: none;
    color: white;
    font-size: 18px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 30px 40px 60px;
    flex: 1;
    min-height: 0;
}

.settings-menu {
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: fit-content;
}

.settings-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    text-align: start;
    cursor: pointer;
    transition: all .2s ease;
}

.settings-tab.active,
.settings-tab:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
}

.settings-content {
    background: #111;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
    min-height: 360px;
    min-width: 0;
    overflow: hidden;
}

.settings-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.settings-panel.active {
    display: flex;
    min-height: 0;
}

.settings-panel h3 {
    margin: 0;
    font-size: 18px;
}

.settings-panel input {
    height: 50px;
    font-size: 16px;
}

.settings-panel textarea {
    min-height: 140px;
    font-size: 16px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #222;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    resize: vertical;
}

.settings-panel button {
    height: 48px;
}

.iptv-server-manager {
    margin-top: 6px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iptv-server-manager label {
    font-size: 13px;
    letter-spacing: 0.5px;
    opacity: 0.82;
    text-transform: uppercase;
}

.iptv-server-manager select {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #2b2b2b;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0 12px;
    font-size: 15px;
}

.iptv-server-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* TV readability for Settings / IPTV registration */
body.tv-ui .settings-header {
    /* padding: 28px 60px; */
    padding-bottom: 10px;
    padding-top: 10px;
    padding-right: 20px;
    padding-left: 0px;
    gap: 26px;
}

body.tv-ui .settings-header button {
    font-size: 26px;
}

body.tv-ui .settings-header h2 {
    font-size: 34px;
}

body.tv-ui .settings-layout {
    grid-template-columns: 420px 1fr;
    gap: 32px;
    padding: 44px 60px 80px;
}

body.tv-ui .settings-menu {
    padding: 18px;
    gap: 14px;
    border-radius: 18px;
}

body.tv-ui .settings-tab {
    font-size: 26px;
    padding: 18px 18px;
    border-radius: 14px;
}

body.tv-ui .settings-content {
    padding: 34px;
    border-radius: 18px;
    min-height: 460px;
}

body.tv-ui .settings-panel {
    gap: 20px;
}

body.tv-ui .settings-panel h3 {
    font-size: 30px;
}

body.tv-ui .settings-panel input {
    height: 84px;
    font-size: 28px;
    padding: 0 18px;
    border-radius: 14px;
}

body.tv-ui .settings-panel button {
    height: 74px;
    font-size: 28px;
    border-radius: 14px;
}

body.tv-ui #iptv-status {
    font-size: 24px;
}

body.tv-ui .iptv-server-manager {
    border-radius: 16px;
    padding: 18px;
    gap: 14px;
}

body.tv-ui .iptv-server-manager label {
    font-size: 18px;
}

body.tv-ui .iptv-server-manager select {
    height: 74px;
    border-radius: 14px;
    font-size: 24px;
}

body.tv-ui #profile-save-status {
    font-size: 20px;
}

body.tv-ui .profile-settings {
    padding: 20px 24px 24px;
    border-radius: 20px;
}

body.tv-ui .profile-settings-body {
    grid-template-columns: 210px minmax(520px, 760px);
    gap: 24px;
}

body.tv-ui .profile-settings .profile-fields {
    width: min(760px, 100%);
}

body.tv-ui .profile-settings .profile-fields button {
    width: 100%;
}

body.tv-ui .profile-settings #settings-avatar-picker.avatar-picker {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 10px 12px;
    border-radius: 14px;
}

body.tv-ui .profile-settings #settings-avatar-picker .avatar-option {
    max-width: 88px;
}

body.tv-ui .player-theme-controls {
    gap: 14px;
    margin-top: 12px;
}

body.tv-ui .player-theme-btn {
    min-width: 190px;
    height: 68px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 24px;
}

.device-info {
    margin-top: 12px;
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.device-info-large {
    gap: 18px;
    padding: 18px;
}

.player-theme-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.player-theme-btn {
    min-width: 120px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-theme-btn:hover,
.player-theme-btn:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.player-theme-btn.active {
    background: #e50914;
    border-color: #ff6f76;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.35);
}

.device-info-large .info-label {
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.7;
}

.device-info-large .info-value {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.subscription-info-card {
    margin-top: 14px;
}

.subscription-info-card .info-value {
    line-height: 1.45;
}

.iptv-ads {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.iptv-ad-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    background: #121212;
    border: 1px solid #242424;
    border-radius: 14px;
    padding: 14px;
    align-items: center;
}

.iptv-ad-image {
    width: 180px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    background: #0b0b0b;
}

.iptv-ad-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iptv-ad-title {
    font-size: 18px;
    font-weight: 700;
}

.iptv-ad-text {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.5;
}

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

.iptv-ad-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.iptv-ad-btn.primary {
    background: #e50914;
    border-color: #e50914;
}

.ad-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
}

.ad-overlay.hidden {
    display: none;
}

.ad-video-card {
    width: min(820px, 90vw);
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.ad-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ad-video-title {
    font-size: 18px;
    font-weight: 700;
}

.ad-video-text {
    font-size: 14px;
    opacity: 0.8;
}

#ad-video {
    width: 100%;
    height: 420px;
    background: #000;
    border-radius: 12px;
}

.ad-video-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ad-btn {
    background: #e50914;
    border: 1px solid #e50914;
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

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

.ad-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.device-info-wide {
    max-width: 520px;
    margin: 18px auto 0;
}

.device-info-wide input {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 12px;
}

.device-info .mono {
    font-size: 12px;
    word-break: break-all;
}

.device-info-large .info-value {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-settings {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px 18px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
        rgba(11, 11, 11, 0.72);
}

.profile-settings-body {
    display: grid;
    grid-template-columns: 160px minmax(320px, 560px);
    gap: 18px;
    align-items: start;
}

.profile-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(560px, 100%);
}

.profile-settings .profile-fields input,
.profile-settings .profile-fields button {
    /* width: 100%; */
}

.profile-settings #settings-avatar-picker.avatar-picker {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: hidden;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.34);
}

.profile-settings #settings-avatar-picker .avatar-option {
    width: 100%;
    max-width: 72px;
    height: auto;
    aspect-ratio: 1 / 1;
}

.avatar-preview.large img {
    width: 96px;
    height: 96px;
}

.plans-embed {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
}

.plans-embed #plans-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
}

.plans-embed #plans-grid>.plan-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 18px 20px;
}

.plans-embed #plans-grid .plan-card.featured {
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

.plans-embed #plans-grid .plan-badge {
    font-size: 15px;
    padding: 7px 12px;
}

.settings-panel[data-panel="subscription"] {
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 8px;
}

.settings-panel[data-panel="subscription"] .plans-embed {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 6px;
}

.settings-panel[data-panel="subscription"] #plans-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch;
}

.settings-panel[data-panel="subscription"] #plans-grid .plan-features,
.settings-panel[data-panel="subscription"] #plans-grid .plan-note {
    white-space: normal;
    overflow-wrap: anywhere;
}

body.tv-ui .plans-embed #plans-grid {
    gap: 20px;
}

body.tv-ui .plans-embed #plans-grid>.plan-card {
    padding: 20px 22px;
}

body.tv-ui .plans-embed #plans-grid .plan-badge {
    font-size: 18px;
    padding: 8px 14px;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid {
    gap: 14px !important;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid>.plan-card {
    padding: 16px 16px !important;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-name {
    font-size: 24px;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-price {
    font-size: 46px;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-note,
body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-features {
    font-size: 16px;
    line-height: 1.5;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-cta {
    font-size: 20px;
    height: 62px;
    padding: 10px 12px;
}

.plan-cta.danger {
    background: #2a0d0d;
    border: 1px solid rgba(255, 80, 80, 0.6);
    color: #ffb4b4;
}

@media (max-width: 720px) {
    .profile-settings-body {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

#iptv-status {
    margin-top: 10px;
    font-size: 16px;
}

#profile-save-status {
    font-size: 14px;
    opacity: .8;
}

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

@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =============================
 UNIVERSAL SCREEN HEADER
============================= */

.screen-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 40px;
    border-bottom: 1px solid #222;
    background: #000;
}

.screen-header button {
    background: none;
    color: white;
    font-size: 18px;
    border: none;
    cursor: pointer;
}

.screen-header h2 {
    margin: 0;
    font-size: 22px;
}

body.tv-ui .screen-header {
    padding: 28px 60px;
    gap: 26px;
}

body.tv-ui .screen-header button {
    font-size: 26px;
}

body.tv-ui .screen-header h2 {
    font-size: 34px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.see-all {
    cursor: pointer;
    opacity: .7;
}

.see-all::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    margin-inline-start: 8px;
    margin-top: 1px;
}

.see-all:hover {
    opacity: 1;
}

/* =============================
 CENTER SEARCH
============================= */

.search-wrapper {
    position: relative;
    flex: 1 1 560px;
    min-width: 260px;
    max-width: 640px;
    z-index: 80;
    margin: 0 auto;
}


.search-wrapper input {
    width: 100%;
    height: 50px;
    padding: 0 28px;
    border-radius: 50px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;

}

body.tv-ui .search-wrapper input {
    height: 66px;
    padding: 0 32px;
    font-size: 24px;
}

.search-wrapper input::placeholder {
    color: #aaa;
}

.search-history {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    max-height: 360px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .45);
    z-index: 120;
}

body.tv-ui .search-history {
    top: 76px;
    max-height: 420px;
}

.search-history.hidden {
    display: none;
}

.search-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
}

body.tv-ui .search-history-item {
    padding: 14px 14px;
}

.search-history-item:hover {
    background: #1c1c1c;
}

.search-history-text {
    flex: 1;
    font-size: 15px;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.tv-ui .search-history-text {
    font-size: 22px;
}

.search-history-delete {
    background: none;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
}

body.tv-ui .search-history-delete {
    font-size: 24px;
}

.search-history-delete:hover {
    color: #fff;
}

/* =============================
 BROWSER LAYOUT
============================= */

.browser-layout {
    display: flex;
    height: calc(100vh - 90px);
    background: #000;
}

/* Web preview uses 70% zoom; compensate vh-based layout so browser pages still fill viewport. */
html.web-zoom-70 #browser-screen {
    min-height: calc(100vh / 0.7);
}

html.web-zoom-70 .browser-layout {
    height: calc((100vh - 50px) / 0.7);
}

.browser-header {
    justify-content: space-between;
}

.browser-search {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.browser-search input {
    width: 360px;
    max-width: 38vw;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #222;
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

body.tv-ui .browser-search input {
    width: 460px;
    height: 62px;
    padding: 0 22px;
    font-size: 22px;
}

.browser-search .search-history {
    position: absolute;
    top: 52px;
    left: 0;
    transform: none;
    width: 100%;
}

.category-panel.hidden {
    display: none;
}

.browser-layout.full .items-grid {
    padding-left: 40px;
}

@media (max-width: 900px) {
    .browser-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .browser-search {
        width: 100%;
        margin-left: 0;
    }

    .browser-search input {
        width: 100%;
        max-width: none;
    }
}

.type-badge,
.episode-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    z-index: 5;
}

.type-badge {
    text-transform: uppercase;
}

.episode-badge {
    text-transform: none;
}

.type-badge.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff2d2d;
    box-shadow: 0 0 10px rgba(255, 45, 45, 0.8);
}

.rating-badge {
    position: absolute;
    right: -8px;
    top: -10px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #000000;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    z-index: 5;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rating-badge::before {
    content: "\2B50\FE0F";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    color: #ffd54a;
    line-height: 1;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.32));
}

.rating-badge .star {
    display: none;
}

.rating-badge .rating-value {
    display: inline-block;
    transform: translateY(1px);
    position: relative;
    z-index: 1;
}

.details-rating-badge {
    left: auto;
    right: -18px;
    top: -16px;
    width: 74px;
    height: 74px;
    font-size: 17px;
}

.details-rating-badge::before {
    font-size: 80px;
}

.details-rating-badge .rating-value {
    transform: translateY(2px);
}

.card-remove-btn {
    position: absolute;
    top: -11px;
    right: -11px;
    left: auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 8;
}

.card-remove-btn.favorite-remove-btn {
    color: #ff2d55;
    border-color: rgba(255, 45, 85, 0.75);
    background: rgba(0, 0, 0, 0.82);
    font-size: 18px;
}

.rail-card:hover .card-remove-btn,
.rail-card:focus-within .card-remove-btn,
.rail-card:focus .card-remove-btn {
    opacity: 1;
    pointer-events: auto;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111;
    color: #fff;
    border: 1px solid #222;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    z-index: 9999;
    animation: toast-in .25s ease;
}

.toast.action-toast {
    min-width: 260px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-title {
    font-weight: 700;
    font-size: 16px;
}

.toast-message {
    font-size: 14px;
    opacity: 0.9;
}

.toast-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.toast-btn {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

.toast-btn.primary {
    background: #e50914;
    border-color: #e50914;
}

@keyframes toast-in {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* LEFT PANEL */

.category-panel {
    width: 320px;
    background: #000;
    border-right: 1px solid #222;
    padding: 20px 10px;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE / Edge */
}

.category-panel::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}

.category-item:hover {
    background: #222;
    opacity: 1;
}

.category-item.active {
    background: #222;
    opacity: 1;
}

/* RIGHT GRID */

.items-grid {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;

    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
    align-content: start;
    grid-auto-rows: 300px;

    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE / old Edge */
}

.items-grid::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}

.items-grid .rail-card {
    width: 100%;
}

.items-grid .rail-card img {
    height: 240px;
}

.items-grid .rail-title {
    font-size: 16px;
    margin-top: 8px;
}

.items-grid .empty-state {
    grid-column: 1 / -1;
    align-self: start;
    justify-self: center;
    margin-top: 22px;
    padding: 14px 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
    font-weight: 700;
}

.poster-card {
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: .25s;
    box-shadow: 0 0 20px rgba(0, 0, 0, .6);

    height: 300px;
    display: flex;
    flex-direction: column;
}

.poster-card:hover {
    transform: scale(1.06);
}

.poster-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.poster-title {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width:1600px) {
    .items-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 340px;
    }

    .poster-card {
        height: 340px;
    }

    .poster-card img {
        height: 280px;
    }
}

/* =============================
 SKELETON
============================= */

.skeleton-card {
    background: #222;
    border-radius: 14px;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            #222 25%,
            #333 37%,
            #222 63%);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    from {
        transform: translateX(-100%)
    }

    to {
        transform: translateX(100%)
    }
}


/* =============================
 DETAILS ACTIONS
============================= */

.details-actions button {
    background: white;
    color: black;
    padding: 12px 22px;
    font-size: 24px;
    border-radius: 6px;
    margin-right: 12px;
    border: none;
    cursor: pointer;
}

.details-actions button:last-child {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* =============================
 TOP BAR
============================= */

.details-topbar {
    position: fixed;
    top: 18px;
    left: 24px;
    z-index: 50;
}

.back-btn {
    background: none;
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 26px;
    cursor: pointer;
}

button[data-i18n="back_btn"] {
    position: relative;
    padding-left: 44px;
}

button[data-i18n="back_btn"]::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill%3D%27white%27%20d%3D%27M15.41%207.41%2014%206l-6%206%206%206%201.41-1.41L10.83%2012z%27/%3E%3C/svg%3E");
    opacity: 0.95;
    pointer-events: none;
}

body.rtl button[data-i18n="back_btn"] {
    padding-left: 14px;
    padding-right: 44px;
}

body.rtl button[data-i18n="back_btn"]::before {
    left: auto;
    right: 14px;
    transform: translateY(-50%) rotate(180deg);
}


/* =============================
   DETAILS SCREEN â€” FINAL
============================= */

#details-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    /* padding-bottom: 120px; */
    background-color: #000;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow-y: scroll;
    overflow-x: hidden;

}

.details-tabs,
.details-tab-panel {
    background: transparent;
}

.details-tabs {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 80px 20px;
    padding: 8px;
    position: relative;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.9), rgba(10, 10, 10, 0.84));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
    user-select: none;
    -webkit-user-select: none;
}

.details-tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.84);
    border-radius: 999px;
    padding: 12px 22px;
    min-width: 148px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.details-tab:hover {
    color: #fff;
}

.details-tab:focus,
.details-tab:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.details-tab:not(.active):focus,
.details-tab:not(.active):focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.details-tab.active {
    background: #fff;
    color: #111;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.details-tab-panel {
    display: none;
    padding: 0 80px 0px;
    background: transparent;
}

.details-tab-panel.active {
    display: block;
}

/* =============================
   HERO SECTION
============================= */

#details-hero {
    position: relative;
    min-height: 65vh;
    background: none;
    overflow: visible !important;
}


.hero-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, .75) 0%,
            rgba(0, 0, 0, .6) 40%,
            rgba(0, 0, 0, .35) 70%,
            rgba(0, 0, 0, .15) 100%);

    z-index: 1;
    pointer-events: none;
}

body.details-series #details-hero {
    background-attachment: fixed;
}

body.details-series #details-hero,
body.details-series .hero-overlay {
    background-attachment: fixed !important;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 50px;
    padding: 160px 80px 80px;
}

.details-poster-wrap {
    position: relative;
    width: 320px;
    flex: 0 0 auto;
}

#details-poster {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .9);
}

#details-info {
    max-width: 720px;
}

#details-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
}

#details-meta {
    opacity: .8;
    font-size: 22px;
    margin-bottom: 14px;
}

#details-desc {
    font-size: 20px;
    line-height: 1.6;
    margin: 18px 0 24px;
    max-width: 620px;
}

/* =============================
   CAST SECTION
============================= */

.cast-section {
    padding: 40px 80px 10px;
}

#cast-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
}

.cast-lazy-hint {
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    width: max-content;
    max-width: 100%;
}

#cast-row::-webkit-scrollbar {
    display: none;
}

.actor {
    width: 140px;
    flex-shrink: 0;
    text-align: center;
}

.actor img {
    width: 100%;
    border-radius: 12px;
}

.actor div {
    margin-top: 6px;
    font-size: 24px;
}

/* =============================
   EPISODES SECTION
============================= */

.episodes-section {
    padding-bottom: 80px;
}

#episodes-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}




.season-btn {
    padding: 8px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.season-btn.active {
    background: white;
    color: black;
}

/* row */


/* episode card */

.episode-card {
    position: relative;
    flex: 0 0 220px;
    min-width: 220px;
    height: 300px;
    /* ðŸ‘ˆ Ù…Ù‡Ù… */

    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: .25s ease;
}

.episode-card:hover,
.episode-card:focus-visible {
    transform: scale(1.08);
    outline: none;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.92),
        0 0 0 5px rgba(255, 255, 255, 0.28),
        0 16px 32px rgba(0, 0, 0, 0.48);
    z-index: 10;
}

.episode-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.episode-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-info {
    position: absolute;
    inset: 0;
    padding: 0;
}



.episode-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: white;
    width: 85%;
    text-shadow: 0 3px 10px rgba(0, 0, 0, .8);
}



#continue-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
}

/* Ø§Ù„ÙƒØ§Ø±Ø¯ */
.rail-card {
    width: 170px;
    flex-shrink: 0;
    cursor: pointer;

}

/* Ø§Ù„ØµÙˆØ±Ø© */
.rail-card img {
    width: 100%;
    height: 255px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    transition: transform .25s ease;
}

/* Highlight cards that fallback to placeholder image */
.rail-card img[src*="placeholder.jpg"],
.episode-card .episode-thumb[src*="placeholder.jpg"],
.actor img[src*="placeholder.jpg"] {
    outline: 3px solid rgb(33 32 32 / 90%);

    outline-offset: -3px;
}

/* Progressive enhancement when :has is supported */
.rail-card:has(img[src*="placeholder.jpg"]),
.episode-card:has(.episode-thumb[src*="placeholder.jpg"]),
.actor:has(img[src*="placeholder.jpg"]) {
    border-radius: 14px;
}

/* Ø´Ø±ÙŠØ· Ø§Ù„ØªÙ‚Ø¯Ù… */
.progress-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, .18);
    border-radius: 8px;
    margin-top: 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e50914, #ff6a6a);
    border-radius: 8px;
    transition: width .35s ease;
}

/* Ø§Ù„Ø¹Ù†ÙˆØ§Ù† */
.rail-title {
    margin-top: 6px;
    font-size: 20px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* badge Ø§Ù„Ø­Ù„Ù‚Ø© */
/* Resume badge Ø¯Ø§Ø®Ù„ Ø§Ù„Ø­Ù„Ù‚Ø§Øª */
.episode-resume-badge {
    position: absolute;
    top: 14px;
    left: 140px;
    background: #e50914;
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    z-index: 4;
}

/* favorite */
.fav-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    color: red;
    font-size: 16px;
}

/* zoom Ø§Ù„ØµÙˆØ±Ø© ÙÙ‚Ø· */
.rail-card:hover img {
    transform: scale(1.03);
}

/* =============================
   TOP BAR FINAL
============================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    flex-wrap: nowrap;
    padding: 20px 40px;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 200;

    background: black;


}

/* Ø§Ù„Ù…ÙŠÙ†ÙŠÙˆ ÙÙŠ Ø§Ù„Ù†Øµ */
.top-menu {
    display: flex;
    gap: 30px;
    margin-left: 0;
    font-size: larger;
    flex: 0 1 auto;
    min-width: 0;
}

/* Ø§Ù„Ø¬Ø²Ø¡ Ø§Ù„ÙŠÙ…ÙŠÙ† */
.top-actions {
    display: flex;
    gap: 26px;
    align-items: center;
    margin-inline-start: auto;
    flex: 0 0 auto;
}

.profile-menu {
    position: relative;
}

.profile-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
}

.profile-avatar-wrap {
    position: relative;
    width: 42px;
    height: 42px;
}

#profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #222;
    transition: transform .15s ease;
}

.profile-trigger:hover #profile-avatar {
    transform: scale(1.05);
}

.profile-switch-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e50914;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    opacity: 1;
}

.profile-dropdown {
    position: absolute;
    top: 56px;
    right: 0;
    background: #111;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 14px;
    min-width: 220px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

.profile-menu.open .profile-dropdown {
    display: flex;
}

.profile-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #222;
}

.profile-current img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-current-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.6;
}

.profile-current-name {
    font-size: 14px;
    font-weight: 600;
}

.profile-menu-btn {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    padding: 0 12px;
}

.profile-menu-btn.danger {
    background: #2a0d0d;
    border-color: rgba(255, 80, 80, 0.6);
    color: #ffb4b4;
}

.top-menu span,
.top-actions span {
    cursor: pointer;
    opacity: .75;
    transition: .2s;
    white-space: nowrap;
}

.top-menu span:hover,
.top-actions span:hover {
    opacity: 1;
}

/* Ø§Ø³Ù… Ø§Ù„Ø¨Ø±ÙˆÙØ§ÙŠÙ„ */
#profile-name {
    font-weight: 600;
}


/* ===== EPISODES OVER HERO FINAL ===== */

#episodes-row {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    margin: 0 80px 24px;
    padding: 0 0 8px;
    cursor: default;
}



#episodes-row::-webkit-scrollbar {
    width: 8px;
}

#episodes-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

#episodes-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

#season-selector {
    min-width: 160px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

#season-selector:focus {
    outline: 2px solid rgba(255, 255, 255, .5);
}

/* Ensure native dropdown list text stays readable on webOS (white popup background). */
#season-selector option,
#season-selector optgroup {
    color: #111;
    background: #fff;
    font-size: inherit;
}

.episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 80px 12px;
    gap: 16px;
}


.hero-fav {
    position: absolute;
    top: 30px;
    right: 40px;

    font-size: 34px;
    background: transparent;
    border: none;

    color: white;
    cursor: pointer;

    z-index: 60;

    transition: .25s ease;
}

.hero-fav:hover {
    transform: scale(1.2);
}

.hero-fav.active {
    color: #e50914;
}




#episodes-row:active {
    cursor: grabbing;
}





.hero-bottom-gradient {
    position: absolute;
    display: none;

    left: 0;
    right: 0;
    bottom: 0;

    height: 16vh;
    max-height: 180px;

    /* background: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, .85) 40%,
            rgba(0, 0, 0, .25) 80%,
            rgba(0, 0, 0, 0) 100%); */

    pointer-events: none;
    z-index: 1;
}

body.details-series .hero-bottom-gradient {
    display: block;

}

body.details-series #details-screen {
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

/* ================================
   EPISODES â€” TITLE UNDER CARD
================================ */

#episodes-row .rail-card {
    position: relative;
    width: 100%;
    min-height: 160px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    border-radius: 14px;
    overflow: hidden;
}

#episodes-row .progress-wrap {
    position: static;
    margin: 6px 0 0;
    width: 100%;
    z-index: 3;
}

/* Ø§Ù„ØµÙˆØ±Ø© */

#episodes-row .rail-card img {
    width: 220px;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
}

/* Ø§Ø³Ù… Ø§Ù„Ø­Ù„Ù‚Ø© ØªØ­Øª */

#episodes-row .episode-info,
#episodes-row .poster-title {

    position: static;

    margin-top: 0;

    padding: 10px 12px;

    background: none;

    text-align: left;

    font-size: 18px;
    font-weight: 800;

    color: #eee;

    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    /* flex: 1; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

#episodes-row .episode-title {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    text-align: left;
    margin: 0;
    text-shadow: none;
}

.hero-completed {
    position: absolute;
    top: 120px;
    right: 80px;



    padding: 10px 22px;
    border-radius: 999px;

    font-size: 16px;
    font-weight: bold;

    z-index: 60;
}


/* Overlay Ø®ÙÙŠÙ */

.rail-card {
    position: relative;
    overflow: visible;
}

/* =============================
   COMPLETED OVER IMAGE
============================= */

.rail-card.completed img {
    filter: brightness(.45) saturate(.75);
}

/* overlay Ø£ØºÙ…Ù‚ */

.rail-card.completed::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2;
    pointer-events: none;
}

/* ÙƒÙ„Ù…Ø© COMPLETED */

.completed-badge {
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);



    color: white;

    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;

    border-radius: 999px;

    text-transform: uppercase;

    z-index: 20;

    pointer-events: none;
}

.cat-count {
    opacity: .6;
    font-size: 13px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    opacity: .7;
    transition: .2s;
}

.fav-btn.active {
    animation: pop 0.25s ease;
}

@keyframes pop {
    0% {
        transform: scale(0.6);
    }

    100% {
        transform: scale(1);
    }
}

.details-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.details-title-row h1 {
    flex: 1;
    margin: 0;
}

/* FAVORITE */
.fav-btn {
    font-size: 36px;
    /* ðŸ‘ˆ Ø£ÙƒØ¨Ø± */
    min-width: 40px;

    cursor: pointer;
    user-select: none;

    transition: transform .15s ease, color .15s ease;
    color: white;
}

/* OUTLINE */
.fav-btn::before {
    content: "\2661";
}

/* FILLED */
.fav-btn.active::before {
    content: "\2665";
    color: #ff3b3b;
}

/* hover */
.fav-btn:hover {
    transform: scale(1.15);
}

.hero-actions {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-top: 20px;
    flex-wrap: wrap;

}

.play-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: flex-start;
    gap: 8px;
}

.play-progress {
    width: 180px;
    height: 6px;
}

.play-subtitle {
    font-size: 12px;
    opacity: .7;
}

/* Keep Play / Trailer / Favorite same button footprint */
.hero-actions .play-btn,
.hero-actions .trailer-btn,
.hero-actions .fav-btn {
    min-width: 120px;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    align-self: flex-start;
}

.hero-actions .play-btn {
    margin-right: 12px;
    font-size: 16px;
    font-weight: 700;
}

.hero-actions .fav-btn {
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    margin-right: 12px;
}

/* Ù„Ùˆ Ø§Ù„Ø³ÙŠØ²Ù† Ø³ÙŠÙ„ÙŠÙƒØªÙˆØ± ÙƒØ¨ÙŠØ± */
.hero-actions .season-selector {
    margin-left: auto;
    /* ðŸ‘ˆ ÙŠØ®Ù„ÙŠÙ‡ ÙŠØ±ÙˆØ­ Ø¢Ø®Ø± Ø§Ù„Ø³Ø·Ø± ÙŠÙ…ÙŠÙ† */
}

.hero-actions .trailer-btn {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.hero-actions .trailer-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-actions .season-selector {
    flex: 0 0 100%;
    max-width: 320px;
    margin-top: 10px;
    margin-left: 0;
}

.trailer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10070;
    padding: 30px;
}

.trailer-dialog {
    position: relative;
    width: min(1600px, 96vw);
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.trailer-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

#trailer-iframe,
#trailer-video {
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.trailer-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.screensaver-overlay {
    position: fixed;
    inset: 0;
    z-index: 10090;
    background: #000;
}

.screensaver-stage {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transition: background-image 500ms ease-out;
    overflow: hidden;
}

#screensaver-iframe,
#screensaver-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    object-fit: cover;
}

.screensaver-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.16) 45%, rgba(0, 0, 0, 0.54) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.05) 58%);
    pointer-events: none;
}

.screensaver-meta {
    position: absolute;
    left: 64px;
    right: 64px;
    bottom: 64px;
    max-width: 860px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.screensaver-kicker {
    font-size: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.screensaver-title {
    margin: 0;
    font-size: clamp(34px, 4vw, 64px);
    line-height: 1.08;
    color: #fff;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.screensaver-subtitle {
    margin: 0;
    font-size: clamp(16px, 1.5vw, 24px);
    color: rgba(255, 255, 255, 0.98);
    max-width: 920px;
    white-space: pre-line;
    line-height: 1.45;
    font-weight: 500;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}

.screensaver-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.screensaver-watch-btn,
.screensaver-dismiss-btn {
    appearance: none;
    -webkit-appearance: none;
    min-width: 164px;
    height: 50px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
}

.screensaver-watch-btn {
    background: #e50914 !important;
    color: #fff !important;
    border-color: #e50914 !important;
}

.screensaver-watch-btn:hover {
    background: #ff1f29 !important;
}

.screensaver-watch-btn:focus,
.screensaver-watch-btn:active,
body.input-remote .screensaver-watch-btn:focus,
body.input-pointer .screensaver-watch-btn:focus {
    background: #e50914 !important;
    color: #fff !important;
    border-color: #e50914 !important;
}

.screensaver-dismiss-btn {
    background: rgba(0, 0, 0, 0.44);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.34);
}

.screensaver-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Cinematic poster/backdrop motion */
.screensaver-stage.screensaver-motion-0 {
    animation: screensaver-pan-0 10s ease-in-out both;
}

.screensaver-stage.screensaver-motion-1 {
    animation: screensaver-pan-1 10s ease-in-out both;
}

.screensaver-stage.screensaver-motion-2 {
    animation: screensaver-pan-2 10s ease-in-out both;
}

.screensaver-stage.screensaver-motion-3 {
    animation: screensaver-pan-3 10s ease-in-out both;
}

@keyframes screensaver-pan-0 {
    0% {
        background-size: 108%;
        background-position: 50% 52%;
    }

    100% {
        background-size: 116%;
        background-position: 56% 46%;
    }
}

@keyframes screensaver-pan-1 {
    0% {
        background-size: 110%;
        background-position: 44% 48%;
    }

    100% {
        background-size: 118%;
        background-position: 52% 56%;
    }
}

@keyframes screensaver-pan-2 {
    0% {
        background-size: 106%;
        background-position: 53% 45%;
    }

    100% {
        background-size: 114%;
        background-position: 47% 54%;
    }
}

@keyframes screensaver-pan-3 {
    0% {
        background-size: 107%;
        background-position: 48% 57%;
    }

    100% {
        background-size: 115%;
        background-position: 55% 49%;
    }
}

/* =============================
   TOP VIEWS BADGE
============================= */

.views-badge {
    position: absolute;
    top: 10px;
    left: 10px;

    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);

    padding: 4px 10px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    color: white;

    z-index: 6;

}

/* =============================
   TV UI SCALE (APP)
============================= */

body.tv-ui .top-bar {
    padding: 20px 60px;
    gap: 28px;
}

body.tv-ui .logo {
    font-size: 60px;
}

body.tv-ui .logo-big {
    font-size: 110px;
}

body.tv-ui .top-menu {
    gap: 38px;
    margin-left: 0;
    font-size: 26px;
}

body.tv-ui .top-actions {
    gap: 32px;
}

body.tv-ui .profile-avatar-wrap {
    width: 56px;
    height: 56px;
}

body.tv-ui .profile-switch-badge {
    width: 22px;
    height: 22px;
    font-size: 14px;
}

body.tv-ui .profile-dropdown {
    top: 78px;
    min-width: 280px;
    padding: 18px;
    gap: 14px;
    border-radius: 18px;
}

body.tv-ui .profile-current img {
    width: 48px;
    height: 48px;
}

body.tv-ui .profile-current-label {
    font-size: 14px;
}

body.tv-ui .profile-current-name {
    font-size: 20px;
}

body.tv-ui .profile-menu-btn {
    height: 56px;
    font-size: 20px;
    padding: 0 16px;
    border-radius: 14px;
}

body.tv-ui .screensaver-meta {
    left: 84px;
    right: 84px;
    bottom: 86px;
    max-width: 980px;
    gap: 14px;
}

body.tv-ui .screensaver-kicker {
    font-size: 20px;
}

body.tv-ui .screensaver-title {
    font-size: clamp(52px, 5vw, 84px);
}

body.tv-ui .screensaver-subtitle {
    font-size: 28px;
    max-width: 880px;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

body.tv-ui .screensaver-actions {
    gap: 16px;
    margin-top: 14px;
}

body.tv-ui .screensaver-watch-btn,
body.tv-ui .screensaver-dismiss-btn {
    min-width: 220px;
    height: 66px;
    border-radius: 14px;
    font-size: 28px;
}

body.tv-ui .see-all {
    font-size: 20px;
    opacity: 0.85;
}

body.tv-ui .see-all::after {
    width: 8px;
    height: 8px;
    margin-inline-start: 10px;
}

body.tv-ui .rail-card {
    width: 210px;
}

body.tv-ui .rail-card img {
    height: 310px;
    border-radius: 16px;
}

body.tv-ui .progress-wrap {
    height: 8px;
    margin-top: 10px;
}

body.tv-ui .rail-title {
    margin-top: 8px;
    font-size: 24px;
}

body.tv-ui .type-badge,
body.tv-ui .episode-badge {
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 10px;
}

body.tv-ui .rating-badge {
    width: 62px;
    height: 62px;
    right: -10px;
    top: -14px;
    font-size: 15px;
}

body.tv-ui .rating-badge::before {
    font-size: 66px;
}

body.tv-ui .rating-badge .star {
    display: none;
}

body.tv-ui .rating-badge .rating-value {
    transform: translateY(1px);
}

body.tv-ui .details-rating-badge {
    width: 96px;
    height: 96px;
    top: -22px;
    left: auto;
    right: -24px;
    font-size: 21px;
}

body.tv-ui .details-rating-badge::before {
    font-size: 102px;
}

body.tv-ui .episode-resume-badge {
    font-size: 14px;
    padding: 6px 10px;
}

body.tv-ui .completed-badge {
    font-size: 28px;
}

body.tv-ui .views-badge {
    font-size: 16px;
    padding: 6px 12px;
}

body.tv-ui .card-remove-btn {
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    font-size: 24px;
}

body.tv-ui .card-remove-btn.favorite-remove-btn {
    font-size: 22px;
}



body.tv-ui .category-panel {
    width: 440px;
    padding: 26px 14px;
}

body.tv-ui .category-item {
    padding: 18px 18px;
    border-radius: 14px;
    font-size: 24px;
}

body.tv-ui .cat-count {
    font-size: 18px;
}

body.tv-ui .items-grid {
    padding: 30px 40px;
    gap: 26px;
    grid-auto-rows: 360px;
}

body.tv-ui .poster-card {
    height: 360px;
    border-radius: 18px;
}

body.tv-ui .poster-card img {
    height: 290px;
}

body.tv-ui .poster-title {
    font-size: 26px;
    padding: 12px;
}

/* Details */
body.tv-ui .details-topbar {
    top: 22px;
    left: 34px;
}

body.tv-ui .back-btn {
    font-size: 30px;
}

body.tv-ui button[data-i18n="back_btn"]::before {
    width: 24px;
    height: 24px;
}

body.tv-ui .hero-content {
    /* padding: 175px 90px 90px; */
    gap: 60px;
}

body.tv-ui .details-poster-wrap {
    width: 380px;
}

body.tv-ui #details-poster {
    border-radius: 18px;
}

body.tv-ui #details-title {
    font-size: 56px;
}

body.tv-ui #details-meta {
    font-size: 26px;
}

body.tv-ui #details-desc {
    font-size: 24px;
    max-width: 740px;
}

body.tv-ui .hero-actions {
    gap: 22px;
}

body.tv-ui .play-progress {
    width: 120px;
}

body.tv-ui .play-subtitle {
    font-size: 16px;
}

body.tv-ui .hero-actions .fav-btn {
    min-width: 150px;
    height: 56px;
    border-radius: 12px;
    font-size: 60px;
}

body.tv-ui .hero-actions .trailer-btn {
    min-width: 150px;
    height: 56px;
    font-size: 22px;
    padding: 0 18px;
    border-radius: 12px;
}

body.tv-ui .hero-actions .play-btn {
    min-width: 150px;
    height: 56px;
    font-size: 22px;
    padding: 0 18px;
    border-radius: 12px;
}

body.tv-ui #season-selector {
    min-width: 220px;
    max-width: 340px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 20px;
}

body.tv-ui .trailer-close-btn {
    width: 52px;
    height: 52px;
    font-size: 34px;
}

body.tv-ui .details-tabs {
    margin: 0 80px 28px;
    padding: 0px;
    gap: 12px;
    border-radius: 999px;
}

body.tv-ui .details-tab {
    padding: 14px 28px;
    min-width: 190px;
    font-size: 22px;
    border-radius: 999px;
}

body.tv-ui .cast-lazy-hint {
    font-size: 20px;
    padding: 22px 26px;
    border-radius: 14px;
}

body.tv-ui .episodes-header {
    margin: 38px 0px 24px;
    gap: 20px;
}

body.tv-ui #episodes-title {
    font-size: 32px;
}

body.tv-ui #episodes-row {
    gap: 26px;
    margin: 0 0px 44px;
    padding-bottom: 12px;
}

body.tv-ui #episodes-row .rail-card img {
    height: 320px;
    border-radius: 16px;
}

body.tv-ui #episodes-row .episode-info,
body.tv-ui #episodes-row .poster-title {
    font-size: 20px;
}

/* Login / QR */
body.tv-ui #qr-box {
    width: 420px;
    height: 420px;
}

body.tv-ui .login-url {
    font-size: 18px;
    padding: 10px 18px;
}

/* Payment modal */
body.tv-ui .payment-card {
    max-width: 760px;
    padding: 30px;
    border-radius: 18px;
}

body.tv-ui .payment-qr-close {
    top: 32px;
    right: 32px;
    width: 72px;
    height: 72px;
    font-size: 44px;
}

body.tv-ui .payment-qr-fullscreen {
    width: min(94vw, 94vh);
    height: min(94vw, 94vh);
    max-width: 1720px;
    max-height: 1720px;
    border-radius: 18px;
    padding: 16px;
}

body.tv-ui .payment-modal.qr-fullscreen .payment-card {
    width: min(96vw, 1760px);
    max-width: min(96vw, 1760px);
}

body.tv-ui .payment-field label {
    font-size: 18px;
}

body.tv-ui .payment-field input,
body.tv-ui .payment-field select {
    height: 62px;
    font-size: 22px;
    padding: 0 16px;
}

body.tv-ui .payment-qr {
    width: min(84vw, 84vh);
    height: min(84vw, 84vh);
    max-width: 1500px;
    max-height: 1500px;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
    grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid>.plan-card {
    padding: 14px 14px !important;
    min-width: 0 !important;
    min-height: 420px;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid .plan-name {
    font-size: 20px;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid .plan-price {
    font-size: 36px;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid .plan-note,
body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid .plan-features {
    font-size: 14px;
    line-height: 1.45;
}

body:not(.tv-ui) .settings-panel[data-panel="subscription"] #plans-grid .plan-cta {
    font-size: 17px;
    height: 50px;
    width: 100%;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid>.plan-card {
    min-width: 0 !important;
}

body.tv-ui .settings-panel[data-panel="subscription"] #plans-grid .plan-cta {
    width: 100%;
}

body.tv-ui .payment-status {
    font-size: 18px;
}

/* Toasts */
body.tv-ui .toast {
    padding: 18px 22px;
    border-radius: 14px;
}

body.tv-ui .toast-title {
    font-size: 20px;
}

body.tv-ui .toast-message {
    font-size: 18px;
}

body.tv-ui .toast-btn {
    font-size: 18px;
    padding: 10px 16px;
    border-radius: 12px;
}

/* Support */
body.tv-ui .support-wrap {
    padding: 44px 60px 90px;
}

body.tv-ui .support-card {
    width: min(900px, 100%);
    padding: 30px;
    border-radius: 18px;
    gap: 18px;
}

body.tv-ui .support-textarea {
    min-height: 180px;
    font-size: 22px;
}

/* Remote-only white focus ring */
body.input-remote .focusable:focus,
body.input-remote button:focus,
body.input-remote input:focus,
body.input-remote select:focus,
body.input-remote textarea:focus,
body.input-remote [role="button"]:focus,
body.input-remote .rail-card:focus,
body.input-remote .episode-card:focus,
body.input-remote .plan-card:focus,
body.input-remote .profile-card:focus,
body.input-remote .season-btn:focus,
body.input-remote .settings-tab:focus,
body.input-remote .profile-menu-btn:focus,
body.input-remote .back-btn:focus,
body.input-remote .play-btn:focus,
body.input-remote .trailer-btn:focus,
body.input-remote .trailer-close-btn:focus,
body.input-remote .fav-btn:focus,
body.input-remote .see-all:focus,
body.input-remote .details-tab:focus,
body.input-remote .category-item:focus,
body.input-remote .poster-card:focus {
    outline: none !important;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.92),
        0 0 0 5px rgba(255, 255, 255, 0.3),
        0 14px 28px rgba(0, 0, 0, 0.45) !important;
    border-radius: inherit;
}

/* Text-focused items: keep readable glow without ugly square ring */
body.input-remote .category-item:focus,
body.input-remote .details-tab:focus,
body.input-remote .see-all:focus {
    box-shadow: none !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.1);
}

/* Disable white focus visuals while pointer/mouse is active */
body.input-pointer .focusable:focus,
body.input-pointer button:focus,
body.input-pointer input:focus,
body.input-pointer select:focus,
body.input-pointer textarea:focus,
body.input-pointer [role="button"]:focus,
body.input-pointer .episode-card:focus-visible,
body.input-pointer .episode-card:focus,
body.input-pointer .episode-card:hover {
    outline: none !important;
    box-shadow: none !important;
}
