/* إضافة أنماط لروابط التواصل الاجتماعي - Unified Design */
.view-links-page {
    min-height: 100vh;
    padding: 2rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    position: relative;
}

.view-links-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.view-links-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.view-links-page h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.6s ease-out;
}

/* تبويبات الروابط */
.link-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.link-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
}

.link-tab::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.link-tab:hover::before {
    left: 100%;
}

.link-tab:hover {
    color: white;
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.link-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
}

/* إحصائيات الروابط */
.links-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.stat-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: countUp 1s ease-out;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.stat-item p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* محتوى التبويبات */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* رأس القسم */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters select {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.filters select:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.filters select:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 10px 40px rgba(59, 130, 246, 0.3);
}

.filters select option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

/* حاوية الجدول */
.links-table-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow-x: auto;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* جدول الروابط */
.links-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.links-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
}

.links-table thead tr th {
    padding: 1.5rem 1rem;
    text-align: right;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.links-table thead tr th:first-child {
    border-top-right-radius: 12px;
}

.links-table thead tr th:last-child {
    border-top-left-radius: 12px;
}

.links-table tbody tr {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.links-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.links-table tbody tr:last-child {
    border-bottom: none;
}

.links-table tbody tr td {
    padding: 1.5rem 1rem;
    text-align: right;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    vertical-align: middle;
    font-weight: 500;
}

/* شارات نوع الرابط */
.link-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 20px;
    margin-left: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
}

/* منصة الرابط الاجتماعي */
.social-link-platform {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.platform-icon {
    font-size: 1.3rem;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.social-link-platform:hover .platform-icon {
    transform: scale(1.2) rotate(5deg);
}

/* معلومات التفاعلات */
.actions-info {
    text-align: center;
}

.actions-info strong {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* شارات الحالة */
.status-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.status-badge.paused {
    background: rgba(107, 114, 128, 0.2);
    color: #d1d5db;
    border-color: rgba(107, 114, 128, 0.4);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* أزرار الإجراءات */
.action-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.action-btn:active {
    transform: translateY(-1px);
}

.action-btn.edit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
}

.action-btn.pause {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
}

.action-btn.delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: transparent;
}

.action-btn.view {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: transparent;
}

/* رسالة عدم وجود روابط */
.no-links {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: fadeIn 0.6s ease-out;
}

.no-links p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.no-links .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    gap: 0.8rem;
}

.no-links .btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.no-links .btn:hover::before {
    left: 100%;
}

.no-links .btn:hover {
    background-position: 100% 0;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

/* الأنيميشن */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* التصميم المتجاوب */
@media (max-width: 1024px) {
    .links-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .view-links-page h1 {
        font-size: 2rem;
    }

    .link-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .link-tab {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .section-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .filters select {
        width: 100%;
    }

    .links-table-container {
        padding: 1.5rem;
        overflow-x: auto;
    }

    .links-table {
        min-width: 800px;
    }

    .links-table thead tr th,
    .links-table tbody tr td {
        padding: 1rem 0.75rem;
        font-size: 0.85rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .links-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .stat-item p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .view-links-page {
        padding: 1rem 0;
    }

    .view-links-page .container {
        padding: 0 1rem;
    }

    .view-links-page h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .links-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-item {
        padding: 1.5rem 1rem;
    }

    .stat-item h3 {
        font-size: 1.5rem;
    }

    .section-header {
        padding: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .links-table-container {
        padding: 1rem;
    }

    .no-links {
        padding: 3rem 1.5rem;
    }

    .no-links p {
        font-size: 1rem;
    }

    .no-links .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* تحسينات إضافية للطباعة */
@media print {
    .view-links-page {
        background: #ffffff;
    }

    .link-tabs,
    .filters,
    .action-buttons {
        display: none;
    }

    .links-table-container {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}