/* ===== Donghua List Plugin Styles ===== */
:root {
    --dl-bg: #1a1a2e;
    --dl-card-bg: #16213e;
    --dl-card-hover: #0f3460;
    --dl-text: #e0e0e0;
    --dl-text-muted: #888;
    --dl-accent: #e85d04;
    --dl-border: rgba(255,255,255,0.08);
    --dl-radius: 10px;
    --dl-tab-active: #e85d04;
}

.dl-wrapper {
    font-family: 'Segoe UI', sans-serif;
    color: var(--dl-text);
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ===== Filter Tabs ===== */
.dl-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--dl-card-bg);
    border-radius: var(--dl-radius);
    border: 1px solid var(--dl-border);
}

.dl-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: var(--dl-text);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.dl-tab:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.dl-tab.active {
    background: var(--tab-color, var(--dl-accent));
    border-color: var(--tab-color, var(--dl-accent));
    color: #111;
    font-weight: 700;
}

.dl-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dl-tab.active .dl-tab-dot {
    display: none;
}

.dl-tab-count {
    opacity: 0.7;
    font-size: 0.78rem;
}

/* ===== Grid Layout ===== */
.dl-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* ===== Card ===== */
.dl-card {
    background: var(--dl-card-bg);
    border-radius: var(--dl-radius);
    overflow: hidden;
    border: 1px solid var(--dl-border);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}

.dl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 2;
}

.dl-card-image {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #0a0a1a;
}

.dl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.dl-card:hover .dl-card-image img {
    transform: scale(1.05);
}

/* Status badge */
.dl-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #111;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rating badge */
.dl-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.75);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fbbf24;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* Hover overlay */
.dl-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    z-index: 2;
}

.dl-card:hover .dl-card-overlay {
    opacity: 1;
}

.dl-overlay-content {
    padding: 12px;
    width: 100%;
}

.dl-ep-info {
    font-size: 0.78rem;
    color: #ccc;
    margin-bottom: 6px;
    text-align: center;
}

.dl-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.dl-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s;
}

.dl-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.dl-genre-tag {
    background: rgba(255,255,255,0.12);
    color: #ddd;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
}

.dl-card-actions {
    display: flex;
    gap: 6px;
}

.dl-btn {
    flex: 1;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.dl-btn-status {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.dl-btn-status:hover {
    background: rgba(255,255,255,0.25);
}

.dl-btn-view {
    background: var(--dl-accent);
    color: #fff;
}

.dl-btn-view:hover {
    background: #c44d03;
    color: #fff;
    text-decoration: none;
}

/* Card info below image */
.dl-card-info {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
}

.dl-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--dl-text);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dl-card-year {
    font-size: 0.7rem;
    color: var(--dl-text-muted);
    white-space: nowrap;
    padding-top: 2px;
}

.dl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--dl-text-muted);
    font-size: 1rem;
}

/* ===== Status Change Modal ===== */
.dl-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
}

.dl-modal-box {
    position: relative;
    background: #1a1a2e;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    width: 90%;
    max-width: 420px;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.7);
}

.dl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dl-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}

.dl-modal-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.dl-modal-close:hover { color: #fff; }

.dl-modal-body {
    padding: 16px 20px;
}

.dl-status-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-status-opt {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid;
    border-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #ddd;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: left;
}

.dl-status-opt:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

/* Loading state */
.dl-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .dl-layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .dl-filter-tabs {
        gap: 6px;
        padding: 10px;
    }
    .dl-tab {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
}
