:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #11151d;
  color: #f5f7fb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 82% 0%, #222c3e 0, #11151d 48%); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #bfd4fa; outline-offset: 3px; }
.page { max-width: 1320px; margin: auto; padding: clamp(20px, 4vw, 50px); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: clamp(38px, 6vw, 74px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f5f7fb; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: #355c95; color: #e6f0ff; font-size: 15px; letter-spacing: -.05em; }
.header-label, .eyebrow { color: #9aa9c2; font-size: 12px; font-weight: 750; letter-spacing: .16em; }
.eyebrow { margin: 0 0 14px; }
h1 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -.045em; }
.intro { margin: 16px 0 36px; color: #aab6c8; font-size: clamp(17px, 2vw, 21px); line-height: 1.45; }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.service-card { display: flex; align-items: center; gap: 18px; min-height: 170px; width: 100%; padding: 26px; border: 1px solid #344154; border-radius: 22px; background: #1d2532; color: inherit; text-align: left; text-decoration: none; box-shadow: 0 14px 34px #080b1266; transition: background .15s, transform .15s, border-color .15s; }
.service-card:hover, .service-card:focus-visible { background: #273449; border-color: #7fa8e7; transform: translateY(-3px); }
.service-card:active { transform: scale(.98); }
.service-card:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.service-mark { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 15px; font-size: 19px; font-weight: 800; letter-spacing: -.04em; }
.mark-jellyfin { background: #4e306c; color: #f3d7ff; }
.mark-tube { background: #164e54; color: #c6f7ee; }
.mark-youtube { background: #6d2027; color: #ffe3e3; }
.service-copy { display: grid; gap: 7px; min-width: 0; }
.service-copy strong { font-size: 21px; line-height: 1.15; }
.service-copy > span { color: #afbdd0; font-size: 15px; line-height: 1.35; }
.service-arrow { margin-left: auto; align-self: flex-start; color: #9eafc9; font-size: 23px; }
.home-note { max-width: 730px; margin: 32px 0 10px; color: #8897ac; font-size: 14px; line-height: 1.5; }
.lab-link { color: #9dbcf3; font-size: 14px; }
.back-button { min-height: 44px; padding: 7px 0; border: 0; background: transparent; color: #a9c7fb; font-weight: 700; }
.back-button:hover { color: #fff; }
.catalog-heading { display: flex; align-items: center; gap: 18px; margin: 24px 0 28px; }
.catalog-heading .service-mark { width: 66px; height: 66px; font-size: 22px; }
.catalog-heading .eyebrow { margin-bottom: 7px; }
.catalog-heading h1 { font-size: clamp(32px, 4vw, 50px); }
.search-form { max-width: 660px; margin-bottom: 18px; }
.search-form label { display: block; margin-bottom: 9px; color: #c5d0de; font-size: 14px; font-weight: 650; }
.search-controls { display: flex; gap: 10px; }
.search-controls input { min-width: 0; flex: 1; min-height: 48px; padding: 10px 15px; border: 1px solid #45536a; border-radius: 11px; background: #1e2836; color: #fff; }
.search-controls button, .player-controls button, .load-more { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 11px; background: #85adf0; color: #101826; font-weight: 750; }
.search-controls button:hover, .player-controls button:hover, .load-more:hover { background: #a8c7fb; }
.catalog-status { min-height: 22px; margin: 0; color: #a8bedf; font-size: 14px; }
.media-section { margin-top: 32px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: clamp(21px, 2.5vw, 27px); letter-spacing: -.025em; }
.section-heading span { color: #8293ac; font-size: 13px; }
.media-rail { display: flex; gap: 15px; overflow-x: auto; padding: 0 0 13px; scroll-snap-type: x proximity; scrollbar-color: #4e607a transparent; }
.media-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #334256; border-radius: 16px; background: #1d2532; color: inherit; text-align: left; }
.media-card:hover, .media-card:focus-visible { border-color: #82aaf0; background: #28364a; }
.media-rail .media-card { flex: 0 0 clamp(190px, 22vw, 260px); scroll-snap-align: start; }
.media-poster { display: grid; place-items: center; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #334259, #1d2939); }
.media-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-fallback { color: #afbdd0; font-size: 24px; font-weight: 800; }
.media-duration { position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; border-radius: 5px; background: #0c1119d9; color: #fff; font-size: 12px; font-weight: 700; }
.media-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: #ffffff55; }
.media-progress span { display: block; height: 100%; background: #85adf0; }
.media-copy { display: grid; gap: 5px; padding: 12px 13px 14px; }
.media-copy strong { overflow: hidden; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.media-copy span { overflow: hidden; color: #9aabc0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.empty-row { width: 100%; padding: 23px; border: 1px dashed #39485b; border-radius: 14px; color: #91a0b5; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.media-grid .media-card { width: 100%; }
.load-more { display: block; margin: 25px auto 8px; }
.player-panel { position: fixed; inset: 0; z-index: 20; overflow-y: auto; background: #11151df7; }
.player-shell { max-width: 1100px; margin: auto; padding: clamp(15px, 3vw, 32px); }
.player-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: #8293ac; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.player-shell h2 { margin: 10px 0 3px; font-size: clamp(22px, 3vw, 34px); line-height: 1.2; }
#player-subtitle { margin: 0 0 16px; color: #aab6c8; }
.screen { overflow: hidden; width: 100%; aspect-ratio: 16 / 9; border: 1px solid #344154; border-radius: 14px; background: #020304; }
.screen canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
#player-status { min-height: 20px; margin: 11px 0; color: #b9d2fa; font-size: 14px; }
.time-row { display: flex; align-items: center; gap: 12px; color: #c2cfdf; font-variant-numeric: tabular-nums; font-size: 13px; }
.time-row input { width: 100%; accent-color: #85adf0; cursor: pointer; }
.player-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.player-controls .secondary { background: #344154; color: #f5f7fb; }
.player-controls .secondary:hover { background: #45566d; }
@media (max-width: 850px) { .services { grid-template-columns: 1fr; } .service-card { min-height: 112px; padding: 20px; } .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .page { padding: 21px 17px 38px; } .site-header { margin-bottom: 42px; } .header-label { font-size: 10px; } .intro { margin-bottom: 28px; } .service-mark { width: 48px; height: 48px; font-size: 17px; } .catalog-heading .service-mark { width: 56px; height: 56px; font-size: 18px; } .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; } .media-rail .media-card { flex-basis: 205px; } .section-heading span { display: none; } .player-controls button { flex: 1; min-width: 125px; } }
