/* ===== حاوية الإحصائيات ===== */
.pis-stats-container {
    border-radius: 12px;
    padding: 16px 22px;
    margin: 24px 0;
    border-left: 6px solid #0073aa;
    font-size: 15px;
    color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.pis-stats-container:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}

.pis-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    align-items: center;
}

.pis-stat-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.pis-stat-item.pis-stat-words {
    color: #1e3a5f;
}
.pis-stat-item.pis-stat-time {
    color: #0077be;
}
.pis-stat-item.pis-stat-updated {
    color: #6c757d;
}
.pis-stat-item.pis-stat-author {
    color: #6f42c1;
}

/* ===== شريط تقدم القراءة ===== */
#pis-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: #0073aa;
    z-index: 99999;
    transition: width 0.08s ease-out;
    box-shadow: 0 0 8px rgba(0, 115, 170, 0.5);
}

/* ===== زر العودة للأعلى ===== */
#pis-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pis-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#pis-scroll-top:hover {
    background: #005a87;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#pis-scroll-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ===== توافق الشاشات الصغيرة ===== */
@media (max-width: 600px) {
    .pis-stats-grid {
        gap: 6px 14px;
        font-size: 13px;
    }
    .pis-stats-container {
        padding: 12px 16px;
    }
    #pis-scroll-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}