/* =========================================================================
   MODO 2: REPRODUCTOR NIKKE PLAY (VISIBILITY + ZERO MASK-IMAGE)
   ========================================================================= */
.container-nikke-play {
    --ease: cubic-bezier(.22, 1, .36, 1);
    --panel: rgba(9, 9, 13, .72);
    --mute: rgba(244, 244, 246, .66);
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    color: #f4f4f6;
    font-family: "Rajdhani", "Bahnschrift", "Segoe UI", sans-serif;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
body.mode-nikke-play .container-nikke-play {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
body:not(.mode-nikke-play) .container-nikke-play * {
    animation-play-state: paused !important;
}

body.no-lyrics-mode .np-lyrics-wrap { display: none !important; }
body.no-lyrics-mode .np-ui { grid-template-columns: 100fr 0fr; }

#nikkePlayMinimize { display: none !important; }
body.has-active-video #nikkePlayMinimize { display: flex !important; }

.container-nikke-play *:not(.fa-solid) { font-family: inherit; }
.container-nikke-play button { color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.np-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; transition: opacity .45s var(--ease); }
.np-fx::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(4, 4, 7, .86), rgba(4, 4, 7, .5) 45%, rgba(4, 4, 7, .22));
}
.np-band {
    position: absolute; top: -20%; height: 140%; width: 20vw; left: 38%; opacity: .16;
    transform: skewX(-14deg);
    background: linear-gradient(90deg, transparent, var(--theme-accent-alpha), transparent);
}
body.playing .np-band.b1 { animation: npDrift 11s ease-in-out infinite alternate; }
@keyframes npDrift { to { transform: translateX(6vw) skewX(-14deg); } }

.np-sweep {
    position: absolute; top: -10%; left: 0; height: 120%; width: 26vw; opacity: 0;
    transform: translateX(-40vw) skewX(-14deg);
    background: linear-gradient(90deg, transparent, var(--theme-accent), transparent);
}
.np-sweep.np-go { animation: npSweep .75s var(--ease); }
@keyframes npSweep { 20% { opacity: .42; } to { opacity: 0; transform: translateX(135vw) skewX(-14deg); } }

.np-ui {
    position: absolute; inset: 0;
    display: grid;
    grid-template-columns: 36fr 64fr;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "inf lyr" "hud hud";
    row-gap: clamp(10px, 2vh, 22px);
    padding: clamp(64px, 10vh, 92px) clamp(16px, 4vw, 64px) clamp(14px, 3vh, 30px);
    transition: translate .5s var(--ease), scale .5s var(--ease), opacity .4s var(--ease);
}
body:not(.lyrics-active) .np-ui { grid-template-columns: 100fr 0fr; }

