/* تصميم عام */
:root {
    --primary-color: #ff2f2f;
    --secondary-color: #8e1a4f;
    --dark-bg: #1F2937;
    --light-bg: #f5f5f5;
    --text-light: #ffffff;
    --text-dark: #333333;
    --transition-speed: 0.3s;
    --border-radius: 10px;
}

body {
    font-family: 'Tajawal', 'Amiri', Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--light-bg);
    color: var(--text-dark);
    padding-top: 70px !important; /* تقليل الحشو العلوي لإفساح المجال للمشغل المصغر */
    transition: all var(--transition-speed);
    overflow-x: hidden;
    /* إضافة إلغاء تأثيرات اللمس لكافة العناصر */
    -webkit-tap-highlight-color: transparent;
}

/* أيقونات المواد */
.material-icons {
    font-size: 20px;
    vertical-align: middle;
    /* إضافة إلغاء تأثيرات اللمس للأيقونات */
    -webkit-tap-highlight-color: transparent;
}

/* تحسينات جديدة للألبومات العلوية */
.albums-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin: 10px 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(249, 249, 249, 0.9));
    border-radius: var(--border-radius);
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(240, 240, 240, 0.8);
}

/* تحسين تصميم التمرير للألبومات */
.album-scroll-container {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
}
.scroll-arrow {
    display: none !important;
}

/* إزالة الأسطر التي كانت تخفي شريط التمرير */
/* scrollbar-width: none;
-ms-overflow-style: none; */

/* إظهار شريط التمرير للمتصفحات التي تعتمد على WebKit */
.album-scroll-container::-webkit-scrollbar {
    display: block; 
    height: 8px; /* يمكنك تعديل حجم الشريط */
}

.album-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #ff3b3b, #ff7b7b);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.album-scroll-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

/* تم حذف .scroll-arrow, .scroll-left, .scroll-right */


.album-list {
    display: flex;
    gap: 22px;
    padding: 12px 5px;
    white-space: nowrap;
    align-items: center;
}

/* تحسين تصميم الألبومات */
.album-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
    padding: 5px;
    position: relative;
    /* إضافة إلغاء تأثيرات اللمس */
    -webkit-tap-highlight-color: transparent;
}

.album-item:hover {
    transform: translateY(-8px) scale(1.05);
}

.album-btn {
    width: 105px;
    height: 105px;
    background-size: cover;
    background-position: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.5), 0 5px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    /* إضافة إلغاء تأثيرات اللمس */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.album-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* دائرة التشغيل للألبومات القديمة */
.album-btn::after {
    content: '\f04b'; /* أيقونة تشغيل من Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff1e2f, #ff2f2f); /* تغيير لنفس تدرج زر التشغيل */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; /* تغيير اللون للأبيض */
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(255, 30, 47, 0.4); /* ظل منسجم مع اللون */
    padding-left: 2px; /* تعديل طفيف للمحاذاة */
}

.album-btn:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: playPulse 0.5s infinite alternate;
}

.album-btn:hover {
    box-shadow: 0 0 0 4px rgba(255, 47, 47, 0.8), 0 8px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1.05) translateZ(0);
}

.album-btn:hover::before {
    opacity: 1;
}

.album-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}



