.narrator-profile {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 30px;
}

.profile-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.narrator-name {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.profile-badges .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    margin-left: 8px;
}

.layer-badge {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.gender-badge.bg-pink {
    background: linear-gradient(to right, #e91e63, #c2185b);
    color: white;
}

/* إحصائيات سريعة */
.profile-stats {
    margin: 30px 0;
}

.stat-item {
    text-align: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* بطاقة التقييم */
.judgment-card {
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.grade-item {
    padding: 20px;
}

.grade-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.grade-value {
    font-weight: 700;
    margin-bottom: 15px;
}

.grade-bar {
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

.grade-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.final-judgment {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}
.judgment-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.judgment-value .badge {
    font-size: 1.2rem;
    padding: 8px 20px;
}

/* تبويبات الصفحة */
.profile-tabs .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.profile-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    border: none;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 8px 8px 0 0;
}

.profile-tabs .nav-link:hover {
    color: #3498db;
    background: #f8f9fa;
}

.profile-tabs .nav-link.active {
    color: #3498db;
    background: white;
    border-bottom: 3px solid #3498db;
}

/* بطاقات المعلومات */
.info-card, .relations-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.info-card h4, .relations-card h5 {
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    min-width: 150px;
    color: #2c3e50;
    font-weight: 600;
}

.info-item span {
    color: #34495e;
}

/* بطاقات الأقوال */
.quote-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quote-card.quote-authentication {
    border-left: 4px solid #27ae60;
}

.quote-card.quote-defect {
    border-left: 4px solid #e74c3c;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quote-type {
    font-size: 0.75rem;
    padding: 3px 8px;
}

.quote-author {
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 500;
}

.quote-text {
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
    border-right: 3px solid #f0f0f0;
    padding-right: 15px;
}

.quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* بطاقات الروايات */
.narration-item {
    border: 1px solid #e9ecef;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.narration-item:hover {
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.1);
}

.narration-text {
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 15px;
    border-right: 2px solid #f0f0f0;
    padding-right: 15px;
}

.narration-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.narration-notes {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-right: 3px solid #3498db;
}

/* قوائم العلاقات */
.relations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.relations-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.relations-list li:last-child {
    border-bottom: none;
}

.relation-link {
    display: flex;
    align-items: center;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.relation-link:hover {
    color: #3498db;
}

.relation-link .badge {
    font-size: 0.75rem;
    padding: 3px 8px;
}

.empty-relations {
    text-align: center;
    padding: 30px;
    color: #95a5a6;
}

/* خريطة العلاقات */
.relations-map {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.map-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.relation-node {
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.relation-node.main-node {
    background: #3498db;
    color: white;
    font-weight: 600;
    border-color: #2980b9;
}

.relation-node.teacher-node {
    border-color: #27ae60;
}

.relation-node.student-node {
    border-color: #e74c3c;
}

.relation-arrow {
    color: #95a5a6;
    font-size: 1.2rem;
    margin: 0 10px;
}

/* بطاقات الأماكن */
.location-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.location-card:hover {
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.location-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.map-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* رواة مشابهون */
.related-narrators {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.related-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.related-name a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-name a:hover {
    color: #3498db;
}

.related-layer {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* الحالات الفارغة */
.empty-state {
    padding: 50px 20px;
    text-align: center;
}

.empty-state i {
    opacity: 0.5;
}

.empty-state h4 {
    color: #7f8c8d;
    margin: 15px 0 10px;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .narrator-profile {
        padding: 15px;
    }
    
    .narrator-name {
        font-size: 1.5rem;
    }
    
    .profile-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .profile-badges .badge {
        margin: 2px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item strong {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .relations-map .d-flex {
        flex-direction: column;
    }
    
    .relation-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .narration-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .grade-item {
        padding: 15px 10px;
    }
    
    .profile-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        margin: 2px;
    }
}

/* تأثيرات خاصة */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.narrator-profile {
    animation: fadeIn 0.5s ease;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* ألوان خاصة للتصنيفات */
.class-sahabi {
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
}

.class-tabiin {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.class-tabi-tabiin {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    color: white;
}

.class-other {
    background: linear-gradient(to right, #95a5a6, #7f8c8d);
    color: white;
}

/* تنسيق الأزرار */
.th-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.th-btn.border-btn {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.th-btn.border-btn:hover {
    background: #3498db;
    color: white;
}

.th-btn:not(.border-btn) {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
}

.th-btn:not(.border-btn):hover {
    background: linear-gradient(to right, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}
.space {
  padding-top: 0;
}