/* ============================================
   جدول الأكثر مشاهدة - تصميم عصري 2026
   ============================================ */
.nebula-most-viewed-table {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

.nebula-most-viewed-table__container {
    background: #f9fbff;
    border-radius: 14px;
    border: 1px solid rgba(24, 31, 62, 0.08);
    box-shadow: 0 14px 26px -20px rgba(17, 23, 39, 0.18);
    padding: 14px;
    margin: 14px auto 20px;
    position: relative;
    overflow: hidden;
}

.nebula-most-viewed-table__container::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 157, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 206, 201, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 60%);
    filter: blur(60px);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.nebula-most-viewed-table__container::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"%3E%3Cg opacity="0.15"%3E%3Cpath d="M100 20 L120 60 L160 60 L130 90 L140 130 L100 100 L60 130 L70 90 L40 60 L80 60 Z" fill="%23ff6b9d"/%3E%3Ccircle cx="100" cy="70" r="25" fill="%2300cec9"/%3E%3Crect x="80" y="90" width="40" height="40" rx="8" fill="%236c5ce7"/%3E%3C/g%3E%3C/svg%3E');
    background-size: 150px 150px;
    background-repeat: repeat;
    background-position: 0 0;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}


.nebula-most-viewed-table__wrapper {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(24, 31, 62, 0.08);
}

.nebula-most-viewed-table__header {
    text-align: center;
    margin: 0 0 10px;
}

.nebula-most-viewed-table__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 850;
    color: #0f1428;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(24, 31, 62, 0.12);
}

.nebula-most-viewed-table__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(255, 77, 109, 0.12);
    color: #ff4d6d;
    font-size: 0.88rem;
    font-weight: 800;
    border: 1px solid rgba(255, 77, 109, 0.3);
}

.nebula-most-viewed-table__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.nebula-most-viewed-table__tbody {
    display: table-row-group;
}

.nebula-most-viewed-table__row {
    display: table-row;
}

.nebula-most-viewed-table__row:hover {
    background: linear-gradient(90deg, 
        rgba(255, 107, 157, 0.08) 0%, 
        rgba(0, 206, 201, 0.06) 50%,
        rgba(108, 92, 231, 0.08) 100%);
}

.nebula-most-viewed-table__row:nth-child(even) {
    background: rgba(255, 255, 255, 0.2);
}

.nebula-most-viewed-table__row:nth-child(even):hover {
    background: linear-gradient(90deg, 
        rgba(255, 107, 157, 0.1) 0%, 
        rgba(0, 206, 201, 0.08) 50%,
        rgba(108, 92, 231, 0.1) 100%);
}

.nebula-most-viewed-table__cell {
    display: table-cell;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    vertical-align: middle;
    position: relative;
}

.nebula-most-viewed-table__cell:last-child {
    border-right: none;
}

.nebula-most-viewed-table__row:last-child .nebula-most-viewed-table__cell {
    border-bottom: none;
}

.nebula-most-viewed-table__cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.05) 0%, 
        transparent 50%,
        rgba(0, 206, 201, 0.05) 100%);
    opacity: 0;
    pointer-events: none;
}

.nebula-most-viewed-table__cell:hover::before {
    opacity: 1;
}

.nebula-most-viewed-table__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    color: #1a1d2f;
    font-size: 1.04rem;
    font-weight: 750;
    line-height: 1.5;
    padding: 9px 11px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(24, 31, 62, 0.08);
    box-shadow: 0 5px 14px -12px rgba(17, 23, 39, 0.2);
    position: relative;
    overflow: hidden;
}

.nebula-most-viewed-table__link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.15) 0%, 
        rgba(0, 206, 201, 0.12) 50%,
        rgba(108, 92, 231, 0.15) 100%);
    opacity: 0;
    z-index: 0;
}

.nebula-most-viewed-table__link:hover {
    color: #ff6b9d;
    box-shadow: 
        0 8px 20px -8px rgba(255, 107, 157, 0.35),
        0 4px 12px -6px rgba(17, 23, 39, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 107, 157, 0.4);
}

.nebula-most-viewed-table__link:hover::before {
    opacity: 1;
}

.nebula-most-viewed-table__link-text {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: right;
    direction: rtl;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* عنوان مختصر سطر واحد */
    -webkit-box-orient: vertical;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nebula-most-viewed-table__link-arrow {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    color: rgba(255, 107, 157, 0.6);
    flex-shrink: 0;
    opacity: 0.7;
}

.nebula-most-viewed-table__link:hover .nebula-most-viewed-table__link-arrow {
    color: #ff6b9d;
    opacity: 1;
}

.nebula-most-viewed-table__cell-empty {
    display: block;
    min-height: 20px;
}

.nebula-most-viewed-table__empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(26, 29, 47, 0.6);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


@media (max-width: 992px) {
    .nebula-most-viewed-table__container {
        padding: 24px 18px;
        margin: 20px auto 24px;
        border-radius: 24px;
    }

    .nebula-most-viewed-table__cell {
        padding: 16px 16px;
    }

    .nebula-most-viewed-table__link {
        font-size: 0.98rem;
        padding: 7px 10px;
    }
}

@media (max-width: 768px) {
    .nebula-most-viewed-table {
        padding: 0 12px;
    }

    .nebula-most-viewed-table__container {
        padding: 12px 10px;
        margin: 12px auto 14px;
        border-radius: 12px;
    }

    .nebula-most-viewed-table__wrapper {
        border-radius: 16px;
    }

    /* صف واحد بعرض كامل للموبايل */
    .nebula-most-viewed-table__table,
    .nebula-most-viewed-table__tbody {
        display: block;
    }

    .nebula-most-viewed-table__row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }

    .nebula-most-viewed-table__cell {
        display: block;
        padding: 11px 10px;
        border: 1px solid rgba(24, 31, 62, 0.08);
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 4px 10px -10px rgba(17, 23, 39, 0.2);
    }

    .nebula-most-viewed-table__link {
        font-size: 0.96rem;
        padding: 9px 10px;
        flex-direction: row-reverse;
    }

    .nebula-most-viewed-table__link-text {
        text-align: right;
    }

    .nebula-most-viewed-table__link-arrow {
        transform: scaleX(-1);
    }

    .nebula-most-viewed-table__link:hover .nebula-most-viewed-table__link-arrow {
        transform: scaleX(-1) translateX(4px);
    }
}

@media (max-width: 480px) {
    .nebula-most-viewed-table__container {
        padding: 12px 10px;
        margin: 10px auto 14px;
    }

    .nebula-most-viewed-table__cell {
        padding: 10px 9px;
    }

    .nebula-most-viewed-table__link {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
}

