/* ═══ LIBRARY — Video Grid (from library-3.html) ═══ */

/* Override view-section for scrollable library */
#view-library {
    overflow-y: auto !important;
    overflow-x: hidden;
    justify-content: flex-start !important;
}

/* Thin scrollbar — library-3.html */
#view-library::-webkit-scrollbar {
    width: 4px;
}

#view-library::-webkit-scrollbar-track {
    background: transparent;
}

#view-library::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Page container — library-3.html .page */
.lib-page {
    padding: 66px 20px 100px;
    width: 100%;
}

.lib-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.lib-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #555;
}

.lib-count {
    font-size: 0.6rem;
    color: #333;
    font-weight: 500;
}

/* ═══ ROW — centered, items have fixed sizes ═══ */
.lib-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
    align-items: center;
}

/* ═══ LIBRARY CARD SIZE OVERRIDES (library-3.html) ═══ */
/* These override welcome.css sizes specifically inside library */
#view-library .vcard.card-L .thumb {
    aspect-ratio: 16/9;
    height: min(50vh, 340px);
    width: auto;
    overflow: hidden;
}

#view-library .vcard.card-P .thumb {
    aspect-ratio: 9/16;
    height: min(60vh, 400px);
    width: auto;
    overflow: hidden;
}

/* Type icon — top-left, always visible */
.vcard .type-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    z-index: 3;
}

.type-icon svg {
    width: 12px;
    height: 12px;
    fill: rgba(255, 255, 255, 0.7);
}

/* Empty state */
.lib-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    gap: 1.5rem;
}

.lib-empty p {
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ═══ FAB — Floating "New Project" Button (same as Welcome) ═══ */
.lib-fab-wrap {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
}

.lib-fab-wrap .btn-start {
    pointer-events: auto;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .lib-row {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        justify-content: center;
    }

    .lib-page {
        padding: 56px 12px 90px;
    }

    /* Library mobile card sizes — enforce aspect-ratio like desktop */
    #view-library .vcard.card-P .thumb {
        aspect-ratio: 9/16 !important;
        height: min(28vh, 180px) !important;
        width: auto !important;
    }

    #view-library .vcard.card-L .thumb {
        aspect-ratio: 16/9 !important;
        height: min(18vh, 120px) !important;
        width: auto !important;
    }
}
