/*
 * Pinkfong TV — TikTok Live / FreeReels-inspired full-bleed player with overlay chat
 */

:root {
    --nf-bg: #0b0b0f;
    --nf-surface: #16161a;
    --nf-surface-2: #24242a;
    --nf-surface-active: #34343c;
    --nf-border: rgba(255, 255, 255, 0.14);
    --nf-ink: #f5f5f7;
    --nf-ink-soft: rgba(245, 245, 247, 0.68);
    --nf-red: #ff3b30;
    --nf-red-hover: #ff5147;
    --ui-h: 44px;
    --ease-out: cubic-bezier(.22, .72, .2, 1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--nf-bg);
    color: var(--nf-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

button {
    cursor: pointer;
}

button:focus,
a:focus,
input:focus,
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.is-hidden {
    display: none !important;
}

.icon-svg {
    width: 22px;
    height: 22px;
    flex: none;
}

/* -------------------------------------------------------------------------- */
/* Full-Bleed Stage                                                           */
/* -------------------------------------------------------------------------- */

.nf-stage-wrap {
    position: relative;
    width: 100%;
    height: 100svh;
    height: 100dvh;
    background: #000;
    overflow: hidden;
    user-select: none;
}

.nf-ambient-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    object-fit: cover;
    transform: scale(1.18);
    filter: blur(52px) saturate(1.45) brightness(.42);
    opacity: 0;
    transition: opacity .45s ease;
}

.nf-ambient-canvas.is-active {
    opacity: 1;
}

.nf-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    cursor: pointer;
}

.nf-video.is-fill {
    object-fit: cover;
}

.nf-video::cue {
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 0.88em;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .92);
}

.nf-video.sub-sm::cue {
    font-size: 0.72em;
}

.nf-video.sub-md::cue {
    font-size: 0.88em;
}

.nf-video.sub-lg::cue {
    font-size: 1.08em;
}

/* Top & Full-Width Bottom Overlay Gradients */
.nf-hud-top,
.nf-hud-bottom {
    position: absolute;
    z-index: 10;
    transition: opacity .26s var(--ease-out), transform .26s var(--ease-out);
}

.nf-right-rail {
    position: absolute;
    z-index: 12;
    transition: opacity .26s var(--ease-out), transform .26s var(--ease-out);
}

.nf-icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nf-hud-top {
    top: 0;
    left: 0;
    right: 0;
    padding: clamp(12px, 2vh, 20px) clamp(12px, 2vw, 22px) 36px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .14) 55%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
}

/* Full width so gradient shadow never cuts vertically on the right */
.nf-hud-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 84px clamp(14px, 2.2vh, 22px) clamp(14px, 2.2vw, 24px);
    background: linear-gradient(to top, rgba(0, 0, 0, .48) 0%, rgba(0, 0, 0, .18) 55%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
}

.nf-stage-wrap.is-hud-visible .nf-hud-top,
.nf-stage-wrap.is-hud-visible .nf-hud-bottom {
    opacity: 1;
    transform: translateY(0);
}

.nf-stage-wrap.is-hud-visible .nf-hud-top {
    pointer-events: auto;
}

.nf-stage-wrap.is-idle {
    cursor: none;
}

.nf-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.nf-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: none;
}

.nf-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ui-h);
    height: var(--ui-h);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
    flex: none;
    transition: background-color .16s ease, transform .16s var(--ease-out);
}

.nf-icon-btn:hover {
    background: rgba(255, 255, 255, .26);
    transform: scale(1.06);
}

.nf-icon-ghost {
    background: rgba(0, 0, 0, .36);
    backdrop-filter: blur(8px);
}

.nf-icon-btn.is-locked {
    background: var(--nf-red);
}

.nf-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--nf-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, transform .14s var(--ease-out);
}

.nf-live-badge.is-delayed {
    background: rgba(255, 176, 32, .22);
    border: 1px solid rgba(255, 176, 32, .55);
    color: #ffd166;
}

.nf-live-badge.is-delayed .nf-live-dot {
    background: #ffb020;
    animation: none;
}

.nf-viewer-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 700;
    flex: none;
}

.nf-viewer-icon {
    width: 14px;
    height: 14px;
    opacity: .86;
}

