/* =========================================================
   LIBRARY

   Personal, on-this-device index of
   everything generated - stored in
   localStorage. NOT a real database:
   different browser, different device,
   or clearing site data all mean an
   empty library. The links themselves
   keep working regardless (all their
   data lives in the URL itself), only
   this convenience list is local.
========================================================= */

.library-empty {

    padding: 40px 20px;

    text-align: center;

    color: #666;

    font-size: 13px;

    line-height: 1.6;

}


.library-empty.hidden {

    display: none;

}


#library-view.hidden {

    display: none;

}


.library-card {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px;

    margin-bottom: 10px;

    border: 1px solid #262626;

    border-radius: 10px;

    background: #111;

}


.library-card-info {

    flex: 1;

    min-width: 0;

}


.library-card-title {

    font-size: 13px;

    font-weight: 700;

    color: #fff;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.library-card-meta {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 4px;

}


.library-type-badge {

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .4px;

    text-transform: uppercase;

    padding: 2px 7px;

    border-radius: 4px;

    background: rgba(229,9,20,.15);

    border: 1px solid rgba(229,9,20,.35);

    color: #ff8087;

}


.library-card-date {

    font-size: 11px;

    color: #666;

}


.library-card-actions {

    display: flex;

    gap: 6px;

    flex-shrink: 0;

}


.library-action-btn {

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #303030;

    border-radius: 8px;

    background: #1a1a1a;

    color: #aaa;

    cursor: pointer;

}


.library-action-btn svg {

    width: 15px;

    height: 15px;

}


.library-action-btn:hover {

    color: #fff;

    border-color: #444;

}


.library-action-btn.danger:hover {

    background: var(--red2);

    color: #fff;

    border-color: var(--red2);

}


/* =========================================================
   EPISODE ROWS
========================================================= */

.episode-row {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 10px;

    align-items: center;

}


.episode-row .ep-label {

    flex: 1 1 30%;

}


.episode-row .ep-url {

    flex: 2 1 45%;

}


.episode-row .ep-intro {

    flex: 1 1 100px;

    max-width: 130px;

    font-size: 12px;

}


.episode-row .season-row-name {

    flex: 1 1 30%;

}


.episode-row .season-row-url {

    flex: 2 1 45%;

}


.episode-row .season-row-intro {

    flex: 1 1 100px;

    max-width: 130px;

    font-size: 12px;

}


.meta-fields-row {

    display: flex;

    gap: 6px;

}


.meta-fields-row input {

    flex: 1;

    min-width: 0;

}


.remove-episode-btn {

    flex: 0 0 auto;

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #303030;

    border-radius: 8px;

    background: #1a1a1a;

    color: #aaa;

    cursor: pointer;

}


.remove-episode-btn svg {

    width: 14px;

    height: 14px;

}


.remove-episode-btn:hover {

    background: var(--red2);

    color: #fff;

    border-color: var(--red2);

}


.add-episode-btn {

    width: 100%;

    padding: 11px;

    margin-top: 4px;

    border: 1px dashed #3a3a3a;

    border-radius: 8px;

    background: transparent;

    color: #999;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

}


.add-episode-btn:hover {

    border-color: var(--red);

    color: #fff;

}


/* =========================================================
   SEASON BLOCKS
========================================================= */

.season-block {

    border: 1px solid #262626;

    border-radius: 10px;

    padding: 12px;

    margin-bottom: 12px;

    background: #111;

}


.season-block-header {

    display: flex;

    gap: 8px;

    margin-bottom: 10px;

}


.season-name {

    flex: 1;

    font-weight: 700;

}


.remove-season-btn {

    flex: 0 0 auto;

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #303030;

    border-radius: 8px;

    background: #1a1a1a;

    color: #aaa;

    cursor: pointer;

}


.remove-season-btn svg {

    width: 14px;

    height: 14px;

}


.remove-season-btn:hover {

    background: var(--red2);

    color: #fff;

    border-color: var(--red2);

}


.season-block .add-episode-btn {

    padding: 9px;

    font-size: 12px;

}


.add-season-btn {

    width: 100%;

    padding: 12px;

    margin-top: 4px;

    border: 1px dashed var(--red2);

    border-radius: 8px;

    background: rgba(229,9,20,.08);

    color: #ff8087;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

}


.add-season-btn:hover {

    background: rgba(229,9,20,.16);

    color: #fff;

}


.output-note {

    margin-top: 10px;

    font-size: 11px;

    color: #666;

    line-height: 1.5;

}


