.nav-btn {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 50vh;
    transform: translateY(-50%);
    z-index: 40;
}
.nav-btn-prev { left: max(0.5rem, calc((100vw - 1400px) / 2 - 0.25rem)); }
.nav-btn-next { right: max(0.5rem, calc((100vw - 1400px) / 2 - 0.25rem)); }
@media (max-width: 1100px) {
    .nav-btn-prev { left: 0.35rem; }
    .nav-btn-next { right: 0.35rem; }
}
@media (max-width: 900px) {
    .nav-btn,
    .nav-btn-disabled {
        display: none !important;
    }
}
.nav-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border-color: rgba(255, 217, 0, 1);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.2);
    transform: translateY(-50%);
}
.nav-btn-disabled {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #4b5563;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: fixed;
    top: 50vh;
    transform: translateY(-50%);
    z-index: 40;
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
}
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 20;
}
.close-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.3);
}
.copy-btn-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.group:hover .copy-btn-overlay {
    opacity: 1;
}
.copy-btn-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
}
.series-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.25;
    cursor: pointer;
    letter-spacing: -0.025em;
    transition: color 0.2s;
}
.series-title:hover {
    color: #fbbf24;
}
@media (max-width: 768px) {
    .series-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 1024px) {
    .series-detail-outer {
        padding: 0 1rem !important;
        margin: 1rem auto !important;
    }
    .series-detail-layout {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }
    .series-detail-cover-col {
        width: 100% !important;
        max-width: 280px;
        margin: 0 auto;
    }
    .series-detail-meta-col {
        width: 100% !important;
    }
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.favorite-btn-add {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}
.favorite-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
}
.favorite-btn-remove {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}
.favorite-btn-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}
.share-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}
.share-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.related-series-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    text-decoration: none;
}
.related-series-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateX(4px);
}

/* ── Status badge & Library Dropdown ─────────────────────────────── */
.lib-status-wrap { position: relative; display: inline-block; }

.lib-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.lib-status-none      { background: rgba(255,255,255,0.06); color: #94a3b8; border-color: rgba(255,255,255,0.12); }
.lib-status-none:hover{ background: rgba(255,255,255,0.1);  color: #cbd5e1; }
.lib-status-reading      { background: rgba(59,130,246,0.18); color: #93c5fd; border-color: rgba(59,130,246,0.35); }
.lib-status-reading:hover{ background: rgba(59,130,246,0.28); }
.lib-status-completed      { background: rgba(16,185,129,0.18); color: #6ee7b7; border-color: rgba(16,185,129,0.35); }
.lib-status-completed:hover{ background: rgba(16,185,129,0.28); }
.lib-status-plan      { background: rgba(139,92,246,0.18); color: #c4b5fd; border-color: rgba(139,92,246,0.35); }
.lib-status-plan:hover{ background: rgba(139,92,246,0.28); }
.lib-status-hold      { background: rgba(245,158,11,0.18); color: #fcd34d; border-color: rgba(245,158,11,0.35); }
.lib-status-hold:hover{ background: rgba(245,158,11,0.28); }
.lib-status-dropped      { background: rgba(239,68,68,0.18); color: #fca5a5; border-color: rgba(239,68,68,0.35); }
.lib-status-dropped:hover{ background: rgba(239,68,68,0.28); }

/* Dropdown floating menu */
.lib-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    top: auto;
    left: 0;
    min-width: 160px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.6);
    z-index: 9999;
    overflow: hidden;
    animation: libDropIn 0.12s ease;
}
@keyframes libDropIn {
    from { opacity:0; transform:translateY(4px); }
    to   { opacity:1; transform:translateY(0); }
}
.lib-dropdown-item {
    width: 100%;
    padding: 0.65rem 1rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.12s;
    display: block;
}
.lib-dropdown-item:hover { background: rgba(255,255,255,0.08); }
.lib-dropdown-item.lib-status-reading   { color: #93c5fd; }
.lib-dropdown-item.lib-status-completed { color: #6ee7b7; }
.lib-dropdown-item.lib-status-plan      { color: #c4b5fd; }
.lib-dropdown-item.lib-status-hold      { color: #fcd34d; }
.lib-dropdown-item.lib-status-dropped   { color: #fca5a5; }

/* ── Chapter stepper ──────────────────────────── */
.lib-chapter-row {
    display: inline-flex;
    align-items: stretch;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}
.lib-ch-btn {
    width: 36px;
    background: rgba(255,255,255,0.07);
    border: none;
    color: #e2e8f0;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}
.lib-ch-btn:hover { background: rgba(99,102,241,0.3); color: #a5b4fc; }
.lib-ch-btn:first-child { border-radius: 6px 0 0 6px; border-right: 1px solid rgba(255,255,255,0.08); }
.lib-ch-btn:last-child  { border-radius: 0 6px 6px 0; border-left: 1px solid rgba(255,255,255,0.08); }
.lib-ch-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem;
    gap: 0.1rem;
}
.lib-ch-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    text-transform: uppercase;
    line-height: 1;
}
.lib-ch-input {
    width: 62px;
    background: transparent;
    border: none;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
    appearance: none;
    line-height: 1;
}
.lib-ch-input::-webkit-outer-spin-button,
.lib-ch-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