.np-top { position: absolute; z-index: 4; top: clamp(14px, 2.6vh, 22px); left: clamp(16px, 4vw, 64px); display: flex; gap: 8px; }
.np-icon-btn {
    min-width: 44px; height: 44px; padding: 0 14px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 15px; font-weight: 700; letter-spacing: .03em; color: var(--mute);
    background: rgba(9, 9, 13, .76);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    transition: background-color .2s, box-shadow .2s, color .2s;
}
.np-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.np-icon-btn.active-lyric, .np-icon-btn[aria-expanded="true"] { color: var(--theme-accent); box-shadow: inset 0 0 0 1px var(--theme-accent); }
.np-icon-btn.limbo-mini { color: #ff4d6a; box-shadow: inset 0 0 0 1px rgba(255, 30, 64, 0.45); background: rgba(255, 30, 64, 0.12); }
.np-icon-btn.limbo-mini:hover { background: #ff1e40; color: #fff; }
@media (max-width: 520px) {
    .np-icon-btn { min-width: 40px; height: 40px; padding: 0 10px; font-size: 14px; }
    #btnNikkePlayBack span { display: none; }
}

.np-info {
    grid-area: inf; align-self: center; max-width: 520px; position: relative;
    display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 16px);
    padding: clamp(18px, 3.2vh, 32px) clamp(18px, 2vw, 30px);
    background: linear-gradient(160deg, var(--panel), rgba(9, 9, 13, .38));
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
.np-info::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 3px; background: var(--theme-accent); }
body:not(.lyrics-active) .np-info { max-width: 560px; width: 100%; justify-self: center; align-items: center; text-align: center; }
body:not(.lyrics-active) .np-artist { justify-content: center; }

.np-cover {
    position: relative; width: min(100%, 38vh); aspect-ratio: 1; flex: none; background: #141416;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: transform .5s var(--ease);
}
.np-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--theme-accent); pointer-events: none; }
.np-title { font-size: clamp(26px, 3.1vw, 42px); font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; }
.np-artist { display: flex; align-items: center; gap: 10px; font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; color: var(--theme-accent); }
.np-desc { font-size: 15px; line-height: 1.4; color: var(--mute); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-msg { font-size: 15px; font-weight: 600; font-style: italic; color: rgba(244, 244, 246, .85); }
.np-desc:empty, .np-msg:empty { display: none; }

.np-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.np-eq b { width: 3px; height: 100%; background: currentColor; transform: scaleY(.25); transform-origin: bottom; animation: npEq .9s ease-in-out infinite alternate; animation-play-state: paused; }
.np-eq b:nth-child(2) { animation-delay: -.3s; }
.np-eq b:nth-child(3) { animation-delay: -.6s; }
body.playing .np-eq b { animation-play-state: running; }
@keyframes npEq { to { transform: scaleY(1); } }

/* Letras sin mask-image (desvanecimiento con overlays estáticos ligeros) */
.np-lyrics-wrap {
    grid-area: lyr;
    position: relative;
    margin-left: clamp(20px, 3vw, 48px);
    min-width: 0;
    min-height: 0;
    display: flex;
    transition: opacity .35s var(--ease), translate .45s var(--ease);
}
.np-lyrics-wrap::before,
.np-lyrics-wrap::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 14%;
    pointer-events: none;
    z-index: 2;
}
.np-lyrics-wrap::before { top: 0; background: linear-gradient(to bottom, rgba(7, 7, 9, 0.85), transparent); }
.np-lyrics-wrap::after { bottom: 0; background: linear-gradient(to top, rgba(7, 7, 9, 0.85), transparent); }

body:not(.lyrics-active) .np-lyrics-wrap { opacity: 0; translate: 40px 0; pointer-events: none; margin-left: 0; }

