/* Embedded Live TV uses the shared NurFlix theme; never style the app shell. */
.dtv-live-shell {
    --live-border: rgba(255, 255, 255, .12);
    --live-muted: var(--text-secondary, #cccdd2);
    padding-top: calc(var(--navbar-height, 70px) + 2rem);
    padding-bottom: 3rem;
    color: var(--text-primary, #fff);
    font-family: var(--font-body);
}
.dtv-live-shell [hidden] { display: none !important; }
.dtv-live-shell button, .dtv-live-shell input { font: inherit; }
.dtv-live-shell button { cursor: pointer; color: inherit; }
.dtv-live-shell button:disabled { cursor: default; opacity: .5; }
.dtv-live-shell a { color: inherit; text-decoration: none; }
.dtv-live-shell :is(button, a, input):focus-visible { outline: 2px solid var(--primary-purple); outline-offset: 3px; }
.dtv-live-shell :is(h1, h2, h3, p) { margin-top: 0; }
.dtv-live-shell h2 { font-family: var(--font-brand); font-size: 1.3rem; font-weight: 600; }
.dtv-live-shell .dtv-subheader { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dtv-live-shell .dtv-subheader nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.dtv-live-shell :is(.dtv-subheader button, .nav-link, .quick-bar button, .save-button, .categories button, .sidebar-cats button, .ftp-filter, .primary) {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; padding: .6rem 1rem; border-radius: 8px;
    border: 1px solid var(--live-border); background: var(--bg-card); color: var(--live-muted);
    font-size: .875rem; font-weight: 600; line-height: 1.4;
}
.dtv-live-shell :is(button, .nav-link):hover:not(:disabled) { border-color: var(--primary-purple); color: #fff; }
.dtv-live-shell :is(.nav-active, .categories button.active, .sidebar-cats button.active, .ftp-filter.active, .primary, .quick-bar .next-primary) {
    background: var(--gradient-primary); border-color: var(--primary-purple); color: #fff;
}
.dtv-live-shell :is(.nav-badge, #savedCount, .ftp-tag) { font-size: .65rem; border-radius: 4px; padding: .15rem .35rem; background: rgba(123, 97, 255, .18); }
.dtv-live-shell .header-note { font-size: .8rem; color: var(--live-muted); white-space: nowrap; }
.dtv-live-shell i, .dtv-live-shell .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-purple-light); margin-right: 5px; }
.dtv-live-shell .intro { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.dtv-live-shell .page-title-clean { margin-bottom: .5rem; font-size: 28px; line-height: 36px; font-weight: 600; }
.dtv-live-shell .intro p { color: var(--live-muted); font-size: .9rem; margin-bottom: 0; }
.dtv-live-shell .channel-total { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.dtv-live-shell .channel-total strong { font-size: 2rem; font-family: var(--font-brand); }
.dtv-live-shell .channel-total span { max-width: 80px; color: var(--live-muted); font-size: .75rem; }
.dtv-live-shell .watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 1.5rem; }
.dtv-live-shell .watch-section { min-width: 0; }
.dtv-live-shell .player { aspect-ratio: 16 / 9; width: 100%; background: #000; border: 1px solid var(--live-border); border-radius: 12px; overflow: hidden; scroll-margin-top: 90px; }
.dtv-live-shell #videoFrame { display: block; width: 100%; height: 100%; border: 0; }
.dtv-live-shell .player:fullscreen { height: 100%; max-height: none; border: 0; border-radius: 0; }
.dtv-live-shell .now-playing { display: flex; align-items: center; gap: .85rem; padding: 1rem 0; }
.dtv-live-shell .current-logo { width: 48px; height: 48px; flex-shrink: 0; background: var(--bg-card); padding: 6px; border-radius: 8px; }
.dtv-live-shell img { object-fit: contain; }
.dtv-live-shell .current-logo img { width: 100%; height: 100%; }
.dtv-live-shell .current-info { min-width: 0; }
.dtv-live-shell .current-info h2 { margin-bottom: .25rem; overflow-wrap: anywhere; }
.dtv-live-shell .current-info p { font-size: .8rem; color: var(--live-muted); margin-bottom: 0; }
.dtv-live-shell .eyebrow, .dtv-live-shell .current-info .eyebrow { color: var(--primary-purple-light); font-size: .65rem; letter-spacing: .1em; font-weight: 600; margin-bottom: .35rem; }
.dtv-live-shell .save-button { margin-left: auto; white-space: nowrap; }
.dtv-live-shell [aria-pressed=true].save-button, .dtv-live-shell .card-fav[aria-pressed=true] { color: var(--primary-purple-light); }
.dtv-live-shell .quick-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.dtv-live-shell .quick-bar .spacer { flex: 1; }
.dtv-live-shell .up-next { display: flex; flex-direction: column; max-height: 650px; padding: 1rem; border: 1px solid var(--live-border); border-radius: 12px; background: var(--bg-card); }
.dtv-live-shell .section-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.dtv-live-shell .section-label h2 { font-size: 1rem; margin: 0; }
.dtv-live-shell .section-label > span { color: var(--primary-purple-light); font-size: .6rem; white-space: nowrap; }
.dtv-live-shell :is(.search, .sidebar-search) { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--live-border); background: var(--bg-dark); border-radius: 8px; }
.dtv-live-shell :is(.search, .sidebar-search):focus-within { border-color: var(--primary-purple); }
.dtv-live-shell input { background: transparent; color: inherit; width: 100%; min-width: 0; border: 0; outline: none; font-size: .875rem; }
.dtv-live-shell input::placeholder { color: var(--text-muted); }
.dtv-live-shell .sidebar-cats { display: flex; gap: .4rem; overflow-x: auto; flex-shrink: 0; padding: .75rem 0; }
.dtv-live-shell .sidebar-cats button { font-size: .7rem; padding: .4rem .6rem; white-space: nowrap; }
.dtv-live-shell #featured { display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.dtv-live-shell .featured-channel { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .65rem; border: 1px solid transparent; background: var(--bg-dark); border-radius: 8px; text-align: left; }
.dtv-live-shell .featured-channel.active { border-color: var(--primary-purple); background: rgba(123, 97, 255, .12); }
.dtv-live-shell .featured-logo { width: 54px; height: 40px; flex-shrink: 0; }
.dtv-live-shell .featured-logo img { width: 100%; height: 100%; }
.dtv-live-shell .featured-meta { min-width: 0; flex: 1; }
.dtv-live-shell .featured-meta strong { display: block; font-size: .85rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dtv-live-shell .featured-meta small { font-size: .7rem; color: var(--live-muted); }
.dtv-live-shell .featured-status { display: flex; align-items: center; font-size: .65rem; }
.dtv-live-shell .aside-footer { border-top: 1px solid var(--live-border); padding-top: .75rem; margin-top: .75rem; font-size: .65rem; color: var(--live-muted); }
.dtv-live-shell .browse { padding: 2.5rem 0; scroll-margin-top: 90px; }
.dtv-live-shell :is(.browse-heading, .ftp-header) { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.dtv-live-shell :is(.browse-heading, .ftp-header) h2 { margin-bottom: 0; }
.dtv-live-shell .browse-heading .eyebrow { display: none; }
.dtv-live-shell .search { width: min(100%, 340px); }
.dtv-live-shell kbd { font-size: .7rem; background: var(--bg-card); }
.dtv-live-shell .filter-row { margin: 1rem 0 1.5rem; }
.dtv-live-shell :is(.categories, .ftp-filters) { display: flex; flex-wrap: wrap; gap: .5rem; }
.dtv-live-shell #resultCount { display: block; margin-top: .75rem; font-size: .8rem; color: var(--live-muted); }
.dtv-live-shell .cat-count { font-size: .7rem; opacity: .75; }
.dtv-live-shell .channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.5rem 1rem; }
.dtv-live-shell .channel-card { position: relative; min-width: 0; }
.dtv-live-shell .card-tune { display: block; width: 100%; border: 0; padding: 0; background: transparent; text-align: left; }
.dtv-live-shell .logo-area { display: flex; position: relative; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border: 1px solid var(--live-border); border-radius: 10px; background: var(--bg-card); overflow: hidden; }
.dtv-live-shell .logo-area img { width: 65%; height: 65%; }
.dtv-live-shell .logo-area::after { content: 'LIVE'; position: absolute; bottom: 8px; right: 8px; padding: 2px 6px; background: var(--primary-purple); color: #fff; font-size: .6rem; border-radius: 4px; }
.dtv-live-shell .unavailable .logo-area::after { content: 'OFFLINE'; background: #414355; }
.dtv-live-shell .channel-card.selected .logo-area, .dtv-live-shell .card-tune:hover .logo-area { border-color: var(--primary-purple); }
.dtv-live-shell .channel-card.selected strong { color: var(--primary-purple-light); }
.dtv-live-shell .card-details { display: block; padding: .75rem 44px 0 0; }
.dtv-live-shell .card-details strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; }
.dtv-live-shell .card-details small { color: var(--live-muted); font-size: .75rem; }
.dtv-live-shell .card-fav { position: absolute; right: 0; bottom: 0; width: 44px; height: 44px; background: transparent; border: 0; font-size: 1.5rem; }
.dtv-live-shell :is(.empty, .notice) { padding: 2rem; text-align: center; border: 1px solid var(--live-border); border-radius: 12px; color: var(--live-muted); }
.dtv-live-shell .ftp-section { border-top: 1px solid var(--live-border); padding-top: 2rem; }
.dtv-live-shell .ftp-header { flex-wrap: wrap; margin-bottom: 1.5rem; }
.dtv-live-shell .ftp-subtitle { font-size: .85rem; color: var(--live-muted); margin: .5rem 0 0; }
.dtv-live-shell .ftp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.dtv-live-shell .ftp-card { display: flex; align-items: center; gap: .75rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--live-border); border-radius: 10px; }
.dtv-live-shell .ftp-card:hover { border-color: var(--primary-purple); }
.dtv-live-shell .ftp-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; background: rgba(123, 97, 255, .15); color: var(--primary-purple-light); font-weight: 700; }
.dtv-live-shell .ftp-body { flex: 1; min-width: 0; }
.dtv-live-shell .ftp-body strong { font-size: .9rem; }
.dtv-live-shell .ftp-body small, .dtv-live-shell .ftp-url { display: block; font-size: .75rem; color: var(--live-muted); overflow-wrap: anywhere; }
.dtv-live-shell .ftp-url { margin-top: .3rem; color: var(--primary-purple-light); }
.dtv-live-shell #toast { position: fixed; z-index: 1050; bottom: 90px; left: 50%; transform: translateX(-50%); max-width: 90vw; padding: .75rem 1.25rem; border: 1px solid var(--border-purple); border-radius: 8px; background: var(--bg-card); box-shadow: 0 8px 30px #0008; }
@media (max-width: 1100px) {
    .dtv-live-shell .watch-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
    .dtv-live-shell .quick-bar .spacer { display: none; }
}
@media (max-width: 900px) {
    .dtv-live-shell .watch-layout { grid-template-columns: minmax(0, 1fr); }
    .dtv-live-shell .up-next { max-height: 380px; }
}
@media (max-width: 600px) {
    .dtv-live-shell { padding-top: calc(var(--navbar-height, 70px) + 1rem); }
    .dtv-live-shell .header-note, .dtv-live-shell .channel-total { display: none; }
    .dtv-live-shell .dtv-subheader { margin-bottom: 1rem; }
    .dtv-live-shell .intro { margin-bottom: 1rem; }
    .dtv-live-shell .page-title-clean { font-size: 24px; }
    .dtv-live-shell .intro p { font-size: .8rem; }
    .dtv-live-shell .now-playing { flex-wrap: wrap; }
    .dtv-live-shell .current-info { flex: 1; }
    .dtv-live-shell .current-info h2 { font-size: 1.1rem; }
    .dtv-live-shell .save-button { font-size: .75rem; padding: .5rem; }
    .dtv-live-shell .save-button span { display: none; }
    .dtv-live-shell .quick-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .dtv-live-shell .browse-heading { flex-direction: column; align-items: stretch; gap: 1rem; }
    .dtv-live-shell .search { width: 100%; }
    .dtv-live-shell .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; }
    .dtv-live-shell .card-details strong { font-size: .8rem; }
    .dtv-live-shell .card-details small { font-size: .65rem; }
    .dtv-live-shell .categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; }
    .dtv-live-shell .categories button { white-space: nowrap; }
    .dtv-live-shell .ftp-grid { grid-template-columns: minmax(0, 1fr); }
}
