/* --- POPUP STYLES --- */
#pop-anime {
    position: fixed;
    width: 300px;
    background: rgba(32, 31, 49, .8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    /* Initially ignore clicks until active */
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, top 0.15s ease-out, left 0.15s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Poppins', sans-serif;
}

#pop-anime.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

#pop-anime .pop-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

#pop-anime .pop-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
}

#pop-anime .pop-meta .star {
    color: #ffeb3b;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

#pop-anime .pop-meta .badge-item {
    padding: 2px 6px;
    border-radius: 4px;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.badge-hd {
    background: #1e90ff;
}

.badge-cc {
    background: #b0e6a8;
}

.badge-mic {
    background: #a8d8e6;
}

.badge-type {
    margin-left: auto;
    background: #1e90ff;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

#pop-anime .pop-desc {
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#pop-anime .pop-info-block {
    margin-bottom: 15px;
}

#pop-anime .info-line {
    font-size: 11px;
    line-height: 1.6;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pop-anime .info-line span.label {
    color: #999;
    margin-right: 5px;
}

#pop-anime .pop-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

#pop-anime .btn-watch-now {
    flex-grow: 1;
    background: #1e90ff;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 30px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
    pointer-events: auto;
}

#pop-anime .btn-watch-now:hover {
    transform: scale(1.02);
    background: #1e90ff;
}

#pop-anime .btn-add-list {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
    pointer-events: auto;
}

#pop-anime .btn-add-list:hover {
    transform: scale(1.1);
}

#pop-anime .btn-add-list.active {
    color: #28a745;
}

#pop-anime .loading-spin {
    text-align: left;
    padding: 0;
    display: none;
}

@keyframes skeleton-pulse {
    0% {
        background-color: rgba(255, 255, 255, 0.05);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.12);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.skeleton-loading {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-title {
    height: 22px;
    width: 80%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-meta {
    height: 14px;
    width: 50%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-desc {
    height: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}