/* ===== Voice Library ===== */

.vl-page {
    min-height: 100vh;
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem 4rem;
    overflow-x: clip;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Glows */
.vl-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}
.vl-glow--tl { top: -100px; left: -120px; width: 580px; height: 580px;
    background: radial-gradient(circle, rgba(0,168,150,0.08) 0%, transparent 65%); }
.vl-glow--br { bottom: -80px; right: -100px; width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(0,168,150,0.06) 0%, transparent 65%); }

/* Hero */
.vl-hero {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vl-watermark {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(80px, 16vw, 200px);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: rgba(0,0,0,0.06);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

.vl-header {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 3rem;
}

.vl-tag {
    display: inline-block;
    border: 1px solid rgba(0,168,150,0.4);
    color: #00A896;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 999px;
    background: rgba(0,168,150,0.06);
}

.vl-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.vl-sub {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.65;
    max-width: 560px;
}

/* Stage: wheel + player */
.vl-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 480px;
}

/* ── Curved card stack ── */
.vl-wheel-wrap {
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
}

.vl-wheel {
    position: relative;
    width: 320px;
    height: 100%;
    transform-style: preserve-3d;
}

.vl-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 290px;
    height: 116px;
    margin: -58px 0 0 -145px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s;
    transform-origin: center center;
    will-change: transform, opacity;
}

/* The visible card */
.vl-node-img,
.vl-node-meta,
.vl-node-play {
    pointer-events: none;
}

.vl-node {
    display: grid;
    grid-template-columns: 76px 1fr 40px;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0 18px 0 14px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.14);
}

.vl-node-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #00bfac, #00A896);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vl-node-img img { width: 100%; height: 100%; object-fit: cover; }
.vl-node-initial { color: #ffffff; font-weight: 800; font-size: 1.4rem; }

.vl-node-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    min-width: 0;
}
.vl-node-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vl-node-lang {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vl-node-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,168,150,0.1);
    color: #00A896;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}
.vl-node-play svg { width: 16px; height: 16px; }
.vl-node-ic-pause { display: none; }
.vl-node--playing .vl-node-ic-play { display: none; }
.vl-node--playing .vl-node-ic-pause { display: block; }

/* Active card */
.vl-node--active {
    z-index: 10;
    border-color: #00A896;
    box-shadow: 0 24px 60px rgba(0,168,150,0.35);
}
.vl-node--active .vl-node-play {
    background: linear-gradient(180deg, #00bfac 0%, #00A896 100%);
    color: #ffffff;
}

.vl-wheel-controls {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.vl-wheel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
    transition: all 0.2s;
}
.vl-wheel-btn svg { width: 18px; height: 18px; }
.vl-wheel-btn:hover { border-color: #00A896; color: #00A896; transform: translateY(-1px); }
/* vertical stack: prev points up, next points down */
#vl-prev svg { transform: rotate(90deg); }
#vl-next svg { transform: rotate(90deg); }

/* ── Uiverse hover-expand vinyl player ── */
.he {
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

@keyframes he-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.he-vinyl-svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.he-vinyl img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%; z-index: 1;
}
.he-vinyl-hole {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: #ffffff; border: 4px solid #cbd5e1; z-index: 2;
}
.he-vinyl-hole--sm { width: 24px; height: 24px; }

/* Top disc — visible when collapsed, hides on hover */
.he-top {
    position: relative;
    z-index: 0;
    height: 64px;
    margin-bottom: -8px;
    transition: height 0.2s;
}
.he:hover .he-top { height: 0; }

.he-vinyl--top {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 4px solid #cbd5e1;
    box-shadow: 0 6px 16px rgba(15,23,42,0.18);
    animation: he-spin 3s linear infinite;
}

/* Card */
.he-card {
    position: relative;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 176px;
    height: 88px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.15);
    transition: width 0.3s, height 0.3s;
    overflow: hidden;
}
.he:hover .he-card {
    width: 300px;
    height: 176px;
}

/* Row 1 — info + card disc, revealed on hover */
.he-row1 {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 0;
    transition: height 0.3s;
}
.he:hover .he-row1 { height: 88px; }

.he-card-disc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    opacity: 0;
    transition: top 0.1s, left 0.1s, opacity 0.1s;
    flex-shrink: 0;
}
.he:hover .he-card-disc {
    top: -24px;
    left: -16px;
    opacity: 1;
}