.nf-audio-hint {
    position: absolute;
    top: calc(clamp(12px, 2vh, 20px) + var(--ui-h) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 14;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, .92);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity .2s ease, background-color .16s ease;
}

.nf-audio-hint:hover {
    background: rgba(0, 0, 0, .6);
    color: #fff;
}

.nf-stage-wrap.is-locked .nf-hud-top,
.nf-stage-wrap.is-locked .nf-hud-bottom,
.nf-stage-wrap.is-locked .nf-right-rail,
.nf-stage-wrap.is-locked .nf-audio-hint,
.nf-stage-wrap.is-locked .nf-center-play {
    opacity: 0 !important;
    pointer-events: none !important;
}

.nf-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: nf-pulse 1.3s ease-in-out infinite alternate;
}

@keyframes nf-pulse {
    from {
        opacity: .45;
        transform: scale(.8);
    }
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* -------------------------------------------------------------------------- */
/* Bottom-Left Stack: TikTok Floating Chat + Movie Title + Say Something      */
/* -------------------------------------------------------------------------- */

.nf-bottom-left-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: 380px;
    pointer-events: auto;
}

.nf-tiktok-feed {
    width: 100%;
    max-height: 185px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 22px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .28) 18%, rgba(0, 0, 0, .78) 36%, #000 52%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .28) 18%, rgba(0, 0, 0, .78) 36%, #000 52%);
}

.nf-tiktok-feed::-webkit-scrollbar {
    display: none;
}

.nf-tiktok-feed.is-chat-hidden,
.nf-tiktok-form.is-chat-hidden {
    display: none;
}

.tt-msg {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    align-self: flex-start;
    max-width: 100%;
    padding: 2px 14px 2px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    word-break: break-word;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .95), 0 2px 10px rgba(0, 0, 0, .7);
}

.tt-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    margin-top: 1px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(0, 0, 0, .4);
}

.tt-msg-body {
    min-width: 0;
}

.tt-msg-system {
    color: #ffd6d4;
    font-size: 12px;
    font-weight: 700;
}

.tt-author {
    font-weight: 800;
    color: #ff8599;
    margin-right: 6px;
}

.tt-reply-tag {
    color: rgba(255, 214, 102, .95);
    font-weight: 700;
    margin-right: 5px;
}

.nf-title-group {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.nf-title-group.has-marquee {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10px, #000 calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 10px, #000 calc(100% - 16px), transparent 100%);
}

.nf-top-left .nf-title-group {
    flex: 1;
    padding: 0 4px;
}

.nf-movie-title {
    margin: 0 0 2px;
    font-size: clamp(14px, 1.45vw, 18px);
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.nf-next-line {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}

.nf-movie-title.is-marquee,
.nf-next-line.is-marquee {
    width: max-content;
    overflow: visible;
    text-overflow: clip;
    animation: nf-marquee 9s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes nf-marquee {
    0%, 15% {
        transform: translateX(0);
    }
    85%, 100% {
        transform: translateX(var(--marquee-shift, 0px));
    }
}

.nf-tiktok-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.nf-profile-btn {
    width: var(--ui-h);
    height: var(--ui-h);
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
    flex: none;
    cursor: pointer;
    transition: transform .15s var(--ease-out), border-color .15s ease;
}

.nf-profile-btn:hover {
    transform: scale(1.06);
    border-color: #fff;
}

.nf-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nf-tiktok-input {
    flex: 1;
    min-width: 0;
    height: var(--ui-h);
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background-color .16s ease;
}

.nf-tiktok-input:focus {
    background: rgba(0, 0, 0, .62);
}

.nf-tiktok-input::placeholder {
    color: rgba(255, 255, 255, .72);
}

.nf-tiktok-send {
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
}

/* -------------------------------------------------------------------------- */
/* Right Floating Vertical Action Rail                                        */
/* -------------------------------------------------------------------------- */

.nf-right-rail {
    right: clamp(10px, 1.4vw, 16px);
    bottom: clamp(14px, 2.4vh, 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
}

.nf-stage-wrap.is-hud-visible .nf-right-rail {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.nf-right-rail.is-locked {
    opacity: 0 !important;
    pointer-events: none !important;
}

.nf-rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}

.nf-rail-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ui-h);
    height: var(--ui-h);
    border-radius: 50%;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(8px);
    color: #fff;
    transition: transform .16s var(--ease-out), background-color .16s ease;
}

.nf-rail-item:hover .nf-rail-circle {
    background: rgba(255, 255, 255, .24);
    transform: scale(1.08);
}

.nf-rail-item:active .nf-rail-circle {
    transform: scale(.92);
}

.nf-rail-item.is-active .nf-rail-circle {
    background: var(--nf-red);
}

.nf-rail-love {
    color: #ff4769;
}

.nf-rail-love svg {
    fill: currentColor;
}

.nf-rail-circle.is-attention {
    background: var(--nf-red);
    animation: nf-pulse 1.1s ease-in-out infinite alternate;
}

.nf-rail-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}

/* Center Play Button when Paused */
.nf-center-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, .92);
    display: grid;
    place-items: center;
    transition: transform .18s var(--ease-out), background-color .16s ease;
}

