:root {
    --bg: #07080d;
    --panel: #101219;
    --panel-2: #171a23;
    --line: rgba(255, 255, 255, 0.08);
    --muted: #8e94a7;
    --text: #f7f8fc;
    --accent: #ff4d67;
    --accent-2: #ff8a4c;
    --green: #54e6a1;
    --safe-top: var(--inset-top, env(safe-area-inset-top, 0px));
    --safe-right: var(--inset-right, env(safe-area-inset-right, 0px));
    --safe-bottom: var(--inset-bottom, env(safe-area-inset-bottom, 0px));
    --safe-left: var(--inset-left, env(safe-area-inset-left, 0px));
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 15% -10%,
            rgba(255, 77, 103, 0.16),
            transparent 30rem
        ),
        radial-gradient(
            circle at 92% 8%,
            rgba(71, 94, 255, 0.12),
            transparent 26rem
        ),
        var(--bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

.shell {
    width: min(1680px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 22px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.drawer-toggle {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 38px;
    height: 30px;
    object-fit: cover;
}

.brand span:last-child {
    color: var(--muted);
    font-weight: 500;
}

.web-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(132, 82, 255, 0.16),
            transparent 11rem
        ),
        rgba(255, 255, 255, 0.035);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 18px 50px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.web-nav-item {
    display: inline-flex;
    min-width: 112px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    color: #8f95a8;
    text-decoration: none;
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    transition:
        color 0.18s,
        border-color 0.18s,
        background 0.18s,
        box-shadow 0.18s,
        transform 0.18s;
}

.web-nav-item:hover {
    color: #e6e2ff;
    background: rgba(255, 255, 255, 0.045);
}

.web-nav-item:focus-visible {
    box-shadow: 0 0 0 4px rgba(132, 82, 255, 0.16);
}

.web-nav-item:active {
    transform: translateY(1px);
}

.web-nav-item svg {
    width: 18px;
    height: 18px;
}

.web-nav-item.active {
    border-color: rgba(185, 151, 255, 0.24);
    color: white;
    background:
        linear-gradient(135deg, rgba(151, 89, 255, 0.92), rgba(94, 61, 220, 0.82));
    box-shadow:
        0 14px 30px rgba(92, 54, 210, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.web-nav-download {
    min-width: 142px;
    color: #d7c7ff;
}

.web-nav-download:hover {
    color: white;
    background: rgba(132, 82, 255, 0.12);
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(84, 230, 161, 0.1);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 18px;
    min-height: calc(100vh - 102px);
}

.guide-stack {
    min-width: 0;
}

.app-view[hidden] {
    display: none !important;
}

.stage,
.catalog {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(16, 18, 25, 0.9);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.stage {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.screen {
    position: relative;
    display: grid;
    min-height: 430px;
    flex: 1;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(255, 77, 103, 0.08),
            transparent 38%
        ),
        #030408;
}

.screen::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px
    );
    background-size: 100% 4px;
    content: "";
    z-index: 1;
}

video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #030408;
    object-fit: contain;
}

.screen:not(.is-playing) video {
    visibility: hidden;
}

.screen-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(6, 7, 11, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    backdrop-filter: blur(10px);
}

.screen-badge.visible {
    display: flex;
}

.screen-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.player-state {
    position: relative;
    z-index: 2;
    display: grid;
    max-width: 440px;
    padding: 32px;
    place-items: center;
    text-align: center;
}

.state-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.035);
}

.state-icon svg {
    width: 30px;
    height: 30px;
}

.state-icon.is-loading svg {
    animation: state-spin 0.5s linear infinite;
}

.player-state h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: -0.04em;
}

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

.sound-button {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: none;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
    background: rgba(7, 8, 13, 0.82);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 750;
    backdrop-filter: blur(12px);
}

.sound-button.visible {
    display: flex;
}

.sound-button svg {
    width: 17px;
    height: 17px;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 102px;
    padding: 18px 22px;
    border-top: 1px solid var(--line);
}

.favorite-toggle {
    display: grid;
    width: 32px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    color: #b997ff;
    background: transparent;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.favorite-toggle[hidden] {
    display: none;
}

.favorite-toggle svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
        fill 0.18s ease,
        transform 0.18s ease;
}