.he-vinyl--card {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #cbd5e1;
    box-shadow: 0 6px 16px rgba(15,23,42,0.18);
}
.he:hover .he-vinyl--card { animation: he-spin 3s linear infinite; }

.he-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding-left: 12px;
    margin-left: -96px;
    overflow: hidden;
    white-space: nowrap;
    transition: margin-left 0.3s;
}
.he:hover .he-info { margin-left: -12px; }

.he-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.he-artist {
    font-size: 0.92rem;
    color: #52525b;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Slider row */
.he-slider {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 12px 12px 0;
    background: rgba(0,168,150,0.1);
    border-radius: 8px;
    min-height: 16px;
    transition: margin-top 0.3s;
}
.he:hover .he-slider { margin-top: 0; }

.he-time {
    display: none;
    padding: 0 12px;
    font-size: 0.8rem;
    color: #52525b;
    font-variant-numeric: tabular-nums;
}
.he:hover .he-time { display: inline-block; }

.he-range {
    flex-grow: 1;
    height: 4px;
    margin: auto 8px;
    width: 96px;
    background: #d1d5db;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: width 0.3s;
}
.he:hover .he-range { width: 100%; }

.he-range-fill {
    position: absolute;
    left: 0; top: 0; height: 100%; width: 0%;
    background: linear-gradient(90deg, #00bfac, #00A896);
    border-radius: 999px;
}
.he-range-fill::after {
    content: '';
    position: absolute;
    right: -5px; top: 50%; transform: translateY(-50%);
    width: 12px; height: 12px;
    background: #ffffff; border: 2px solid #9ca3af; border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Controls */
.he-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin: 0 12px;
    gap: 20px;
}

.he-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 100%;
    min-height: 48px;
    border: none;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    transition: width 0.3s, color 0.2s;
}
.he-ctrl svg { width: 24px; height: 24px; }

/* side buttons (repeat + list) collapse when not hovered */
.he-ctrl--side {
    width: 0;
    overflow: hidden;
    color: #777;
}
.he-ctrl--side svg { width: 20px; height: 20px; }
.he:hover .he-ctrl--side { width: 48px; }
.he-ctrl--side:disabled { cursor: default; }
.he-ctrl--side.he-ctrl--on { color: #00A896; }

.he-ctrl--play { color: #00A896; }

.he-ctrl svg[hidden] { display: none !important; }

/* Empty state */
.vl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}
.vl-empty svg { width: 56px; height: 56px; stroke: #cbd5e1; margin-bottom: 16px; }
.vl-empty p { font-size: 0.95rem; }

/* ── Responsive ── */
@media (max-width: 920px) {
    .vl-stage {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: 0;
    }
    .vl-wheel-wrap { height: 440px; }
    /* On mobile: swipe/tap the cards — hide arrows and the standalone player */
    .vl-wheel-controls { display: none; }
    .he { display: none; }
}

@media (max-width: 600px) {
    .vl-page { padding: 5rem 1.25rem 3rem; }
    .vl-watermark { font-size: 18vw; top: -1%; }
    .vl-title { font-size: 2rem; }
    .vl-wheel-wrap { height: 400px; }
    .vl-node { width: 250px; height: 100px; margin: -50px 0 0 -125px; grid-template-columns: 64px 1fr 34px; }
    .vl-node-img { width: 56px; height: 56px; }
    .he-card { width: 168px; }
    .he:hover .he-card { width: 280px; height: 176px; }
    .he-vinyl--top { width: 116px; height: 116px; }
    .he-name { font-size: 1.15rem; }
}
