/* ============================================================
   Arcynia Jukebox: track catalog index (/jukebox/tracks)

   Browsable catalog of every published track. Two views via JS
   toggle: a visual cover-grid (default) and a compact list. Each
   item links to that track's lore page at
   /jukebox/track/<slug>.
   ============================================================ */

.jbc-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* ── Header (eyebrow + title + view toggle) ── */
.jbc-header {
    margin: 1rem 0 2rem;
}
.jbc-eyebrow {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255, 45, 123, 0.85);
    text-shadow: 0 0 10px rgba(255, 45, 123, 0.55);
    margin: 0 0 0.6rem;
}
.jbc-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.2);
    margin: 0 0 0.6rem;
}
.jbc-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 720px;
    margin: 0 0 1.5rem;
}
.jbc-subtitle strong {
    color: var(--ar-neon-cyan);
    font-weight: 600;
}

/* View toggle: pill-style segmented control */
.jbc-view-toggle {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgba(6, 6, 15, 0.55);
    border: 1px solid rgba(123, 47, 247, 0.3);
    border-radius: 0.55rem;
}
.jbc-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.jbc-view-btn:hover {
    color: #fff;
    background: rgba(0, 240, 255, 0.05);
}
.jbc-view-btn.is-active {
    color: #fff;
    background: linear-gradient(180deg,
        rgba(255, 45, 123, 0.25) 0%,
        rgba(123, 47, 247, 0.25) 100%);
    border-color: var(--ar-neon-pink);
    text-shadow: 0 0 8px rgba(255, 45, 123, 0.55);
}

/* ── Empty state ── */
.jbc-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 1rem;
    border: 1px dashed rgba(123, 47, 247, 0.25);
    border-radius: 0.8rem;
}
.jbc-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.6rem;
    opacity: 0.5;
}
.jbc-empty a { color: var(--ar-neon-cyan); }

/* ── Grid view: auto-fitting cover cards ── */
.jbc-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.jbc-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: rgba(6, 6, 15, 0.55);
    border: 1px solid rgba(255, 45, 123, 0.25);
    border-radius: 0.7rem;
    overflow: hidden;
    transition: border-color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.jbc-card:hover {
    border-color: rgba(255, 45, 123, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(255, 45, 123, 0.25);
    color: #fff;
}
.jbc-card-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    background: linear-gradient(180deg, #06060f, #1a0a3a, #06060f);
    overflow: hidden;
    display: block;
}
.jbc-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.jbc-card:hover .jbc-card-cover img {
    transform: scale(1.04);
}
.jbc-card-cover-fallback {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle 38% 38% at 50% 64%,
            #ffd86b 0%, #ff8c42 28%, #ff2d7b 60%, transparent 80%),
        linear-gradient(180deg,
            #1a0a3a 0%, #3d1565 35%, #832566 55%,
            #d8417a 70%, #ff6b6b 76%, #14063a 100%);
}
.jbc-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.85rem 0.95rem;
}
.jbc-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jbc-card-artist {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--ar-neon-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jbc-card-tags {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── List view: compact rows ── */
.jbc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.jbc-row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1.6fr) 3.5rem;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 45, 123, 0.2);
    border-radius: 0.55rem;
    background: rgba(6, 6, 15, 0.55);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.jbc-row:hover {
    background: rgba(255, 45, 123, 0.07);
    border-color: rgba(255, 45, 123, 0.55);
    transform: translateY(-1px);
    color: #fff;
}
.jbc-row-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 45, 123, 0.7);
    letter-spacing: 0.05em;
}
.jbc-row-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jbc-row-artist {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--ar-neon-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jbc-row-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jbc-row-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* ── Footer back-link ── */
.jbc-footer {
    text-align: center;
    margin: 2.5rem 0 1rem;
}

/* ── Mobile ── */
@media (max-width: 740px) {
    .jbc-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.85rem;
    }
    .jbc-card-body {
        padding: 0.6rem 0.7rem 0.8rem;
    }
    .jbc-card-title { font-size: 1rem; }
    .jbc-card-artist { font-size: 0.85rem; }
    /* Drop meta column from list rows; keep title / artist / time only */
    .jbc-row {
        grid-template-columns: 2rem minmax(0, 2fr) minmax(0, 1.4fr) 3rem;
        gap: 0.55rem;
        padding: 0.55rem 0.7rem;
    }
    .jbc-row-meta { display: none; }
}
@media (max-width: 480px) {
    .jbc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