.nf-center-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(255, 59, 48, .88);
}

.nf-center-play-svg {
    width: 36px;
    height: 36px;
    margin-left: 3px;
}

/* Loading, Error, Lock Shield */
.nf-overlay-state {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    background: rgba(11, 11, 15, .74);
    backdrop-filter: blur(6px);
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

.nf-error-img {
    width: 96px;
    height: auto;
}

.nf-primary-btn {
    min-height: var(--ui-h);
    padding: 10px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--nf-red);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.nf-lock-shield {
    position: absolute;
    inset: 0;
    z-index: 25;
}

.nf-unlock-pill {
    position: absolute;
    top: clamp(12px, 2vh, 20px);
    right: clamp(12px, 2vw, 22px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--ui-h);
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity .24s ease;
}

.nf-unlock-pill.is-idle-hidden {
    opacity: 0;
    pointer-events: none;
}

.nf-unlock-pill .icon-svg {
    width: 17px;
    height: 17px;
}

/* -------------------------------------------------------------------------- */
/* Audio & Subtitles Menu (Netflix Backdrop Style)                            */
/* -------------------------------------------------------------------------- */

.nf-sheet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 18;
    background: rgba(8, 8, 10, .86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: nf-fade-in .18s ease-out;
}

.nf-bottom-sheet {
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow-y: auto;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: nf-fade-in .18s ease-out;
}

@keyframes nf-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.nf-tracks-inner {
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nf-tracks-close {
    position: absolute;
    top: clamp(12px, 2vh, 20px);
    right: clamp(12px, 2vw, 22px);
    width: var(--ui-h);
    height: var(--ui-h);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s var(--ease-out);
}

.nf-tracks-close:hover {
    background: rgba(255, 255, 255, .26);
    transform: scale(1.06);
}

.nf-tracks-close .icon-svg {
    width: 20px;
    height: 20px;
}

.nf-tracks-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.nf-tracks-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.nf-tracks-col:first-child {
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, .14);
}

.nf-tracks-col:last-child {
    padding-left: 20px;
}

.nf-sheet-heading {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
}

.nf-track-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nf-track-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    margin-left: -10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, .62);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}

.nf-track-row:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nf-track-row.is-selected {
    color: #fff;
    font-weight: 700;
}

.nf-track-check {
    width: 17px;
    height: 17px;
    color: #fff;
    opacity: 0;
    flex: none;
}

.nf-track-row.is-selected .nf-track-check {
    opacity: 1;
}

.nf-tracks-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.nf-size-heading {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .72);
}

.nf-size-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .1);
    transition: opacity .15s ease;
}

.nf-size-pills.is-disabled {
    opacity: .35;
    pointer-events: none;
}

.nf-size-pill {
    min-height: 32px;
    padding: 4px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
}

.nf-size-pill:hover {
    color: #fff;
}

.nf-size-pill.is-selected {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/* Chat Profile Picker (Netflix Backdrop Style)                               */
/* -------------------------------------------------------------------------- */

.nf-profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nf-profile-name-input {
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.nf-profile-name-input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .13);
}

.nf-profile-error {
    margin: 2px 0 0;
    color: #ff6b81;
    font-size: 12px;
    font-weight: 600;
}

.nf-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.nf-avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .14s var(--ease-out), border-color .14s ease, background-color .14s ease, color .14s ease;
}