.favorite-toggle.active {
    color: #ff4d67;
    background: transparent;
}

.favorite-toggle.active svg {
    fill: currentColor;
    transform: scale(1.06);
}

.favorite-toggle:focus,
.favorite-toggle:focus-visible {
    outline: none;
    box-shadow: none;
}

.channel-art {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    color: white;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.04em;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.channel-art img,
.card-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 6px;
    border-radius: inherit;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.32))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.48));
    object-fit: contain;
}

.channel-art.has-logo,
.card-art.has-logo {
    color: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #343844, #1b1e27) !important;
}

.channel-copy {
    min-width: 0;
    flex: 1;
}

.eyebrow {
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.channel-copy h1 {
    overflow: hidden;
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-copy p {
    overflow: hidden;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.tag {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #c8cbd6;
    background: rgba(255, 255, 255, 0.035);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.catalog {
    display: flex;
    height: calc(100vh - 102px);
    max-height: calc(100vh - 102px);
    min-height: 0;
    flex-direction: column;
}

.catalog-head {
    padding: 21px 20px 14px;
}

.home-head,
.sports-head,
.favorites-head {
    background:
        radial-gradient(
            circle at 92% 0,
            rgba(108, 60, 255, 0.2),
            transparent 11rem
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}

.sports-type-filters {
    margin-top: 0;
}

.sports-status-filters {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.sports-status-filters .filter.active {
    border-color: rgba(147, 101, 255, 0.46);
    background: rgba(128, 78, 255, 0.17);
}

.catalog-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.catalog-title h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -0.035em;
}

.catalog-title span {
    color: var(--muted);
    font-size: 11px;
}

.search {
    position: relative;
}

.search svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 17px;
    height: 17px;
    color: #767c8e;
    pointer-events: none;
    transform: translateY(-50%);
}

.search input {
    width: 100%;
    height: 45px;
    padding: 0 14px 0 41px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: white;
    background: rgba(255, 255, 255, 0.04);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search input::placeholder {
    color: #696f80;
}

.search input:focus {
    border-color: rgba(255, 77, 103, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 77, 103, 0.08);
}

.filters {
    display: flex;
    gap: 7px;
    margin-top: 11px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.filter-group {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.filter-label {
    color: #686e80;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.country-select {
    width: 100%;
    height: 36px;
    padding: 0 34px 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: #d8dae3;
    background-color: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.country-select:focus {
    border-color: rgba(255, 77, 103, 0.45);
}

.filter-group .filters {
    margin-top: 0;
}

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

.filter {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    transition: 0.2s ease;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.filter:focus,
.filter:focus-visible {
    outline: none;
    box-shadow: none;
}

.filter:hover,
.filter.active {
    border-color: rgba(255, 77, 103, 0.34);
    color: white;
    background: rgba(255, 77, 103, 0.12);
}

.channel-list {
    min-height: 0;
    flex: 1;
    padding: 2px 10px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #343744 transparent;
    scrollbar-width: thin;
}

.sports-list {
    min-height: 0;
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #343744 transparent;
    scrollbar-width: thin;
}

.sports-event-card {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    outline: none;
    color: var(--text);
    text-align: left;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(121, 75, 255, 0.09),
            transparent 10rem
        ),
        rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sports-event-card.can-play {
    border-color: rgba(255, 77, 103, 0.19);
}

.sports-event-card.active {
    border-color: rgba(255, 77, 103, 0.25);
    background: linear-gradient(
        90deg,
        rgba(255, 77, 103, 0.14),
        rgba(255, 77, 103, 0.035)
    );
}

.sports-event-card.can-play:hover:not(.active) {
    border-color: rgba(255, 77, 103, 0.38);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(121, 75, 255, 0.14),
            transparent 10rem
        ),
        rgba(255, 255, 255, 0.04);
}

.sports-event-card:focus,
.sports-event-card:focus-visible {
    outline: none;
}

.sports-event-head,
.sports-event-foot {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sports-competition {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sports-competition img {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    object-fit: contain;
}

.sports-event-time {
    flex: 0 0 auto;
    color: #969caf;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.sports-event-time.is-live {
    padding: 4px 8px;
    border-radius: 999px;
    color: white;
    background: #e82f4e;
    box-shadow: 0 0 0 4px rgba(232, 47, 78, 0.1);
}

.sports-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 18px 0 14px;
}

.sports-matchup.is-solo {
    display: block;
    padding: 20px 4px 17px;
}

.sports-solo-event {
    display: flex;
    align-items: center;
    gap: 13px;
}

.sports-solo-event > span:last-child {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.sports-solo-event strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sports-solo-event small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sports-team {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.sports-team-logo {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.sports-team-logo.has-logo {
    background: linear-gradient(145deg, #343844, #1b1e27) !important;
}

.sports-team-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 5px;
    border-radius: inherit;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.sports-team strong {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sports-versus {
    color: #eceef7;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sports-event-foot {
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.065);
    color: #777d90;
    font-size: 9px;
    font-weight: 700;
}

.sports-kind {
    flex: 0 0 auto;
}

.sports-channel-track {
    display: flex;
    width: 0;
    min-width: 0;
    flex: 1;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.sports-channel-track::-webkit-scrollbar {
    display: none;
}

.sports-channel-chip {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    max-width: 145px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: var(--muted);
    background: transparent;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.sports-channel-chip.active {
    border-color: rgba(255, 77, 103, 0.45);
    color: white;
    background: rgba(255, 77, 103, 0.2);
}

.sports-channel-chip.recent-failure:not(.active) {
    opacity: 0.48;
    text-decoration: line-through;
}

.sports-channel-chip:focus,
.sports-channel-chip:focus-visible {
    outline: none;
    box-shadow: none;
}

.sports-watch-label {
    overflow: hidden;
    color: #a68aff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sports-event-card:not(.can-play) .sports-watch-label {
    color: #73798b;
}

.sports-fallback-notice {
    margin: 4px 4px 10px;
    padding: 12px 14px;
    border: 1px solid rgba(166, 138, 255, 0.2);
    border-radius: 13px;
    color: #aeb2c2;
    background: rgba(128, 78, 255, 0.07);
    font-size: 11px;
    line-height: 1.5;
}

.channel-card {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 11px 10px;
    border: 1px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
    background: transparent;
    transition:
        border-color 0.18s,
        background 0.18s,
        transform 0.18s;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
    user-select: none;
}

.channel-card:focus {
    outline: none;
}

.channel-card:focus:not(:focus-visible) {
    box-shadow: none;
}

.channel-card:focus-visible {
    outline: 1px solid rgba(185, 151, 255, 0.42);
    outline-offset: -1px;
}

.channel-card:hover {
    background: rgba(255, 255, 255, 0.045);
    transform: translateX(2px);
}

.channel-card.active {
    border-color: rgba(255, 77, 103, 0.25);
    background: linear-gradient(
        90deg,
        rgba(255, 77, 103, 0.14),
        rgba(255, 77, 103, 0.035)
    );
}

.channel-card.recent-failure:not(.active) {
    opacity: 0.58;
}

.channel-card.recent-failure .play-dot {
    color: #ff8a72;
    background: rgba(255, 106, 91, 0.08);
}

.card-art {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -0.03em;
    overflow: hidden;
}

.card-copy {
    min-width: 0;
    flex: 1;
}

.card-copy strong {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
}

.card-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta i {
    width: 3px;
    height: 3px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #515565;
}

.play-dot {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #8d92a2;
    background: rgba(255, 255, 255, 0.045);
}

.channel-card.active .play-dot,
.channel-card:hover .play-dot {
    color: white;
    background: var(--accent);
}

.play-dot svg {
    width: 12px;
    height: 12px;
    transform: translateX(1px);
}

.empty,
.loading {
    padding: 50px 22px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

.favorites-empty {
    display: grid;
    min-height: auto;
    place-items: center;
    align-content: center;
    gap: 8px;
}

.favorites-empty-icon {
    display: grid;
    width: 76px;
    height: 76px;
    margin-bottom: 8px;
    place-items: center;
    border: 1px solid rgba(185, 151, 255, 0.28);
    border-radius: 24px;
    color: #b997ff;
    background: radial-gradient(
        circle at 70% 20%,
        rgba(181, 105, 255, 0.24),
        rgba(132, 82, 255, 0.07)
    );
    box-shadow:
        0 18px 48px rgba(94, 48, 190, 0.18),
        inset 0 1px rgba(255, 255, 255, 0.08);
}

.favorites-empty-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.favorites-empty strong {
    color: var(--text);
    font-size: 16px;
}

.favorites-empty p {
    max-width: 250px;
    margin: 0;
    font-size: 11px;
}

.loader {
    width: 28px;
    height: 28px;
    margin: 0 auto 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.sentinel {
    height: 1px;
}

.scroll-top {
    position: fixed;
    right: max(24px, calc(var(--safe-right) + 16px));
    bottom: max(24px, calc(var(--safe-bottom) + 16px));
    z-index: 80;
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(216, 190, 255, 0.55);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #9d4edd, #6c3cff);
    box-shadow:
        0 12px 30px rgba(124, 70, 255, 0.48),
        inset 0 1px rgba(255, 255, 255, 0.28);
    transform: translateY(14px) scale(0.92);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.scroll-top:focus {
    outline: none;
}

.scroll-top:focus-visible {
    outline: 2px solid rgba(224, 205, 255, 0.9);
    outline-offset: 3px;
}

.scroll-top:active {
    transform: scale(0.92);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-top svg {
    width: 22px;
    height: 22px;
}

.mobile-nav {
    display: none;
}

.app-drawer-layer,
.info-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 160;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        visibility 0.24s,
        opacity 0.24s ease;
}

.app-drawer-layer.open,
.info-modal-layer.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.drawer-backdrop,
.info-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(2, 3, 8, 0.72);
    backdrop-filter: blur(5px);
}

.app-drawer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 70vw;
    padding: calc(var(--safe-top) + 18px) 16px calc(var(--safe-bottom) + 18px);
    border-right: 1px solid rgba(185, 151, 255, 0.16);
    background:
        radial-gradient(
            circle at 10% 0,
            rgba(126, 70, 255, 0.18),
            transparent 20rem
        ),
        #0d0f17;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.52);
    transform: translateX(-102%);
    transition: transform 0.27s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-drawer-layer.open .app-drawer {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drawer-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.drawer-brand img {
    width: 44px;
    height: 36px;
    flex: 0 0 auto;
    object-fit: cover;
}

.drawer-brand div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.drawer-brand strong {
    font-size: 16px;
    letter-spacing: -0.03em;
}

.drawer-brand span {
    color: #777d90;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.drawer-close {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 11px;
    outline: none;
    color: #a5a9b8;
    background: rgba(255, 255, 255, 0.055);
    -webkit-tap-highlight-color: transparent;
}

.drawer-close svg {
    width: 19px;
    height: 19px;
}

.drawer-divider {
    height: 1px;
    margin: 14px 0;
    background: linear-gradient(
        90deg,
        rgba(185, 151, 255, 0.25),
        rgba(255, 255, 255, 0.04)
    );
}

.drawer-menu {
    display: grid;
    gap: 5px;
}

.drawer-item {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    padding: 7px 9px;
    border: 0;
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    color: #d9dbe4;
    text-align: left;
    text-decoration: none;
    background: transparent;
    font-size: 13px;
    font-weight: 720;
    -webkit-tap-highlight-color: transparent;
}

.drawer-item:active {
    background: rgba(132, 82, 255, 0.12);
}

.drawer-item.is-active {
    color: white;
    background: rgba(132, 82, 255, 0.13);
}

.drawer-item-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(185, 151, 255, 0.14);
    border-radius: 11px;
    color: #b997ff;
    background: rgba(132, 82, 255, 0.07);
}

.drawer-item-icon svg {
    width: 18px;
    height: 18px;
}

.drawer-item.is-active .drawer-item-icon {
    border-color: rgba(185, 151, 255, 0.28);
    color: white;
    background: rgba(132, 82, 255, 0.18);
}

.drawer-exit {
    margin-top: 8px;
    color: #ff8c9c;
}

.drawer-exit .drawer-item-icon {
    border-color: rgba(255, 77, 103, 0.14);
    color: #ff7187;
    background: rgba(255, 77, 103, 0.07);
}

body.drawer-open {
    overflow: hidden;
}

.info-modal-layer {
    z-index: 180;
    display: grid;
    padding: calc(var(--safe-top) + 22px) 22px calc(var(--safe-bottom) + 22px);
    place-items: center;
}

.info-modal {
    position: relative;
    width: min(360px, 100%);
    padding: 24px 20px 18px;
    border: 1px solid rgba(185, 151, 255, 0.2);
    border-radius: 22px;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(132, 82, 255, 0.16),
            transparent 13rem
        ),
        #12141d;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.22s ease;
}

.info-modal-layer.open .info-modal {
    transform: translateY(0) scale(1);
}

.info-modal-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin: 0 auto 13px;
    place-items: center;
    border-radius: 16px;
    color: #b997ff;
    background: rgba(132, 82, 255, 0.12);
}

.info-modal-icon svg {
    width: 25px;
    height: 25px;
}

.info-modal h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.info-modal p {
    margin: 0;
    color: #999eaf;
    font-size: 12px;
    line-height: 1.65;
}

.info-modal-button {
    width: 100%;
    height: 42px;
    margin-top: 20px;
    border: 1px solid rgba(185, 151, 255, 0.25);
    border-radius: 12px;
    outline: none;
    color: white;
    background: linear-gradient(135deg, #8f4cff, #6537db);
    font-size: 12px;
    font-weight: 800;
}

.download-page {
    min-height: 100vh;
}

.download-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 28px 22px 44px;
}

.download-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #aaaec0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.download-back:hover {
    color: white;
}

.download-back svg {
    width: 18px;
    height: 18px;
}

.download-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 54px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 34px;
    background:
        radial-gradient(
            circle at 82% 8%,
            rgba(132, 82, 255, 0.24),
            transparent 24rem
        ),
        radial-gradient(
            circle at 10% 5%,
            rgba(255, 77, 103, 0.16),
            transparent 22rem
        ),
        rgba(16, 18, 25, 0.88);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(20px);
}

.download-hero::after {
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(185, 151, 255, 0.12);
    border-radius: 50%;
    background: rgba(132, 82, 255, 0.05);
    content: "";
}

.download-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 13px 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.download-brand img {
    width: 52px;
    height: 42px;
    object-fit: cover;
}

.download-brand div {
    display: grid;
    gap: 2px;
}

.download-brand span {
    color: #8f95a8;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.download-brand strong {
    font-size: 18px;
    letter-spacing: -0.035em;
}

.download-copy {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    margin-top: 34px;
}

.download-kicker {
    margin: 0 0 10px;
    color: #b997ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.download-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.075em;
}

.download-copy > p:last-child {
    width: min(560px, 100%);
    margin: 18px 0 0;
    color: #a0a5b7;
    font-size: 16px;
    line-height: 1.7;
}

.download-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(560px, 100%);
    margin-top: 34px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(185, 151, 255, 0.18);
    border-radius: 24px;
    background: rgba(5, 6, 10, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.download-card-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    color: #b997ff;
    background: rgba(132, 82, 255, 0.13);
}

.download-card-icon svg {
    width: 28px;
    height: 28px;
}

.download-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.download-card p {
    margin: 0;
    color: #8f95a8;
    font-size: 12px;
}

.download-card p span {
    margin-left: 8px;
    color: #697084;
}

.download-primary {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid rgba(185, 151, 255, 0.28);
    border-radius: 15px;
    cursor: pointer;
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #9759ff, #633ee0);
    box-shadow: 0 16px 35px rgba(92, 54, 210, 0.28);
    font-size: 13px;
    font-weight: 900;
}

.download-primary:disabled {
    cursor: not-allowed;
    color: #8f95a8;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.download-steps {
    display: grid;
    margin-top: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.download-steps article {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(16, 18, 25, 0.74);
}

.download-steps span {
    display: inline-grid;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 12px;
    color: #b997ff;
    background: rgba(132, 82, 255, 0.1);
    font-size: 11px;
    font-weight: 900;
}

.download-steps h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

.download-steps p {
    margin: 0;
    color: #8f95a8;
    font-size: 13px;
    line-height: 1.65;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes state-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1040px) {
    .topbar {
        gap: 14px;
    }

    .web-nav-item {
        min-width: auto;
        padding: 0 13px;
    }

    .web-nav-download span {
        display: none;
    }

    .web-nav-download {
        min-width: auto;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .catalog {
        height: 680px;
        max-height: 680px;
    }

    .screen {
        min-height: min(58vw, 600px);
    }
}

@media (max-width: 620px) {
    body {
        min-height: 100dvh;
    }

    body::before {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 100;
        height: var(--safe-top);
        pointer-events: none;
        background: var(--bg);
        content: "";
    }

    .shell {
        padding: 0 12px calc(68px + var(--safe-bottom));
    }

    .topbar {
        position: sticky;
        top: var(--safe-top);
        z-index: 30;
        display: grid;
        width: 100vw;
        min-height: 52px;
        margin: 0 calc(-12px - var(--safe-right)) 0
            calc(-12px - var(--safe-left));
        padding: 7px calc(16px + var(--safe-right)) 7px
            calc(16px + var(--safe-left));
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        background: var(--bg);
    }

    .drawer-toggle {
        display: grid;
        width: 38px;
        height: 38px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 11px;
        outline: none;
        color: #c8cbd7;
        background: rgba(255, 255, 255, 0.045);
        -webkit-tap-highlight-color: transparent;
    }

    .drawer-toggle svg {
        width: 20px;
        height: 20px;
    }

    .topbar .brand {
        grid-column: 2;
        justify-self: center;
    }

    .web-nav {
        display: none;
    }

    .top-meta {
        display: none;
    }

    .layout {
        gap: 12px;
    }

    .stage,
    .catalog {
        border-radius: 18px;
    }

    .stage {
        position: sticky;
        top: calc(var(--safe-top) + 52px);
        z-index: 20;
        flex: none;
        width: 100vw;
        height: calc(56.25vw + 88px);
        min-height: calc(56.25vw + 88px);
        max-height: calc(56.25vw + 88px);
        margin-right: calc(-12px - var(--safe-right));
        margin-left: calc(-12px - var(--safe-left));
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55);
    }

    .screen {
        min-height: 56.25vw;
        max-height: 56.25vw;
        flex: none;
        width: 100%;
        height: 56.25vw;
        aspect-ratio: auto;
        background: #30323a;
    }

    .screen::before {
        display: none;
    }

    .screen-badge {
        display: none !important;
    }

    .now-playing {
        height: 86px;
        min-height: 86px;
        max-height: 86px;
        flex: 0 0 86px;
        padding: 14px;
    }

    .channel-art {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 15px;
    }

    .channel-copy h1 {
        font-size: 16px;
    }

    .now-tags {
        display: none;
    }

    .catalog {
        height: auto;
        max-height: none;
    }

    .guide-stack {
        min-height: 40vh;
    }

    .sports-head {
        padding-bottom: 10px;
    }

    .sports-list {
        padding: 7px 4px 14px;
        overflow: visible;
    }

    .sports-event-card {
        border-radius: 17px;
    }

    .sports-team-logo {
        width: 62px;
        height: 62px;
    }

    .channel-list {
        overflow: visible;
    }

    .channel-card:focus,
    .channel-card:focus-visible {
        outline: none;
        box-shadow: none;
    }

    .scroll-top {
        right: calc(14px + var(--safe-right));
        bottom: calc(66px + var(--safe-bottom));
    }

    .mobile-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: grid;
        height: calc(54px + var(--safe-bottom));
        padding: 4px max(18px, var(--safe-right)) var(--safe-bottom)
            max(18px, var(--safe-left));
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(10, 11, 17, 0.94);
        box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.42);
        backdrop-filter: blur(18px);
    }

    .mobile-nav-item {
        display: grid;
        min-width: 0;
        padding: 2px 12px;
        place-items: center;
        align-content: center;
        gap: 1px;
        border: 0;
        border-radius: 12px;
        color: #777d90;
        background: transparent;
        font-size: 9px;
        font-weight: 750;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item svg {
        width: 21px;
        height: 21px;
    }

    .mobile-nav-item.active {
        color: #b997ff;
        background: rgba(132, 82, 255, 0.11);
    }

    .download-shell {
        padding: 18px 14px 34px;
    }

    .download-hero {
        border-radius: 24px;
    }

    .download-card {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .download-primary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .download-steps {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 621px) {
    .scroll-top {
        display: none;
    }
}