/* تحسين تصميم قائمة الأغاني */
.songs-container {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    margin-top: 0; /* Reduced from 2px to 0 */
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
    position: relative; /* إضافة موضع نسبي للعنصر */
    border-top: 3px solid transparent; /* إضافة حدود شفافة */
   
    min-height: 200px; /* ضمان وجود مساحة دائمًا لعرض الأغاني */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تأثير التركيز عند عرض الألبوم */
@keyframes focusHighlight {
    0% { border-top-color: transparent; }
    30% { border-top-color: var(--primary-color); }
    100% { border-top-color: var(--primary-color); }
}

.album-focus {
    animation: focusHighlight 1s ease;
    border-top-color: var(--primary-color);
}

/* أنيميشن تساقط الأغاني */
@keyframes songDropIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.song {
    /* ...existing song styles... */
    opacity: 1; /* جعل الأغاني مرئية افتراضيًا - تغيير من 0 */
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.song.animate-in {
    animation: songDropIn 0.4s ease-out forwards;
}

/* مؤثر إضافي على العناصر أثناء العرض التدريجي */
.songs-container.animating {
    pointer-events: none; /* منع التفاعل أثناء الرسوم المتحركة */
}

/* تحسين مظهر حاوية الأغاني عند تحميل الألبوم */
.songs-container.loading {
    position: relative;
    min-height: 300px;
}

.songs-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2;
    border-radius: var(--border-radius);
}

/* تعزيز مؤثر التركيز عند عرض الألبوم */
.album-focus {
    animation: focusHighlight 1s ease, containerAppear 0.5s ease;
}

@keyframes containerAppear {
    from { 
        opacity: 0.5;
        transform: scale(0.98);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* تنسيق محسن للأغاني بإزالة معلومات الأغنية */
.song {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    color: var(--text-light);
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.song {
    position: relative;
    padding: 8px 10px;
    color: white; /* لون النص */
    font-size: 16px;
    overflow: hidden; /* لضمان عدم خروج التدرج */
}

.song::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(12, 43, 101, 0.62), rgba(7, 101, 255, 0.84));
    transition: all 1.5s ease;
    z-index: -1; /* وضع التدرج تحت النص */
}

.song:hover {
    transform: translateX(1px);
    background: linear-gradient(to right, #1a1a2e, #16213e);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.song:hover::after {
    left: 0;
}


.song i.material-symbols-outlined {
    font-size: 24px;
    color: var(--primary-color);
}

.song-title {
    flex: 1;
    font-weight: 500;
    margin-right: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* زر المفضلة */
.favorite-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.favorite-btn:hover {
    transform: scale(1.2);
    color: #ffcc00;
}

.favorite-btn.active {
    color: #ffcc00;
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* قسم المفضلة */
#favorites-container {
    padding: 15px;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.favorites-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.favorites-title i {
    color: #ffcc00;
}

.no-favorites {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* تصميم قسم المفضلة */
.favorites-section {
    margin: 20px 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.favorites-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    
}

.favorites-header i {
    color: #ffcc00;
    font-size: 24px;
}

.favorites-header h2 {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: bold;
    
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px;
}

.favorite-item {
    background: linear-gradient(to right, #1a1a2e, #16213e);
    border-radius: var(--border-radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
    color: var(--text-light);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.favorite-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(47, 78, 255, 0.1), rgba(32, 64, 247, 0.1));
    border-radius: var(--border-radius);
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.favorite-item:hover::after {
    opacity: 1;
}

.no-favorites-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* تنسيق مشغل الصوت */
#audio-player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    z-index: 1000;
    padding: 5px; /* تقليل الحشوة من 15px إلى 8px */
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2); /* تقليل حجم الظل */
    color: #ffffff;
    transition: all var(--transition-speed);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    height: auto;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

#audio-player-container.shifted {
    top: 0; /* يصبح أعلى الصفحة */
    margin-top: 0; /* إزالة الهامش العلوي */
}

/* نموذج المشغل المدمج */
#audio-player-container.compact-player {
    height: 60px;
    padding: 0;
}

/* حاوية التحكم الرئيسية */
.player-main-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    width: 100%;
    height: 60px;
}

/* مجموعة أزرار التشغيل */
.playback-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* معلومات المسار */
.track-info-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* شريط التقدم المدمج */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar-mini {
    height: 100%;
    background: linear-gradient(to right, #1e90ff, #00bfff);
    width: 0%;
    transition: width 0.1s linear;
}

/* أزرار صغيرة وحديثة */
.mini-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.mini-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mini-button .material-icons {
    font-size: 18px;
}

.mini-play-button {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #ff1e2f, #ff2f2f);
}

.mini-play-button:hover {
    background: linear-gradient(135deg, #ff0057, #ff1e48);
}

/* قسم توسيع المشغل */
.expanded-player {
    width: 100%;
    padding: 5px 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
}

#audio-player-container:not(.compact-player) .expanded-player {
    max-height: 100px;
    padding-bottom: 10px;
}

/* تنسيق شريط التقدم */
.progress-slider-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-top: 8px;
}

.progress-time {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    min-width: 40px;
    text-align: center;
}

#progress-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
}

/* أزرار إضافية */
.extra-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* إخفاء العناصر الغير ضرورية في وضع المشغل المدمج */
#audio-player-container.compact-player .expanded-player,
#audio-player-container.compact-player #track-info {
    display: none;
}

/* تظهر معلومات المسار المختصرة فقط في وضع المشغل المدمج */
.track-info-compact {
    display: none;
}

#audio-player-container.compact-player .track-info-compact {
    display: flex;
}

/* الفوتر */
/* الفوتر */
.footer {
    text-align: center;
    padding: 10px;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    color: #ffffff;
    margin-top: 1px;
    display: flex;
    flex-direction: column; /* لترتيب العناصر بشكل عمودي */
    align-items: center;
}

/* أيقونات التواصل الاجتماعي */
.social-buttons {
    margin: 10px 1px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.social-btn:hover {
    transform: translateY(-5px);
    background: linear-gradient(to right, #1a1a2e, #16213e);
}

.facebook:hover { background: #2e4880; }
.twitter:hover { background: #1981c1; }
.whatsapp:hover { background: #23ac56; }
.linkedin:hover { background: #ba3c54; }
.facebook { background: #3b5998; }
.twitter { background: #1DA1F2; }
.whatsapp { background: #25D366; }
.linkedin { background: #E4405F; }

/* تصحيح تعارض زر المفضلة */
.favorite-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

/* تأكيد عدم تأثر المفضلة ببقية الأزرار */
.favorite-btn:focus {
    outline: none;
}

/* للأجهزة المحمولة */
@media (max-width: 768px) {
    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

.news-ticker.hidden {
    display: none;
}

/* الألبومات الجديدة */
.new-albums-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: -16px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.new-album-item {
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
    position: relative;
    animation: fadeIn 0.5s forwards;
    opacity: 0;
    transform: scale(0.95);
    /* إضافة إلغاء تأثيرات اللمس */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-album-item:nth-child(1) { animation-delay: 0.1s; }
.new-album-item:nth-child(2) { animation-delay: 0.15s; }
.new-album-item:nth-child(3) { animation-delay: 0.2s; }
.new-album-item:nth-child(4) { animation-delay: 0.25s; }
.new-album-item:nth-child(5) { animation-delay: 0.3s; }
.new-album-item:nth-child(6) { animation-delay: 0.35s; }
.new-album-item:nth-child(7) { animation-delay: 0.4s; }
.new-album-item:nth-child(8) { animation-delay: 0.45s; }

.new-album-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 6px 15px rgba(113, 108, 108, 0.66);
}

.new-album-item img {
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
   box-shadow: 0 0 5px rgb(224, 223, 223);
   border: 2px solid #fdfdfd;
    transition: all 0.3s ease;
    object-fit: cover;
    aspect-ratio: 1/1; /* جعل الصور مربعة */
    position: relative;
    z-index: 2;
}

/* دائرة التشغيل للألبومات الجديدة */
.new-album-item::before {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff1e2f, #ff2f2f); /* نفس تدرج زر التشغيل */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; /* تغيير اللون للأبيض */
    font-size: 18px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 5;
    box-shadow: 0 3px 12px rgba(255, 30, 47, 0.4);
    padding-left: 2px; /* تعديل المحاذاة */
}

.new-album-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: playPulse 0.5s infinite alternate;
}

/* تأثير تدرج داكن للخلفية عند الحوم */
.new-album-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.new-album-item:hover::after {
    opacity: 1;
}

/* عناصر التنقل بين الصفحات */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px auto 10px; /* Reduced bottom margin from -17px to 5px */
    gap: 10px;
}

.pagination-numbers {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: #838282;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #aaa;
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}

.page-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.page-number:hover {
    background: #f0f0f0;
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}

/* عنوان قسم الألبومات */

/* تحسينات للعرض على الأجهزة المحمولة */
@media (max-width: 576px) {
    .new-albums-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .new-album-item span {
        font-size: 13px;
        padding: 8px 5px;
    }
    
    .pagination-btn, .page-number {
        width: 33px;
        height: 33px;
        font-size: 12px;
    }
    
    .album-btn::after {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .new-album-item::before {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .album-item .album-favorite-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
        opacity: 1; /* إظهار دائم للمفضلة على الأجهزة المحمولة */
    }
    
    .new-album-item .album-favorite-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        opacity: 1; /* إظهار دائم للمفضلة على الأجهزة المحمولة */
    }
}

/* تحسين عنوان الألبومات */
.album-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin: 15px 0;
}

/* توحيد حجم وشكل الأزرار - إصلاح مشكلة عدم تطابق الحجم */
#track-info .album-info,
#track-info .track-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px !important;
    letter-spacing: 0.3px;
    padding: 8px 14px !important;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 24px !important;
    line-height: 24px !important;
    height: auto;
    margin: 0 !important;
    max-width: 48%;
    flex: 1 1 auto;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#track-info .album-info {
    background: linear-gradient(135deg, #ff2f2f, #8e1a4f);
    border-color: rgba(142, 26, 79, 0.3) !important;
}

#track-info .track-name {
    background: linear-gradient(135deg, #3b6ffd, #2196F3);
    border-color: rgba(33, 150, 243, 0.3) !important;
}

#track-info .album-info:hover,
#track-info .track-name:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.album-info i, .track-name i {
    font-size: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

/* تحسين استجابة العرض للشاشات الصغيرة مع الحفاظ على التناسق */
@media (max-width: 576px) {
    #track-info .album-info,
    #track-info .track-name {
        font-size: 13px !important;
        padding: 6px 12px !important;
        border-radius: 10px;
    }
    
    #track-info .album-info i,
    #track-info .track-name i {
        font-size: 15px;
        width: 16px;
        height: 16px;
    }
}

.album-info i, .track-name i {
    font-size: 15px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* تحسين استجابة العرض للشاشات الصغيرة */
@media (max-width: 576px) {
    .track-info {
        gap: 8px;
    }
    
    .album-info, .track-name {
        font-size: 12px;
        padding: 5px 10px;
        min-height: 16px;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .track-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .album-info, .track-name {
        max-width: 85%;
    }
}

/* تحسين استجابة العرض للشاشات المتوسطة */
@media (max-width: 768px) {
    .track-info {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .album-info, .track-name {
        position: relative;
        left: auto;
        transform: none;
        margin: 0;
    }
}

/* تعديل تخطيط الأزرار للشاشات الصغيرة لتبقى بجانب بعضها */
.track-info {
    display: flex;
    flex-direction: row !important; /* لضمان البقاء أفقيًا دائمًا */
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px auto;
    padding: 0 2px; /* إضافة تنسيق للجوانب */
    width: 100%;
    max-width: 98%; /* زيادة العرض الأقصى لملء الشاشة بشكل أفضل */
}

.album-info, .track-name {
    color: #ffffff;
    font-weight: bold;
    font-size: 13px !important;
   
}

/* تنسيق إشعار إضافة المفضلة */
.favorite-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff2f2f, #8e1a4f);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 90%;
    text-align: center;
    font-weight: bold;
    direction: rtl; /* لدعم اللغة العربية */
    font-size: 15px;
}

.favorite-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    animation: fadeInUp 0.5s, fadeOut 0.5s 2.5s forwards;
}

.favorite-notification i {
    font-size: 20px;
    color: #ffcc00;
    animation: heartBeat 1s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

/* تخصيص المظهر للأجهزة المحمولة */
@media (max-width: 576px) {
    .favorite-notification {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* دوّار التحميل */
.loading-songs {
    display: none; /* تم تغييره من flex إلى none */
}

.spinner {
    display: none; /* تم إضافته لإخفاء دوار التحميل */
}

/* تنسيق صورة الغلاف البديلة */
.album-placeholder {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* Add some extra margin to the songs container wrapper */
.songs-container-wrapper {
    margin-top: 15px; /* Reduced from 30px to 15px */
    padding-top: 0; /* Reduced from 5px to 0 */
}

/* Track Info Styling */
.modern-track-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-track-info div {
    margin-bottom: 5px;
    font-size: 1rem;
    color: #ddd;
}

.modern-track-info i.material-icons {
    margin-right: 5px;
    color: #bbb;
}

.modern-text {
    font-weight: bold;
    color: #eee;
}

/* General Button Styling */
.modern-button {
    width: 40px; /* تصغير من 50px الى 40px */
    height: 40px; /* تصغير من 50px الى 40px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(68, 68, 68, 0.7); /* جعلها أكثر شفافية */
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.modern-button:hover {
    background-color: #666;
}

/* Play/Pause Button Styling */
.modern-play-button {
    width: 48px; /* تصغير من 60px الى 48px */
    height: 48px; /* تصغير من 60px الى 48px */
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.modern-play-button:hover {
    background-color: #5dade2;
}

/* تحسين تصميم شريط التقدم */
.mt-3 {
    margin-top: 0.5rem !important; /* تقليل المسافة العليا */
}

/* تحسين عرض معلومات المسار */
.track-info {
    margin: 8px auto !important; /* تقليل الهامش من 12px الى 8px */
    gap: 11px !important; /* تقليل الفجوة بين العناصر */
}

#track-info .album-info,
#track-info .track-name {
    padding: 8px 10px !important; /* تقليل الحشوة */
    font-size: 12px !important; /* تقليل حجم الخط */
    min-height: 20px !important; /* تقليل الارتفاع */
    line-height: 20px !important; /* تقليل ارتفاع السطر */
}

/* تحسين الاستجابة للشاشات الصغيرة */
@media (max-width: 576px) {
    #audio-player-container {
        padding: 6px; /* تقليل الحشوة أكثر على الشاشات الصغيرة */
    }
    
    .modern-button {
        width: 35px; /* تصغير أكثر على الشاشات الصغيرة */
        height: 35px;
    }
    
    .modern-play-button {
        width: 42px; /* تصغير أكثر على الشاشات الصغيرة */
        height: 42px;
    }
    
    .mt-3 {
        margin-top: 0.3rem !important; /* تقليل المسافة أكثر */
    }
    
    body {
        padding-top: 60px !important; /* تقليل المسافة من الأعلى */
    }
    
    .track-info {
        margin: 13px auto !important;
    }
    
    /* تقليل حجم شريط التقدم وغيره من المكونات */
    input[type="range"] {
        height: 6px !important; /* تقليل ارتفاع شريط التقدم */
    }
}

/* إضافة زر لإخفاء وإظهار المشغل على الشاشات الصغيرة */
.toggle-player-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    display: none; /* إخفاء بشكل افتراضي */
}

#audio-player-container.collapsed {
    height: 40px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .toggle-player-btn {
        display: block; /* إظهار فقط على الشاشات الصغيرة */
    }
}

@keyframes playPulse {
    from { box-shadow: 0 0 5px rgba(255, 30, 47, 0.4); }
    to { box-shadow: 0 0 15px rgba(255, 30, 47, 0.7); }
}

/* إضافة حالة نشطة لضمان الرؤية */
.songs-container.active {
    display: flex !important;
    opacity: 1 !important;
}

/* زر الصعود للأعلى */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff1e2f, #ff2f2f);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #ff0057, #ff1e48);
    box-shadow: 0 6px 15px rgba(255, 30, 47, 0.5);
    transform: translateY(-5px);
}

.scroll-to-top i {
    font-size: 24px;
}

/* للأجهزة المحمولة */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-top i {
        font-size: 20px;
    }
}

/* تحسينات للعرض على الأجهزة المحمولة - تعديل استعلامات الوسائط */
@media (max-width: 768px) {
    /* إلغاء جميع التأثيرات التي تتطلب الحوم للأجهزة المحمولة */
    .album-btn:hover,
    .new-album-item:hover,
    .album-item:hover,
    .song:hover,
    .favorite-item:hover,
    #track-info .album-info:hover,
    #track-info .track-name:hover,
    .pagination-btn:hover,
    .page-number:hover,
    .mini-button:hover,
    .social-btn:hover,
    .scroll-to-top:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* منع ظهور العناصر الطافية في الألبومات عند اللمس على الأجهزة المحمولة */
    .album-btn::after,
    .new-album-item::before,
    .album-btn::before,
    .new-album-item::after {
        display: none !important;
    }

    /* ضبط تنسيقات إضافية للأجهزة المحمولة */
    .album-btn {
        box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.3), 0 3px 8px rgba(0, 0, 0, 0.15);
    }

    .new-album-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* إضافة تأثيرات فورية للمس بدلاً من تأثيرات الحوم */
    .song:active,
    .favorite-item:active,
    .mini-button:active,
    .pagination-btn:active,
    .page-number:active {
        opacity: 0.7;
        transition: opacity 0.1s ease;
    }
}

/* تخصيص إضافي للأجهزة الصغيرة جداً */
@media (max-width: 576px) {
    /* تقليل الظلال والتأثيرات بشكل أكبر */
    .album-btn,
    .new-album-item,
    .song,
    .favorite-item,
    .pagination-btn,
    .page-number {
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15) !important;
    }

    /* تعطيل جميع الرسوم المتحركة والتأثيرات المعقدة */
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0.1s !important;
        transform: none !important;
    }

    /* إصلاح مشكلة الأزرار المصغرة */
    .mini-button:active .material-icons {
        opacity: 0.7;
    }
}

/* تأكيد على حذف تأثير الضغط للأجهزة اللمسية */
@media (hover: none) and (pointer: coarse) {
    /* للأجهزة اللمسية فقط مثل الهواتف واللوحات */
    * {
        -webkit-tap-highlight-color: transparent !important;
    }

    /* تعطيل جميع مؤثرات الحركة المعقدة */
    .album-btn::after,
    .album-btn::before,
    .new-album-item::before,
    .new-album-item::after,
    .song::after {
        display: none !important;
    }

    /* تعطيل جميع التأثيرات عند الحوم لأنها لا تنطبق على الأجهزة اللمسية */
    *:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}



