/* =================================================================
   RS PROD AND EVENTS - Artists Modal System
   نظام النوافذ المنبثقة للفنانين مع تأثيرات ذهبية فاخرة
   ================================================================= */

/* Modal Overlay - خلفية مظلمة مع تأثير blur */
.artist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.artist-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: overlayFadeIn 0.4s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container - الحاوية الرئيسية */
.artist-modal-container {
    position: relative;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 30px;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.artist-modal-overlay.active .artist-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Golden Border Animation - حدود ذهبية متحركة */
.artist-modal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #D4AF37 0%, 
        #FFD700 25%, 
        #D4AF37 50%, 
        #B8860B 75%, 
        #D4AF37 100%);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.6;
    animation: goldenBorderRotate 3s linear infinite;
    filter: blur(8px);
}

@keyframes goldenBorderRotate {
    0%, 100% {
        filter: blur(8px) hue-rotate(0deg);
    }
    50% {
        filter: blur(12px) hue-rotate(15deg);
    }
}

/* Close Button - زر الإغلاق */
.artist-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #D4AF37;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.artist-modal-close:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.6),
        0 0 60px rgba(212, 175, 55, 0.3);
}

/* Modal Content - محتوى النافذة */
.artist-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #1a1a1a;
}

.artist-modal-content::-webkit-scrollbar {
    width: 8px;
}

.artist-modal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.artist-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #D4AF37, #B8860B);
    border-radius: 10px;
}

/* Header Section - قسم الرأس */
.artist-modal-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    animation: slideInFromLeft 0.6s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Artist Image Container - حاوية صورة الفنان */
.artist-modal-image-container {
    position: relative;
    width: 300px;
    height: 400px;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 175, 55, 0.4);
    z-index: 1; /* إضافة z-index للحاوية */
}

/* Golden Glow Effect - تأثير التوهج الذهبي خلف الصورة */
.artist-modal-image-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, 
        rgba(212, 175, 55, 0.3) 0%, 
        rgba(255, 215, 0, 0.15) 50%, 
        transparent 80%);
    animation: goldenGlowPulse 3s ease-in-out infinite;
    z-index: -1; /* خلف الصورة */
    pointer-events: none;
    border-radius: 25px;
}

@keyframes goldenGlowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Rotating Golden Border - حدود ذهبية دوارة حول الصورة */
.artist-modal-image-container::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(
        transparent 0deg,
        transparent 60deg,
        #D4AF37 90deg,
        #FFD700 180deg,
        #D4AF37 270deg,
        transparent 300deg,
        transparent 360deg
    );
    border-radius: 25px;
    animation: borderRotate 4s linear infinite;
    z-index: -1;
    pointer-events: none;
    filter: blur(3px);
}

@keyframes borderRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.artist-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 10; /* فوق جميع التأثيرات */
    transition: transform 0.3s ease;
    border-radius: 20px;
    display: block;
    background: #000; /* خلفية سوداء في حالة تأخر التحميل */
}

.artist-modal-image-container:hover .artist-modal-image {
    transform: scale(1.05);
}

/* Artist Info - معلومات الفنان */
.artist-modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInFromRight 0.6s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.artist-modal-name {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #D4AF37);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.artist-modal-name-en {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 20px;
    font-style: italic;
}

.artist-modal-genre {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(184, 134, 11, 0.2));
    border: 2px solid #D4AF37;
    border-radius: 50px;
    color: #D4AF37;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.artist-modal-genre:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(184, 134, 11, 0.3));
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    transform: scale(1.05);
}

.artist-modal-country {
    color: #999;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.artist-modal-country i {
    color: #D4AF37;
    margin-left: 8px;
}

/* Bio Section - قسم السيرة الذاتية */
.artist-modal-bio {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.artist-modal-section-title {
    font-size: 1.8rem;
    color: #D4AF37;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    padding-right: 20px;
}

.artist-modal-section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 30px;
    background: linear-gradient(180deg, #D4AF37, #FFD700);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.artist-modal-bio-text {
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
}

/* Stats Section - قسم الإحصاءات */
.artist-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.artist-stat-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(184, 134, 11, 0.05));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.artist-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artist-stat-card:hover::before {
    opacity: 1;
    animation: statGlow 2s ease-in-out infinite;
}

@keyframes statGlow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}

.artist-stat-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transform: translateY(-5px);
}

.artist-stat-icon {
    font-size: 2.5rem;
    color: #D4AF37;
    margin-bottom: 10px;
}

.artist-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #D4AF37;
    margin-bottom: 5px;
}

.artist-stat-label {
    color: #999;
    font-size: 0.95rem;
}

/* Songs Section - قسم الأغاني */
.artist-modal-songs {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.artist-songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.artist-song-item {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(184, 134, 11, 0.02));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.artist-song-item:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(184, 134, 11, 0.1));
    border-color: #D4AF37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateX(-5px);
}

.artist-song-icon {
    font-size: 1.5rem;
    color: #D4AF37;
}

.artist-song-title {
    color: #fff;
    font-size: 1.05rem;
    flex: 1;
}

/* Gallery Section - قسم المعرض */
.artist-modal-gallery {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.artist-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.artist-gallery-item {
    position: relative;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.artist-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(212, 175, 55, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.artist-gallery-item:hover::before {
    opacity: 1;
}

.artist-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 175, 55, 0.3);
}

.artist-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.artist-gallery-item:hover img {
    transform: scale(1.1);
}

/* Responsive Design - التصميم المتجاوب */
@media (max-width: 1024px) {
    .artist-modal-header {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }

    .artist-modal-image-container {
        width: 250px;
        height: 333px;
    }

    .artist-modal-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .artist-modal-container {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .artist-modal-content {
        padding: 30px 20px;
    }

    .artist-modal-header {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .artist-modal-image-container {
        width: 100%;
        max-width: 300px;
        height: 400px;
        margin: 0 auto;
    }

    .artist-modal-name {
        font-size: 2rem;
    }

    .artist-modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .artist-songs-grid {
        grid-template-columns: 1fr;
    }

    .artist-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .artist-modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .artist-modal-name {
        font-size: 1.8rem;
    }

    .artist-modal-stats {
        grid-template-columns: 1fr;
    }

    .artist-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility - إمكانية الوصول */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
