:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #10131b;
  --panel-soft: #141822;
  --muted: #9298a9;
  --text: #f6f7fb;
  --accent: #ad80ff;
  --accent-strong: #9761fa;
  --line: rgba(255, 255, 255, .075);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", sans-serif; font-size: 14px; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; width: 248px; padding: 34px 20px 22px; border-right: 1px solid var(--line); background: #0c0e14; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 0 59px 10px; color: white; font-family: Outfit, sans-serif; font-size: 21px; font-weight: 700; letter-spacing: -.7px; text-decoration: none; }
.brand-accent { color: var(--accent); }
.brand-mark { display: flex; height: 26px; align-items: center; gap: 3px; }
.brand-mark span { width: 5px; border-radius: 5px; background: var(--accent); }
.brand-mark span:nth-child(1), .brand-mark span:nth-child(3) { height: 15px; opacity: .7; }
.brand-mark span:nth-child(2) { height: 25px; }
.sidebar-label, .section-kicker, .modal-kicker { color: #777d8d; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.sidebar-label { margin: 0 0 15px 11px; }
.sidebar-search-label { margin: -1px 0 7px 10px; color: #777d8d; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.sidebar-search-wrap, .group-search-wrap { display: flex; height: 38px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #292d39; border-radius: 5px; background: #10131a; color: #8f95a4; }
.sidebar-search-wrap { margin-bottom: 19px; }
.sidebar-search-wrap > span, .group-search-wrap > span { font-size: 19px; transform: rotate(-20deg); }
.sidebar-search-wrap input, .group-search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #f1f1f5; font-size: 11px; }
.sidebar-search-wrap input::placeholder, .group-search-wrap input::placeholder { color: #747a89; }
.sidebar-search-wrap:focus-within, .group-search-wrap:focus-within { border-color: #7652ac; }
.main-nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: #a2a7b5; text-align: left; cursor: pointer; transition: .2s; }
.nav-item:hover { background: #171a24; color: white; }
.nav-item.active { background: rgba(173, 128, 255, .12); color: #c7a8ff; }
.nav-icon { width: 17px; font-size: 19px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.playlist-status { display: flex; align-items: center; gap: 9px; margin: 0 0 16px 3px; color: #9b9faf; font-size: 12px; }
.status-dot, .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #50d39a; box-shadow: 0 0 10px #50d39a66; }
.settings-button { width: 100%; height: 42px; border: 1px solid rgba(173, 128, 255, .32); border-radius: 6px; background: rgba(173, 128, 255, .09); color: #c5a4ff; cursor: pointer; }
.settings-button span { margin-right: 5px; font-size: 18px; vertical-align: -1px; }
.remove-playlist-button { width: 100%; min-height: 36px; margin-top: 8px; border: 1px solid #653741; border-radius: 6px; background: #28161b; color: #f0a3ad; font-size: 10px; cursor: pointer; }
.remove-playlist-button:hover, .remove-playlist-inline:hover { border-color: #b95867; background: #3b1a22; color: #ffbac2; }
.sidebar-footnote { margin: 12px 2px 0; color: #666c7b; font-size: 10px; line-height: 1.6; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 1; display: flex; height: 73px; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--line); background: rgba(9, 11, 16, .93); backdrop-filter: blur(14px); }
.breadcrumbs { display: flex; gap: 12px; align-items: center; color: #a4a9b6; font-size: 11px; font-weight: 600; letter-spacing: .9px; }
.breadcrumbs span:first-child { color: #717788; }
.crumb-separator { color: #4d5260; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.icon-button { border: 0; background: transparent; color: #b0b5c2; font-size: 27px; cursor: pointer; transform: rotate(-20deg); }
.search-input { width: 0; padding: 0; border: 0; outline: none; background: transparent; color: white; transition: width .25s; }
.search-input.open { width: 230px; padding: 9px 12px; border: 1px solid #292d39; border-radius: 5px; }
.profile-button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #8d6bca; border-radius: 50%; background: #34244f; color: #dfcaff; font-weight: 700; cursor: pointer; }
.content { max-width: 1520px; margin: 0 auto; padding: 30px 46px 20px; }
.hero { position: relative; display: flex; min-height: 340px; align-items: center; overflow: hidden; padding: 44px 53px; border: 1px solid rgba(255,255,255,.045); border-radius: 12px; background: radial-gradient(ellipse at 76% 43%, rgba(127, 67, 186, .40), transparent 31%), radial-gradient(ellipse at 94% 12%, rgba(62, 65, 153, .26), transparent 37%), linear-gradient(111deg, #181427 0%, #161324 45%, #101321 100%); }
.hero::before { position: absolute; top: -95px; right: 95px; width: 370px; height: 450px; border: 1px solid rgba(219,193,255,.1); border-radius: 48%; content: ""; transform: rotate(32deg); }
.hero::after { position: absolute; top: -70px; right: 152px; width: 260px; height: 400px; border: 1px solid rgba(219,193,255,.09); border-radius: 48%; content: ""; transform: rotate(32deg); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,12,20,.15) 0%, transparent 75%, rgba(13,14,24,.25)); }
.hero-content { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #c2a8e9; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.eyebrow .live-dot { width: 6px; height: 6px; background: #b982ff; box-shadow: 0 0 9px #b982ff; }
.hero h1 { margin: 17px 0 10px; font-family: Outfit, sans-serif; font-size: clamp(36px, 4vw, 49px); font-weight: 700; letter-spacing: -1.9px; line-height: 1.06; }
.hero h1 span { color: #c7a4ff; }
.hero p { margin: 0; color: #b5b1c4; font-size: 13px; }
.hero-actions { display: flex; gap: 11px; margin-top: 23px; }
.primary-button, .secondary-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer; transition: .2s; }
.primary-button { border: 1px solid #b388ff; background: linear-gradient(120deg, #a775f3, #8860dc); color: #fff; box-shadow: 0 5px 20px #8754dd33; }
.primary-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.primary-button span { font-size: 10px; }
.secondary-button { border: 1px solid #ffffff29; background: #ffffff0a; color: #eeeaf5; }
.secondary-button:hover { border-color: #ba98f3; background: #ffffff13; }
.hero-pagination { position: absolute; right: 26px; bottom: 21px; display: flex; gap: 5px; }
.hero-pagination span { width: 5px; height: 5px; border-radius: 50%; background: #646071; }
.hero-pagination .page-current { width: 17px; border-radius: 5px; background: #c19eff; }
.hero-note { position: absolute; right: 27px; bottom: 43px; display: flex; align-items: center; gap: 8px; color: #aaa4b7; font-size: 8px; letter-spacing: 1.25px; }
.hero-note-line { width: 22px; height: 1px; background: #a98ad4; }
.playlist-banner { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 13px 17px; border: 1px solid var(--line); border-radius: 7px; background: #11141d; }
.playlist-banner > div { display: flex; align-items: center; gap: 13px; }
.banner-actions { display: flex; align-items: center; gap: 15px; }
.banner-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: #211935; color: #c6a4ff; font-size: 18px; }
.playlist-banner strong, .playlist-banner small { display: block; }
.playlist-banner strong { font-size: 12px; }
.playlist-banner small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.text-button { border: 0; background: transparent; color: #bd9bfa; font-size: 11px; cursor: pointer; }
.text-button span { margin-left: 5px; }
.remove-playlist-inline { padding: 7px 9px; border: 1px solid #653741; border-radius: 5px; color: #ee9aa5; }
.install-button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(173,128,255,.38); border-radius: 5px; background: #211932; color: #d1b4ff; font-size: 10px; font-weight: 600; cursor: pointer; }
.install-button:hover { border-color: #b388ff; background: #2b2040; }
.continue-section, .browse-section { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 15px; }
.section-heading h2 { margin: 5px 0 0; font-family: Outfit, sans-serif; font-size: 21px; font-weight: 600; letter-spacing: -.4px; }
.section-kicker { font-size: 9px; letter-spacing: 1.3px; }
.section-count { padding-bottom: 3px; color: #787e8d; font-size: 10px; }
.category-filters { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 16px; }
.catalog-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); align-items: start; gap: 20px; }
.catalog-layout:has(.group-sidebar.hidden) { grid-template-columns: minmax(0, 1fr); }
.group-sidebar { position: sticky; top: 91px; max-height: calc(100vh - 115px); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #10131a; }
.group-sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.group-sidebar-heading > span:last-child { color: #858b99; font-size: 10px; }
.group-filters { display: flex; max-height: calc(100vh - 170px); flex-direction: column; gap: 3px; overflow-y: auto; padding: 7px; }
.group-button { display: flex; width: 100%; min-height: 39px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #a8adba; font-size: 11px; text-align: left; cursor: pointer; }
.group-button > span { overflow-wrap: anywhere; }
.group-button small { flex: 0 0 auto; color: #777e8d; font-size: 9px; }
.group-button:hover { background: #181b25; color: #f0edf6; }
.group-button.active { border-color: #624887; background: #211932; color: #d1b4ff; }
.group-button.active small { color: #b695ed; }
.catalog-results { min-width: 0; }
.group-search-wrap { margin-bottom: 15px; }
.clear-search { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #9fa4b1; font-size: 19px; cursor: pointer; }
.clear-search:hover { background: #252834; color: white; }
.catalog-results .media-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.series-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.series-detail-toolbar .category-filters { margin: 0; }
.series-card .media-copy p + p { margin-top: 4px; }
.series-card { cursor: pointer; }
.filter-chip { display: inline-flex; height: 29px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #242834; border-radius: 5px; background: #11141b; color: #a3a8b4; font-size: 10px; white-space: nowrap; cursor: pointer; }
.filter-chip span { color: #747a89; font-size: 9px; }
.filter-chip.active { border-color: #7652ac; background: #211932; color: #d1b4ff; }
.filter-chip.active span { color: #b695ed; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 15px 13px; }
.media-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #20232d; border-radius: 6px; background: #11141b; cursor: pointer; transition: transform .2s, border-color .2s; }
.media-card:hover { z-index: 1; border-color: #7757aa; transform: translateY(-3px); }
.media-poster { position: relative; display: grid; height: 123px; overflow: hidden; place-items: center; background: linear-gradient(145deg, #252037, #131722 72%); }
.media-poster::before { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 100%, var(--poster-glow, #8d5ad633), transparent 68%); content: ""; }
.poster-tone-0 { --poster-glow: #9f76ee55; }
.poster-tone-1 { --poster-glow: #d37e8b55; }
.poster-tone-2 { --poster-glow: #68a4c555; }
.poster-tone-3 { --poster-glow: #d1a05f55; }
.poster-tone-4 { --poster-glow: #6fb49a55; }
.poster-tone-5 { --poster-glow: #ac83c955; }
.poster-tone-6 { --poster-glow: #6788cb55; }
.poster-tone-7 { --poster-glow: #d47a6155; }
.poster-symbol { position: relative; color: #ddd0f2; font-family: Outfit, sans-serif; font-size: 33px; font-weight: 700; opacity: .8; text-shadow: 0 3px 18px #bc9cf466; }
.poster-logo { position: relative; width: 100%; height: 100%; object-fit: cover; }
.poster-category { position: absolute; top: 8px; left: 8px; padding: 4px 6px; border-radius: 3px; background: #0b0c11cf; color: #cbb0ff; font-size: 8px; font-weight: 700; letter-spacing: .65px; }
.live-badge { color: #ff9c9c; }
.card-favorite { position: absolute; top: 5px; right: 6px; z-index: 1; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #ffffff24; border-radius: 50%; background: #0b0c11a8; color: white; font-size: 17px; cursor: pointer; }
.card-favorite.saved { color: #d5b8ff; }
.media-copy { padding: 10px 10px 11px; }
.media-copy h3 { overflow: hidden; margin: 0; color: #e6e7ed; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.media-copy p { overflow: hidden; margin: 5px 0 0; color: #7f8594; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 2px; margin-top: 10px; overflow: hidden; background: #292b36; }
.progress-track span { display: block; height: 100%; background: #ad80ff; }
.empty-state { display: none; min-height: 215px; align-items: center; flex-direction: column; justify-content: center; border: 1px dashed #292c38; border-radius: 8px; background: #10121966; text-align: center; }
.empty-state.visible { display: flex; }
.empty-icon { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid #352b47; border-radius: 10px; background: #1e182a; color: #c3a1fb; font-size: 22px; }
.empty-state h3 { margin: 12px 0 5px; font-family: Outfit, sans-serif; font-size: 17px; }
.empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.content-footer { margin-top: 42px; padding: 15px 0 8px; border-top: 1px solid var(--line); color: #565b69; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; text-align: center; }
.content-footer span { margin: 0 5px; color: #9c7acb; }
.hidden { display: none !important; }
.modal, .player-modal { padding: 0; border: 1px solid #2b2b38; background: transparent; color: var(--text); }
.modal { width: min(440px, calc(100vw - 32px)); border-radius: 10px; }
.welcome-modal { width: min(420px, calc(100vw - 32px)); }
.welcome-modal::backdrop { background: #05060aeb; backdrop-filter: blur(9px); }
.load-more-button { display: flex; width: fit-content; margin: 20px auto 0; }
.modal::backdrop, .player-modal::backdrop { background: #05060ad9; backdrop-filter: blur(7px); }
.modal-card { position: relative; padding: 31px; border-radius: 10px; background: #11131b; }
.modal-close { position: absolute; top: 13px; right: 15px; width: 30px; height: 30px; border: 0; background: transparent; color: #9da2b0; font-size: 25px; cursor: pointer; }
.modal-card h2 { margin: 7px 0; font-family: Outfit, sans-serif; font-size: 25px; }
.modal-card > p { margin: 0 0 20px; color: #989dac; font-size: 11px; line-height: 1.6; }
.modal-card label { display: block; margin: 14px 0 6px; color: #c1c4ce; font-size: 10px; font-weight: 600; }
.modal-card input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #292d39; border-radius: 5px; outline: 0; background: #0c0e14; color: white; font-size: 11px; }
.modal-card input:focus { border-color: #8e6ac9; }
.modal-card input::placeholder { color: #626775; }
.modal-error { min-height: 17px; margin-top: 8px; color: #ff8d99; font-size: 10px; }
.modal-submit { width: 100%; margin-top: 5px; }
.diagnose-hosts-button { width: 100%; margin-top: 12px; }
.domain-diagnosis { margin-top: 12px; }
.domain-diagnosis p { margin: 0 0 8px; color: #b7c5bc; font-size: 10px; line-height: 1.5; }
.domain-diagnosis label { display: block; margin: 8px 0 6px; color: #c1c4ce; font-size: 10px; font-weight: 600; }
.domain-diagnosis textarea { width: 100%; resize: vertical; padding: 8px; border: 1px solid #292d39; border-radius: 5px; background: #0c0e14; color: #d9dce6; font: 10px/1.5 monospace; }
.modal-card .cache-refresh-option { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #989dac; font-size: 10px; font-weight: 400; }
.cache-refresh-option input { width: 13px; height: 13px; margin: 0; accent-color: #9761fa; }
.modal-card .modal-disclaimer { margin: 14px 0 0; color: #646a77; font-size: 9px; }
.remove-warning { margin: 0 0 18px !important; color: #e99aa4 !important; font-size: 10px !important; }
.remove-actions { display: flex; justify-content: flex-end; gap: 9px; }
.danger-button { min-height: 40px; padding: 0 15px; border: 1px solid #a74350; border-radius: 5px; background: #8b2d3a; color: white; font-size: 11px; font-weight: 600; cursor: pointer; }
.danger-button:hover { background: #a83a49; }
.player-modal { width: min(1000px, calc(100vw - 32px)); max-width: none; border-radius: 9px; overflow: visible; }
.player-card { padding: 15px; border-radius: 9px; background: #101219; }
.player-topline { display: flex; height: 33px; align-items: center; justify-content: space-between; padding: 0 5px 12px; color: #969baa; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.player-topline > div { display: flex; align-items: center; gap: 8px; }
.player-close { position: static; }
.video-wrap { position: relative; overflow: hidden; border-radius: 5px; background: #050608; aspect-ratio: 16 / 9; }
.video-wrap video { width: 100%; height: 100%; background: #050608; object-fit: contain; }
.video-error { position: absolute; inset: 0; display: grid; padding: 25px; place-items: center; background: #050608e8; color: #d3d3dc; font-size: 13px; text-align: center; }
.video-error.hidden { display: none !important; }
.player-info { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 2px; }
.player-info h2 { margin: 0; font-family: Outfit, sans-serif; font-size: 17px; }
.player-info p { margin: 4px 0 0; color: #858b99; font-size: 10px; }
.favorite-button { border: 1px solid #383340; border-radius: 5px; background: #1b1723; color: #caaaff; cursor: pointer; }
.player-favorite { padding: 8px 11px; font-size: 13px; }
.player-favorite span { margin-left: 5px; font-size: 10px; }

@media (max-width: 1100px) {
  .sidebar { width: 205px; padding-right: 15px; padding-left: 15px; }
  .main-area { margin-left: 205px; }
  .content { padding-right: 28px; padding-left: 28px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .hero { padding-left: 38px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 108px; flex-direction: column; align-items: stretch; padding: 6px 8px 0; border-top: 1px solid var(--line); border-right: 0; background: #0c0e14; }
  .brand, .sidebar-label, .sidebar-search-label, .sidebar-bottom { display: none; }
  .sidebar-search-wrap { height: 34px; margin: 0 5px 4px; }
  .sidebar-search-wrap input { font-size: 10px; }
  .main-nav { width: 100%; grid-template-columns: repeat(5, 1fr); gap: 0; }
  .nav-item { height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 0; font-size: 9px; }
  .nav-icon { width: auto; font-size: 17px; }
  .main-area { margin-left: 0; padding-bottom: 108px; }
  .topbar { height: 59px; padding: 0 17px; }
  .breadcrumbs { font-size: 9px; }
  .topbar-actions { gap: 6px; }
  .install-button { min-height: 30px; padding: 0 8px; font-size: 9px; }
  .playlist-banner { align-items: flex-start; gap: 10px; }
  .banner-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .remove-playlist-inline, .text-button { font-size: 9px; }
  .search-input.open { width: min(42vw, 200px); }
  .content { padding: 17px 15px; }
  .hero { min-height: 309px; padding: 34px 23px; }
  .hero h1 { font-size: 37px; }
  .hero p { max-width: 260px; font-size: 11px; line-height: 1.6; }
  .hero-note { display: none; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 11px 9px; }
  .media-poster { height: 110px; }
  .section-heading h2 { font-size: 19px; }
  .catalog-layout, .catalog-layout:has(.group-sidebar.hidden) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .group-sidebar { position: static; max-height: 190px; }
  .group-filters { max-height: 135px; }
  .group-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .catalog-results .media-grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); }
}