.nf-avatar-option:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.nf-avatar-option.is-selected {
    border-color: #fff;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-weight: 700;
}

.nf-avatar-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, .35);
}

.nf-profile-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.nf-profile-save-btn {
    min-width: 112px;
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #141414;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .14s ease, transform .14s var(--ease-out);
}

.nf-profile-save-btn:hover {
    opacity: .9;
}

.nf-profile-save-btn:active {
    transform: scale(.97);
}

/* -------------------------------------------------------------------------- */
/* Floating Hearts                                                            */
/* -------------------------------------------------------------------------- */

.nf-stage-hearts {
    position: absolute;
    right: 64px;
    bottom: 24px;
    width: 110px;
    height: 240px;
    pointer-events: none;
    z-index: 13;
}

.nf-floating-heart {
    position: absolute;
    bottom: 0;
    color: #ff4769;
    line-height: 1;
    animation: nf-heart-float 1.6s cubic-bezier(.22, .61, .36, 1) forwards;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}

.nf-heart-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
}

@keyframes nf-heart-float {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(.5);
    }
    18% {
        opacity: 1;
        transform: translate3d(var(--sway, 0px), -34px, 0) scale(1.15);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--sway-end, 0px), -190px, 0) scale(.85);
    }
}

/* -------------------------------------------------------------------------- */
/* Portrait Mobile                                                            */
/* -------------------------------------------------------------------------- */

@media (max-width: 720px) and (orientation: portrait) {
    :root {
        --ui-h: 40px;
    }

    .nf-video:not(.is-fill) {
        object-position: 50% 20%;
    }

    .nf-audio-hint {
        top: 60%;
    }

    .nf-hud-bottom {
        padding: 36px clamp(10px, 1.4vw, 16px) calc(16px + env(safe-area-inset-bottom, 0px)) clamp(10px, 1.4vw, 16px);
    }

    .nf-bottom-left-stack {
        max-width: none;
        width: 100%;
    }

    .nf-tiktok-feed {
        width: 100%;
        padding-right: 62px;
    }

    .nf-title-group {
        width: calc(100% - 64px);
        padding-right: 0;
    }

    .nf-right-rail {
        gap: 10px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--ui-h) + 12px);
    }

    .nf-rail-label {
        font-size: 10px;
    }

    .nf-tiktok-feed {
        max-height: 220px;
    }

    .nf-center-play {
        width: 62px;
        height: 62px;
    }

    .nf-tracks-col:first-child {
        padding-right: 14px;
    }

    .nf-tracks-col:last-child {
        padding-left: 14px;
    }

    .nf-tracks-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nf-size-pills {
        width: 100%;
    }

    .nf-size-pill {
        flex: 1;
        min-height: 34px;
    }
}

/* -------------------------------------------------------------------------- */
/* Short Landscape Phone Adaptation (Prevents right-rail vs topbar collision) */
/* -------------------------------------------------------------------------- */

@media (max-height: 540px) and (orientation: landscape) {
    :root {
        --ui-h: 36px;
    }

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

    .nf-hud-top {
        padding: 10px 14px 22px;
    }

    .nf-audio-hint {
        top: calc(10px + var(--ui-h) + 8px);
    }

    .nf-hud-bottom {
        padding: 24px 240px 12px 14px;
    }

    .nf-bottom-left-stack {
        gap: 6px;
        max-width: 340px;
    }

    .nf-tiktok-feed {
        max-height: 84px;
    }

    .nf-right-rail {
        flex-direction: row;
        right: 14px;
        bottom: 12px;
        gap: 8px;
        transform: translateY(6px);
    }

    .nf-stage-wrap.is-hud-visible .nf-right-rail {
        transform: translateY(0);
    }

    .nf-rail-label {
        display: none;
    }

    .nf-stage-hearts {
        right: 140px;
        bottom: 52px;
    }

    .nf-bottom-sheet {
        padding: 14px 20px;
    }

    .nf-tracks-close {
        top: 10px;
        right: 14px;
    }

    .nf-unlock-pill {
        top: 10px;
        right: 14px;
    }

    .nf-tracks-inner {
        gap: 12px;
    }

    .nf-track-row {
        min-height: 34px;
        padding: 5px 8px;
        margin-left: -8px;
    }

    .nf-tracks-footer {
        padding-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
