:root {
    color-scheme: dark;
    --bg: #09050d;
    --panel: #17101c;
    --line: #432b50;
    --text: #f8eefb;
    --muted: #b99fbe;
    --accent: #d783ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: system-ui, sans-serif;
    background: radial-gradient(circle at top, #35153d, #09050d 55%);
}

a {
    color: inherit;
}

.site-footer {
    position: fixed;
    z-index: 20;
    bottom: 12px;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 28px);
    margin: 0;
    padding: 8px 12px 7px;
    border: 1px solid #ffffff1f;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: center;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #1b1020e8, #09050df0);
    box-shadow: 0 10px 35px #0009, inset 0 1px #ffffff0d;
    backdrop-filter: blur(12px);
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ffffff14;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.footer-social-link img {
    display: block;
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
    color: var(--text);
    outline: none;
    background: #d783ff1a;
    transform: translateY(-1px);
}

.footer-copyright {
    margin: 5px 0 0;
}

.footer-copyright a {
    color: inherit;
    text-decoration: none;
}

.footer-copyright a:hover,
.footer-copyright a:focus-visible {
    color: var(--text);
}

.shell {
    width: min(1400px, calc(100% - 32px));
    margin: auto;
    padding: 32px 0 60px;
}

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

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

.brand-logo {
    display: block;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid #a975d959;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px #0008, 0 0 22px #8d55ff26;
}

.brand-logo-link {
    flex: 0 0 auto;
    border-radius: 12px;
}

.brand-logo-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.brand-lockup .eyebrow {
    margin: 0;
}

.mini-brand-banner {
    display: block;
    width: auto;
    height: 25px;
    border: 1px solid #a975d959;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 5px 16px #0008, 0 0 12px #8d55ff20;
}

.brand-label {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
}

.brand-lockup h1 {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1 {
    margin: 0.2em 0;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: -0.06em;
}

.category {
    margin: 42px 0;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.movie-cover {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    cursor: pointer;
    background: #000;
}

.movie-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
    transition: opacity 160ms ease, transform 240ms ease;
}

.movie-cover:hover img,
.movie-cover:focus-visible img {
    opacity: 0.82;
    transform: scale(1.025);
}

.movie-cover:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.movie-card-body {
    padding: 15px;
}

.movie-card a,
.enter-button,
.movie-dialog-play {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 10px;
    color: #190b20;
    font-weight: 800;
    text-decoration: none;
    background: var(--accent);
}

.movie-dialog {
    position: fixed;
    inset: 0;
    width: min(820px, calc(100% - 32px));
    max-height: min(760px, calc(100dvh - 32px));
    overflow: auto;
    margin: auto;
    padding: 0;
    border: 1px solid #d783ff66;
    border-radius: 22px;
    color: var(--text);
    background:
        radial-gradient(circle at 85% 85%, #4a185355, transparent 34%),
        linear-gradient(145deg, #1d1223, #100b14 70%);
    box-shadow:
        0 30px 100px #000e,
        0 0 40px #d783ff1f,
        inset 0 1px #ffffff12;
}

.movie-dialog[open] {
    animation: movie-dialog-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.movie-dialog::backdrop {
    background: #050207e8;
    backdrop-filter: blur(12px) saturate(0.75);
    animation: movie-backdrop-in 200ms ease-out;
}

.movie-dialog-close {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    place-items: center;
    background: #09050de6;
    box-shadow: 0 8px 24px #0008;
    transition: transform 160ms ease, background 160ms ease;
}

.movie-dialog-close:hover,
.movie-dialog-close:focus-visible {
    background: #432b50;
    transform: rotate(6deg) scale(1.06);
}

.movie-banner-wrap {
    position: relative;
    overflow: hidden;
    height: clamp(190px, 32vw, 300px);
    background: #000;
}

.movie-banner-wrap::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(to top, #17101c 0, transparent 42%),
        linear-gradient(110deg, transparent 55%, #d783ff1a);
}

.movie-banner {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #000;
}

.movie-dialog-content {
    position: relative;
    z-index: 1;
    margin-top: -22px;
    padding: 0 clamp(24px, 5vw, 46px) clamp(26px, 5vw, 44px);
}

.movie-dialog-content h2 {
    max-width: 16ch;
    margin: 0.12em 0 0.35em;
    font-size: clamp(2.25rem, 6vw, 4.25rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.movie-description {
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.movie-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 28px 0;
}

.movie-facts div {
    padding: 15px 16px;
    border: 1px solid #ffffff14;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff0b, #00000024);
    box-shadow: inset 0 1px #ffffff0b;
}

.movie-facts dt {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.movie-facts dd {
    margin: 5px 0 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.movie-like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: -8px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    color: #ff88b8;
    font: inherit;
    cursor: pointer;
    background: transparent;
    transition: color 160ms ease, transform 160ms ease, background 160ms ease;
}

.movie-like-button:hover,
.movie-like-button:focus-visible {
    color: #ffb1d0;
    transform: scale(1.06);
    background: #ff6fa51a;
}

.movie-like-button.is-liked {
    color: #ffb1d0;
    animation: movie-like-pop 320ms ease;
}

.movie-like-button.is-updating {
    opacity: 0.65;
}

.movie-like-button:disabled {
    cursor: default;
}

.movie-dialog-play {
    box-shadow: 0 10px 30px #d783ff30;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.movie-dialog-play:hover,
.movie-dialog-play:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px #d783ff50;
}

@keyframes movie-dialog-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes movie-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes movie-like-pop {
    50% {
        color: #fff;
        transform: scale(1.24);
    }
}

@media (max-width: 540px) {
    .site-footer {
        width: calc(100% - 20px);
    }

    .footer-socials {
        gap: 1px;
    }

    .footer-social-link {
        padding-inline: 5px;
    }

    .footer-social-link span {
        font-size: 0.62rem;
    }

    .topbar {
        align-items: flex-start;
    }

    .player-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 14px;
    }

    .player-topbar .brand-lockup {
        width: 100%;
        align-items: flex-start;
    }

    .player-topbar .brand-lockup > div {
        min-width: 0;
    }

    .player-topbar .brand-lockup h1 {
        margin-top: 7px;
        line-height: 1;
    }

    .player-topbar .player-actions {
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .player-topbar .resync-videos {
        margin-left: auto;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .brand-lockup h1 {
        font-size: clamp(1.8rem, 9vw, 3rem);
    }

    .movie-dialog {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
    }

    .movie-banner-wrap {
        height: 180px;
    }

    .movie-dialog-content {
        padding-right: 20px;
        padding-bottom: 24px;
        padding-left: 20px;
    }

    .movie-facts {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .movie-dialog[open],
    .movie-dialog::backdrop {
        animation: none;
    }
}

.welcome {
    display: grid;
    min-height: 100vh;
    overflow: hidden;
    place-items: center;
    background: #090208;
}

.welcome-content {
    z-index: auto;
    width: min(900px, calc(100% - 40px));
    text-align: center;
}

.welcome-brand-banner {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 1;
    margin: 0 auto 28px;
    border: 1px solid #a975d959;
    border-radius: clamp(16px, 3vw, 30px);
    object-fit: cover;
    box-shadow: 0 30px 80px #000c, 0 0 50px #8d55ff26;
}

.welcome-content h1 {
    font-size: clamp(3rem, 9vw, 8rem);
}

.curtain {
    position: fixed;
    z-index: 30;
    top: 0;
    width: 52%;
    height: 100%;
    pointer-events: none;
    background-color: #08050f;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 0 50px #000;
    transition: transform 1.2s ease;
}

.curtain.left {
    left: 0;
    border-right: 2px solid #8f5ac4;
    background-image: url("/assets/left-telon.png");
}

.curtain.right {
    right: 0;
    border-left: 2px solid #8f5ac4;
    background-image: url("/assets/right-telon.png");
}

.welcome:hover .curtain.left,
.welcome:focus-within .curtain.left {
    transform: translateX(-105%);
}

.welcome:hover .curtain.right,
.welcome:focus-within .curtain.right {
    transform: translateX(105%);
}

.welcome .enter-button {
    position: relative;
    z-index: 40;
}

video-player {
    display: block;
}

.video-wrap {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

secondary-video .video-wrap video {
    cursor: pointer;
}

secondary-video.is-popped-out .video-wrap video,
secondary-video.is-popped-out .camera-label,
secondary-video.is-popped-out .popout-hint {
    visibility: hidden;
}

secondary-video.is-popped-out .video-wrap {
    cursor: pointer;
}

.camera-label {
    position: absolute;
    z-index: 1;
    top: 12px;
    left: 50%;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    background: #000a;
    transition: opacity 160ms ease;
}

.popout-hint {
    position: absolute;
    z-index: 1;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    background: #000a;
    transition: opacity 160ms ease;
}

.video-wrap:hover .camera-label,
secondary-video .video-wrap:hover .popout-hint {
    opacity: 1;
}

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
    secondary-video .video-wrap video {
        cursor: default;
    }

    secondary-video .popout-hint {
        display: none;
    }
}

.return-video {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: none;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    transform: translate(-50%, -50%);
    background: #17101c;
}

secondary-video.is-popped-out .return-video {
    display: block;
}

.live-pill {
    color: #ff647d;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resync-videos {
    padding: 9px 12px;
    border: 1px solid #d783ff66;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    background: #17101c;
}

.resync-videos:hover,
.resync-videos:focus-visible {
    border-color: var(--accent);
    background: #432b50;
}

.add-secondary-screen {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-self: center;
    gap: 10px;
    margin: 12px auto 0;
    padding: 10px 18px 10px 10px;
    border: 1px solid #d783ff66;
    border-radius: 999px;
    color: var(--text);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    background: linear-gradient(145deg, #2c1835, #17101c);
    box-shadow: 0 10px 30px #0008, 0 0 24px #d783ff18;
    transition: transform 160ms ease, border-color 160ms ease,
        box-shadow 160ms ease;
}

.add-secondary-screen:hover,
.add-secondary-screen:focus-visible {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px #000a, 0 0 28px #d783ff35;
}

.add-secondary-screen[hidden] {
    display: none;
}

.add-secondary-icon {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #190b20;
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1;
    place-items: center;
    background: var(--accent);
}

@media (min-width: 900px) {
    video-player {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 16px;
    }

    main-video {
        grid-row: span 2;
    }

    secondary-video .video-wrap {
        margin: 0;
    }
}
