/* Home follows the supplied reference; shared details/player styles stay separate. */
*, *::before, *::after { box-sizing: border-box; }
:root { --home-bg: #05070a; --home-text: #eef1f6; --home-muted: #8a94a6; --home-red: #dc2626; --home-gutter: 48px; }
html { background: var(--home-bg); scroll-behavior: smooth; scrollbar-color: #54565b var(--home-bg); }
body { margin: 0; background: var(--home-bg); color: var(--home-text); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.home-header, .home-hero, .home-main, .home-footer, .home-list { line-height: 1.5; }
.home-container { width: 100%; max-width: 1400px; margin: 0 auto; padding-left: var(--home-gutter); padding-right: var(--home-gutter); }
.home-header a, .home-footer a { color: inherit; text-decoration: none; }
.home-header button, .home-hero button, .home-main button, .home-main select, .home-list button { font: inherit; cursor: pointer; }
.home-header :focus-visible, .home-hero :focus-visible, .home-main :focus-visible, .home-footer :focus-visible, .home-list :focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.home-hero [hidden], .home-main [hidden], .home-list [hidden] { display: none !important; }
.home-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-skip { position: fixed; z-index: 110; top: 10px; left: 20px; transform: translateY(-160%); padding: 10px 16px; background: #fff; color: #05070a; border-radius: 6px; }
.home-skip:focus { transform: translateY(0); }

.home-header { position: fixed; inset: 0 0 auto; height: 72px; z-index: 100; border-bottom: 1px solid rgba(255,255,255,.06); background: linear-gradient(rgba(5,7,10,.75), transparent); transition: background .3s; }
.home-header.is-scrolled { background: rgba(5,7,10,.97); }
.home-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; gap: 16px; }
.home-brand { display: inline-flex; align-items: center; gap: 9px; justify-self: start; flex-shrink: 0; }
.home-brand-bars { display: flex; align-items: center; gap: 3.5px; }
.home-brand-bars i { display: block; width: 5px; height: 20px; transform: skewX(-12deg); border-radius: 1px; background: var(--home-red); }
.home-brand-bars i:nth-child(2) { height: 14px; opacity: .65; }
.home-brand-word { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 24.8px; font-weight: 400; line-height: 1; letter-spacing: 1px; color: #fff; }
.home-brand-word span { color: var(--home-red); }
.home-nav { display: flex; align-items: center; gap: 2px; }
.home-nav a { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; color: rgba(238,241,246,.75); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .2s, background .2s; }
.home-nav a:hover, .home-nav a[aria-current] { color: #fff; background: rgba(255,255,255,.07); }
.home-nav svg { width: 15px; height: 15px; }
.home-header-actions { display: flex; align-items: center; justify-self: end; gap: 2px; }
.home-header-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; color: rgba(238,241,246,.75); background: transparent; transition: color .2s, background .2s; }
.home-header-icon:hover { color: #fff; background: rgba(255,255,255,.07); }
.home-header-icon svg { width: 20px; height: 20px; }

.home-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: max(520px, 100dvh); padding-top: 130px; padding-bottom: 18dvh; overflow: hidden; background: #090c11; }
.home-hero-art, .home-hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-hero-art { z-index: -2; object-fit: cover; object-position: center top; opacity: 0; transition: opacity .5s ease; }
.home-hero-art.is-loaded { opacity: 1; }
.home-hero-shade { z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(5,7,10,.95), rgba(5,7,10,.65) 38%, rgba(5,7,10,0) 70%), linear-gradient(rgba(5,7,10,.4), rgba(5,7,10,0) 28%, rgba(5,7,10,0) 52%, rgba(5,7,10,.8) 78%, #05070a); }
.home-hero-info { width: 100%; max-width: 580px; }
.home-hero-heading { margin: 0 0 14px; font-size: clamp(38px, 4.7vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1.06; text-wrap: balance; overflow-wrap: anywhere; }
.home-hero-logo { display: block; width: auto; height: auto; max-width: min(360px, 75%); max-height: 120px; object-fit: contain; object-position: left bottom; }
.home-hero-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 6px; margin-bottom: 12px; color: var(--home-muted); font-size: 15px; }
.home-rating { display: inline-flex; gap: 6px; align-items: baseline; color: var(--home-text); font-weight: 600; }
.home-star { color: var(--home-red); }
.home-rating .home-star { font-size: 13px; }
.home-dot { color: rgba(238,241,246,.25); }
.home-hero-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 22px; color: rgba(238,241,246,.72); font-size: 15px; line-height: 1.65; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.home-play, .home-info-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 28px; border: 0; border-radius: 999px; color: #05070a; background: #eef1f6; font-size: 15px !important; font-weight: 600 !important; line-height: 1.5; transition: background .18s, transform .18s; }
.home-play svg { width: 15px; height: 15px; }
.home-info-button { padding: 10px 24px; color: var(--home-text); background: rgba(255,255,255,.08); border: 1px solid rgba(238,241,246,.1); font-weight: 500 !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.home-info-button svg { width: 17px; height: 17px; }
.home-play:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.home-info-button:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.home-hero button:disabled { opacity: .4; cursor: default; }
.home-featured-dots { position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 7px; transform: translateX(-50%); }
.home-featured-dot { position: relative; display: block; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 20px; background: rgba(255,255,255,.25); transition: width .2s, background .2s; }
.home-featured-dot::before { content: ''; position: absolute; inset: -14px -3.5px; }
.home-featured-dot[aria-current="true"] { width: 26px; background: var(--home-red); }
.home-hero-arrow { position: absolute; top: 50%; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: #fff; background: rgba(5,7,10,.4); transform: translateY(-50%); opacity: 0; transition: opacity .2s, background .2s; }
.home-hero-arrow svg { width: 22px; height: 22px; }
#hero-previous { left: 24px; }
#hero-next { right: 24px; }
.home-hero:hover .home-hero-arrow, .home-hero-arrow:focus-visible { opacity: 1; }
.home-hero-arrow:hover { background: rgba(5,7,10,.7); }
.home-hero-notice { margin: 10px 0 -28px; color: var(--home-muted); font-size: 12px; }
.home-hero-notice:empty { display: none; }
.home-hero-error { color: var(--home-muted); font-size: 14px; }

.home-main { padding-bottom: 24px; }
.home-section { padding-top: 44px; padding-bottom: 44px; }
.home-section:first-child { padding-top: 40px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; min-height: 33px; }
.home-section-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-width: 0; margin: 0; color: var(--home-text); font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
.home-section-heading h2::before { content: ''; flex-shrink: 0; width: 3px; height: 20px; border-radius: 2px; background: var(--home-red); }
.home-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,.1); }
.home-tab { position: relative; padding: 5px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--home-muted); font-size: 14px !important; font-weight: 500 !important; line-height: 1.5; }
.home-tab:hover { color: var(--home-text); }
.home-tab[aria-pressed="true"] { color: #fff; border-bottom-color: var(--home-red); }
.home-select-wrap { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.home-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 2px solid var(--home-red); }
.home-select-wrap svg { flex: 0 0 auto; width: 18px; height: 18px; }
.home-select-wrap select { position: absolute; inset: 0; width: 100%; opacity: 0; color-scheme: dark; }
.home-select-wrap:focus-within { outline: 2px solid #fff; outline-offset: 4px; }
.home-select-wrap:has(select:disabled) { opacity: .6; }
.home-select-wrap option { color: #eef1f6; background: #14171c; }
.home-rail-wrap { position: relative; min-width: 0; }
.home-rail { display: flex; gap: 8px; overflow: auto hidden; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 8px; }
.home-rail::-webkit-scrollbar { display: none; }
.home-card { display: block; flex: 0 0 220px; width: 220px; min-width: 0; margin: 0; padding: 0; border: 0; scroll-snap-align: start; text-align: left; background: transparent; color: var(--home-text); }
.home-card-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #14171c; }
.home-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.home-card-art.is-poster img { object-position: center 28%; }
.home-card-art.is-missing::after { content: 'FLIXGX'; color: #4b535f; font-weight: 700; font-size: 18px; }
.home-card-title { display: block; margin: 10px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 1.5; transition: color .2s; }
.home-card-meta { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; color: var(--home-muted); font-size: 11px; line-height: 1.5; }
.home-card-meta .home-star { margin-right: 5px; }
.home-card:hover .home-card-art, .home-card:focus-visible .home-card-art { box-shadow: inset 0 0 0 2px var(--home-red); }
.home-card-art::before { content: ''; position: absolute; inset: 0; z-index: 1; border: 2px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color .2s; }
.home-card:hover .home-card-art::before, .home-card:focus-visible .home-card-art::before { border-color: var(--home-red); }
.home-card:hover .home-card-art img, .home-card:focus-visible .home-card-art img { transform: scale(1.05); }
.home-card:hover .home-card-title { color: var(--home-red); }
.home-card:focus-visible { outline-offset: -2px; }
.home-rail-ranked .home-card { flex-basis: 145px; width: 145px; }
.home-rail-ranked .home-card-art { aspect-ratio: 2 / 3; }
.home-rank { position: absolute; top: 0; left: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0; width: 30px; height: 40px; padding-top: 6px; clip-path: polygon(0 0,100% 0,100% 100%,50% 84%,0 100%); color: #fff; background: #dc2626; font-size: 7.5px; font-weight: 700; line-height: 1.3; }
.home-rank strong { font-size: 11px; }
.home-rail-arrow { position: absolute; top: 4px; bottom: 8px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 56px; padding: 0; color: #fff; border: 0; border-radius: 0; opacity: 0; pointer-events: none; transition: opacity .2s; }
.home-rail-arrow[data-direction="-1"] { left: -8px; background: linear-gradient(90deg, rgba(5,7,10,.95), transparent); }
.home-rail-arrow[data-direction="1"] { right: -8px; background: linear-gradient(-90deg, rgba(5,7,10,.95), transparent); }
.home-rail-arrow svg { width: 24px; height: 24px; }
.home-rail-wrap:hover .home-rail-arrow:not(:disabled), .home-rail-wrap:focus-within .home-rail-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
.home-rail-arrow:disabled { visibility: hidden; }
.home-row-state { width: min(650px, 85vw); margin: 0; padding: 30px 0; color: var(--home-muted); font-size: 14px; }
.home-retry { display: block; margin-top: 13px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: transparent; color: var(--home-text); }
.home-retry:hover { background: rgba(255,255,255,.08); }
.home-skeleton { flex: 0 0 220px; width: 220px; min-width: 0; animation: home-pulse 1.6s ease-in-out infinite; }
.home-skeleton-art { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #151920; }
.home-skeleton-line { height: 12px; margin-top: 13px; width: 67%; border-radius: 3px; background: #151920; }
.home-skeleton-line:last-child { height: 9px; margin-top: 10px; width: 40%; }
.home-rail-ranked .home-skeleton { flex-basis: 145px; width: 145px; }
.home-rail-ranked .home-skeleton-art { aspect-ratio: 2 / 3; }
@keyframes home-pulse { 50% { opacity: .4; } }

.home-footer { margin-top: 12px; padding: 48px 0 40px; border-top: 1px solid rgba(255,255,255,.06); }
.home-footer-brand { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.home-footer-description { max-width: 520px; margin: 0 0 6px; color: var(--home-muted); font-size: 13px; line-height: 1.65; }
.home-footer-description a { text-decoration: underline; text-underline-offset: 3px; }
.home-footer-list { display: inline-block; margin: 12px 0 0; padding: 0; border: 0; background: transparent; color: var(--home-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.home-footer-list:hover { color: var(--home-text); }

.home-list { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: #0d1016; color: var(--home-text); font-family: Inter, system-ui, sans-serif; box-shadow: 0 30px 100px rgba(0,0,0,.6); }
.home-list::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(6px); }
.home-list-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px; border-bottom: 1px solid rgba(255,255,255,.08); background: #0d1016; }
.home-list h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.3; }
.home-list-count { margin: 0; color: var(--home-muted); font-size: 12px; }
.home-list-close, .home-list-remove { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.06); color: var(--home-text); }
.home-list-close:hover, .home-list-remove:hover { background: rgba(255,255,255,.15); }
.home-list-close svg, .home-list-remove svg { width: 18px; height: 18px; }
.home-list-items { display: grid; gap: 10px; margin: 0; padding: 20px 24px 24px; list-style: none; }
.home-list-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; background: rgba(255,255,255,.025); }
.home-list-open { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 0; padding: 0; border: 0; color: inherit; background: none; text-align: left; }
.home-list-art { display: grid; place-items: center; width: 48px; height: 72px; flex: 0 0 48px; overflow: hidden; border-radius: 4px; background: #20252e; }
.home-list-art img { width: 100%; height: 100%; object-fit: cover; }
.home-list-title { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.home-list-type { display: block; margin-top: 4px; color: var(--home-muted); font-size: 12px; }
.home-list-empty { margin: 0; padding: 48px 24px; color: var(--home-muted); text-align: center; font-size: 14px; }
.home-list-empty strong { display: block; margin-bottom: 8px; color: var(--home-text); font-size: 17px; font-weight: 500; }
.home-list-notice { margin: 0; padding: 0 24px 20px; color: var(--home-muted); font-size: 12px; }
.home-list-notice:empty { display: none; }

@media (max-width: 1024px) {
  :root { --home-gutter: 32px; }
  .home-card, .home-skeleton { width: 190px; flex-basis: 190px; }
}
@media (max-width: 768px) {
  .home-header-inner { gap: 10px; }
  .home-nav a { padding: 10px; }
  .home-nav span { display: none; }
  .home-nav svg { width: 18px; height: 18px; }
  .home-brand { gap: 7px; }
  .home-brand-word { font-size: 23px; }
}
@media (max-width: 640px) {
  :root { --home-gutter: 16px; }
  .home-header-inner { grid-template-columns: 1fr auto auto; gap: 6px; }
  .home-header-actions { gap: 0; }
  .home-header-icon { width: 34px; }
  .home-nav a { padding: 9px; }
  .home-hero { padding-top: 120px; padding-bottom: 80px; }
  .home-hero-info { max-width: 100%; }
  .home-hero-shade { background: linear-gradient(180deg, rgba(5,7,10,.25), rgba(5,7,10,.1) 25%, rgba(5,7,10,.6) 55%, rgba(5,7,10,.9) 78%, #05070a); }
  .home-hero-art { object-position: 60% top; }
  .home-hero-description { display: none; }
  .home-hero-meta { font-size: 13px; }
  .home-play, .home-info-button { padding: 9px 22px; font-size: 14px !important; }
  .home-info-button { padding: 9px 18px; }
  .home-hero-arrow { opacity: 1; background: rgba(5,7,10,.2); }
  #hero-previous { left: 10px; }
  #hero-next { right: 10px; }
  .home-section-heading h2 { font-size: 18px; }
  .home-section-heading { gap: 10px; }
  .home-tab { padding: 5px 10px; font-size: 12px !important; }
  .home-card, .home-skeleton { width: 160px; flex-basis: 160px; }
  .home-rail-ranked .home-card, .home-rail-ranked .home-skeleton { width: 120px; flex-basis: 120px; }
  .home-rail-arrow { display: none; }
  .home-list-header { padding: 20px; }
  .home-list-items { padding: 16px; }
  .home-select-wrap { max-width: 240px; }
}
@media (max-width: 359px) {
  .home-brand-bars { display: none; }
  .home-header-icon { width: 31px; }
  .home-header-inner { gap: 4px; }
  .home-nav a { padding: 8px; }
  .home-section-heading h2 { font-size: 17px; }
  .home-tab { padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-header, .home-hero *, .home-main * { animation: none !important; transition: none !important; }
}
