/* =============================================
   MUSIC — Cinematic Stage
   Loaded on pages/music.html only.
   ============================================= */

/* ── CINEMA MAIN ─────────────────────────────────────── */
#cinema-main {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    /* page-in from base.css fires on main automatically */
}

#stage-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.stage-scanlines {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        transparent 0,
        transparent 2px,
        rgba(0,0,0,0.10) 2px,
        rgba(0,0,0,0.10) 4px
    );
}

/* ── LEFT PANEL ───────────────────────────────────────── */
#stage-left {
    position: relative;
    z-index: 2;
    padding: 120px 5% 60px;
    border-right: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    min-height: 100vh;
}

/* NOW-PLAYING tag */
.np-tag {
    display: flex;
    align-items: center;
    gap: 10px;
}

.np-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kelly-green);
    flex-shrink: 0;
    animation: np-pulse 1.4s ease-in-out infinite;
}

@keyframes np-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,187,23,0.65); }
    50%       { box-shadow: 0 0 0 7px rgba(76,187,23,0); }
}

.np-label {
    font-family: monospace;
    font-size: 0.68rem;
    letter-spacing: 4px;
    color: var(--kelly-green);
    text-transform: uppercase;
}

/* BIG TITLE */
.stage-big-title {
    font-size: clamp(3rem, 6.5vw, 8rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--kelly-green);
    line-height: 0.9;
    letter-spacing: -2px;
    text-shadow: 0 0 40px rgba(76,187,23,0.35);
    transition: none;
    margin: 0;
    word-break: break-word;
}

/* Glitch transition class applied by JS for 380ms */
.glitch-change {
    animation: glitch-title 0.38s steps(1) forwards !important;
}

@keyframes glitch-title {
    0%  { transform: translate(-4px, 2px)  skewX(-3deg); filter: hue-rotate(160deg) brightness(2);   opacity: 0.5; }
    20% { transform: translate( 4px,-2px)  skewX( 4deg); filter: hue-rotate(40deg)  brightness(1.5); opacity: 1;   }
    40% { transform: translate(-2px,  0)   skewX(0);     filter: hue-rotate(0deg)   brightness(1);   opacity: 0.8; }
    60% { transform: translate( 3px,  1px) skewX(-1deg); filter: none;                               opacity: 1;   }
    100%{ transform: none;                               filter: none;                               opacity: 1;   }
}

/* META line */
.stage-meta-line {
    font-family: monospace;
    font-size: 0.82rem;
    color: #555;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
}

/* TRACKLIST */
.stage-tracklist {
    list-style: none;
    padding: 16px 0 0;
    margin: 0;
    border-top: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stage-tracklist li {
    font-family: monospace;
    font-size: 0.72rem;
    color: #484848;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    transition: color 0.2s;
}

.stage-tracklist li:hover { color: var(--kelly-green); }

.st-num {
    color: #2a2a2a;
    min-width: 20px;
    font-size: 0.6rem;
}

/* ACTIONS row */
.stage-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.stage-type-tag {
    font-family: monospace;
    font-size: 0.6rem;
    border: 1px solid #2a2a2a;
    padding: 3px 9px;
    letter-spacing: 3px;
    color: #444;
    text-transform: uppercase;
}

.stage-spot-link {
    font-family: monospace;
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--kelly-green);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.stage-spot-link:hover { opacity: 0.65; }

/* ── RIGHT PANEL ──────────────────────────────────────── */
#stage-right {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    background: #050505;
}

#embed-wrap {
    padding: 100px 28px 20px;
    flex-shrink: 0;
}

#embed-wrap iframe {
    display: block;
    border-radius: 8px;
    width: 100%;
}

/* ── CATALOG PANEL ────────────────────────────────────── */
#catalog-panel {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #1a1a1a;
}

/* Custom scrollbar */
#catalog-panel::-webkit-scrollbar { width: 4px; }
#catalog-panel::-webkit-scrollbar-track { background: transparent; }
#catalog-panel::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 2px; }
#catalog-panel::-webkit-scrollbar-thumb:hover { background: var(--kelly-green); }

.catalog-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #111;
    position: sticky;
    top: 0;
    background: #050505;
    z-index: 3;
}

.catalog-label {
    font-family: 'Arial Black', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 6px;
    color: var(--kelly-green);
    text-transform: uppercase;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #222;
    color: #555;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: none;
    text-transform: uppercase;
    transition: border-color 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--kelly-green);
    color: var(--kelly-green);
}

/* ── CATALOG ROWS ─────────────────────────────────────── */
.catalog-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto 1.2rem;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid #0d0d0d;
    border-left: 3px solid transparent;
    cursor: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.catalog-row:hover {
    background: #0d0d0d;
    border-left-color: var(--kelly-green);
    transform: translateX(4px);
}

.catalog-row.active {
    border-left-color: var(--kelly-green);
    background: #0a0a0a;
}

.cr-num {
    font-family: monospace;
    font-size: 0.6rem;
    color: #2e2e2e;
}

.cr-name {
    font-size: clamp(0.82rem, 1.1vw, 1rem);
    font-weight: 900;
    text-transform: uppercase;
    color: #777;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.catalog-row:hover  .cr-name,
.catalog-row.active .cr-name { color: var(--kelly-green); }

.cr-meta {
    font-family: monospace;
    font-size: 0.58rem;
    color: #2e2e2e;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cr-arrow {
    color: #2a2a2a;
    font-size: 0.75rem;
    transition: transform 0.2s, color 0.2s;
    justify-self: end;
}

.catalog-row:hover  .cr-arrow { transform: translateX(3px); color: var(--kelly-green); }
.catalog-row.active .cr-arrow { color: var(--kelly-green); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
    #cinema-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    #stage-left {
        padding: 100px 6% 40px;
        border-right: none;
        border-bottom: 1px solid #1a1a1a;
        justify-content: flex-start;
        min-height: unset;
    }
    .stage-big-title { font-size: clamp(2.5rem, 10vw, 5rem); }
    #stage-right { min-height: 80vh; }
    #embed-wrap { padding: 32px 20px 16px; }
}

@media (max-width: 480px) {
    .stage-big-title { font-size: clamp(2rem, 11vw, 3.5rem); }
    .catalog-controls { flex-direction: column; align-items: flex-start; }
    #embed-wrap { padding: 24px 16px 12px; }
    .catalog-row { grid-template-columns: 1.6rem 1fr auto; }
    .cr-arrow { display: none; }
}