.np-lyrics {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden auto;
    touch-action: none;
    scrollbar-width: none;
    padding: 32vh 0;
    contain: layout paint;
}
.np-lyrics::-webkit-scrollbar { display: none; }
.np-lyrics p {
    position: relative; width: 88%; margin: .5em 0; padding: .1em 0 .1em 20px; text-align: left; cursor: pointer;
    font-size: clamp(18px, 2.15vw, 30px); font-weight: 600; line-height: 1.28; color: rgba(255, 255, 255, .28);
    transform-origin: left center;
    transition: transform .35s var(--ease), color .25s;
}
.np-lyrics p::before {
    content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px;
    background: var(--theme-accent); transform: scaleY(0); transition: transform .3s var(--ease);
}
.np-lyrics p.active + p { color: rgba(255, 255, 255, .52); }
.np-lyrics p.active { color: #fff; transform: scale(1.06); }
.np-lyrics p.active::before { transform: scaleY(1); }
.np-lyrics p:hover:not(.active) { color: rgba(255, 255, 255, .64); }

.np-lyrics p .lyric-main { display: block; }
.np-lyrics p .lyric-sub { display: block; font-size: 0.68em; font-weight: 600; opacity: 0.4; margin-top: 4px; transition: opacity 0.3s ease; }
.np-lyrics p.active .lyric-sub.sub-active { opacity: 1; }
.np-lyrics p.lyric-parenthetical { font-size: 0.72em !important; opacity: 0.42 !important; }
.np-lyrics p.lyric-parenthetical.active { color: #fff !important; opacity: 0.9 !important; transform: scale(1.06) !important; }

.np-lyrics p.sub-on-top { display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
.np-lyrics p.sub-on-top .lyric-main { font-size: 0.72em !important; opacity: 0.4 !important; order: -1 !important; margin-bottom: 4px; }
.np-lyrics p.sub-on-top.active .lyric-main { opacity: 0.9 !important; }
.np-lyrics p.sub-on-top .lyric-sub { font-size: 1em !important; font-weight: 700 !important; opacity: 0.35 !important; order: 1 !important; }
.np-lyrics p.sub-on-top.active .lyric-sub.sub-active { opacity: 1 !important; }

.np-lyrics p.sandwich-mode { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; transform: scale(1) !important; }
.np-lyrics p.sandwich-mode .lyric-sub-top, .np-lyrics p.sandwich-mode .lyric-sub-bottom { font-size: 0.72em !important; opacity: 0.35 !important; transition: opacity 0.3s ease; }
.np-lyrics p.sandwich-mode .lyric-main-mid { font-size: 1em !important; font-weight: 700 !important; opacity: 0.35 !important; transform: scale(1); transition: opacity 0.35s ease, transform 0.35s var(--ease); }
.np-lyrics p.sandwich-mode.active .lyric-sub-top.sub-active, .np-lyrics p.sandwich-mode.active .lyric-sub-bottom.sub-active { opacity: 0.9 !important; color: #fff !important; }
.np-lyrics p.sandwich-mode.active .lyric-main-mid.mid-active { opacity: 1 !important; color: #fff !important; transform: scale(1.08) !important; }

/* HUD inferior + progreso GPU */
.np-hud {
    grid-area: hud; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    column-gap: clamp(18px, 4vw, 56px); padding: 14px clamp(18px, 2.4vw, 34px);
    background: linear-gradient(90deg, var(--panel), rgba(9, 9, 13, .45));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.np-prog-wrap { position: relative; height: 24px; display: flex; align-items: center; }
.np-prog-track { position: absolute; left: 0; right: 0; height: 5px; background: rgba(255, 255, 255, .16); overflow: hidden; pointer-events: none; }
.np-prog-fill { width: 100%; height: 100%; background: var(--theme-accent); transform-origin: left center; transform: scaleX(0); }

.np-progress {
    position: relative; z-index: 2; -webkit-appearance: none; appearance: none; width: 100%; height: 24px;
    margin: 0; background: transparent; cursor: pointer; outline: 0;
}
.np-progress::-webkit-slider-runnable-track { height: 5px; background: transparent; }
.np-progress::-moz-range-track { height: 5px; background: transparent; }
.np-progress::-webkit-slider-thumb {
    -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4px; background: #fff; border: 0;
    transform: rotate(45deg); box-shadow: 0 0 0 3px var(--theme-accent-alpha); transition: transform .2s var(--ease);
}
.np-progress::-moz-range-thumb { width: 13px; height: 13px; background: #fff; border: 0; transform: rotate(45deg); box-shadow: 0 0 0 3px var(--theme-accent-alpha); }
.np-progress:hover::-webkit-slider-thumb { transform: rotate(45deg) scale(1.3); }

.np-time { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--mute); }
.np-ctrl { display: flex; align-items: center; gap: clamp(6px, 1vw, 14px); }
.np-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; font-size: 16px; color: var(--mute); transition: color .2s, transform .2s var(--ease); }
.np-btn:hover { color: #fff; transform: scale(1.12); }
.np-btn.active-mode { color: var(--theme-accent); }
.np-btn.active-mode::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; background: var(--theme-accent); transform: rotate(45deg); }

.np-play {
    position: relative; overflow: hidden; width: 64px; height: 64px; display: grid; place-items: center; font-size: 22px;
    color: #08080b; background: var(--theme-accent);
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
    transition: transform .2s var(--ease), filter .2s;
}
.np-play:hover { transform: scale(1.07); filter: brightness(1.1); }
.np-play .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .4); scale: 0; animation: npRipple .52s linear; pointer-events: none; }
@keyframes npRipple { to { scale: 4; opacity: 0; } }

/* Drawer lateral */
.np-scrim { position: absolute; inset: 0; z-index: 7; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.np-drawer {
    position: absolute; z-index: 8; top: 0; bottom: 0; left: 0; width: min(380px, 88vw); display: flex; flex-direction: column;
    padding: clamp(64px, 10vh, 84px) 0 18px; background: rgba(8, 8, 12, .96); transform: translateX(-104%);
    transition: transform .38s var(--ease); clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
    will-change: transform;
}
.np-drawer-list { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; }
body.np-list-open .np-drawer { transform: none; }
body.np-list-open .np-scrim { opacity: 1; pointer-events: auto; }
.np-track { position: relative; display: grid; grid-template-columns: 30px 46px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 8px 30px 8px 22px; text-align: left; transition: background .2s; }
.np-track:hover { background: rgba(255, 255, 255, .07); }
.np-track.active { background: linear-gradient(90deg, var(--theme-accent-alpha), transparent); }
.np-track.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--theme-accent); }
.np-track-n { font-size: 13px; font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; }
.np-track img { width: 46px; height: 46px; object-fit: cover; }
.np-track-t { min-width: 0; display: flex; flex-direction: column; }
.np-track-t b, .np-track-t em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-track-t b { font-size: 16px; font-weight: 700; }
.np-track-t em { font-style: normal; font-size: 13px; color: var(--mute); }

.np-enter .np-info { animation: npIn .45s var(--ease) backwards; }
.np-enter .np-hud { animation: npInUp .45s var(--ease) .05s backwards; }
@keyframes npIn { from { opacity: 0; translate: -18px 0; } }
@keyframes npInUp { from { opacity: 0; translate: 0 16px; } }

body.nikke-minimized .np-ui, body.nikke-minimized .np-fx, body.nikke-minimized .np-drawer, body.nikke-minimized .np-scrim {
    opacity: 0; pointer-events: none;
}

@media (min-width: 1025px) { body.np-list-open .np-ui { translate: 60px 0; scale: .98; opacity: .7; } }

@media (max-width: 900px), (orientation: portrait) {
    .np-ui, body:not(.lyrics-active) .np-ui {
        grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas: "inf" "lyr" "hud"; padding: 68px 16px max(14px, env(safe-area-inset-bottom));
    }
    .np-top { left: 16px; }
    .np-info { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center; max-width: none; width: 100%; padding: 12px 16px 12px 18px; }
    .np-cover { grid-row: 1/4; width: clamp(72px, 18vh, 112px); }
    .np-title { font-size: clamp(20px, 5.4vw, 28px); }
    .np-desc, .np-msg { display: none; }
    .np-lyrics-wrap { margin: 0; }
    .np-lyrics { padding: 18vh 0; }
    .np-hud { grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 10px 14px; }
    .np-ctrl { justify-content: center; }
    body:not(.lyrics-active) .np-info { grid-row: 1/3; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; }
    body:not(.lyrics-active) .np-cover { width: min(62vw, 40vh); }
    body:not(.lyrics-active) .np-desc { display: -webkit-box; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .np-ui { grid-template-columns: 38fr 62fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "inf lyr" "hud hud"; padding: 58px 20px 8px; }
    body:not(.lyrics-active) .np-ui { grid-template-columns: 100fr 0fr; }
    .np-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 16px; max-width: none; width: auto; grid-row: auto; }
    .np-cover { grid-row: auto; width: min(100%, 34vh); }
    .np-lyrics-wrap { margin-left: 18px; }
    .np-lyrics { padding: 22vh 0; }
    .np-hud { grid-template-columns: minmax(0, 1fr) auto; padding: 6px 14px; }
    .np-btn { width: 40px; height: 40px; }
    .np-play { width: 52px; height: 52px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .container-nikke-play *, .container-arcade * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}