/*
═══════════════════════════════════════════════════════════════════
  TEMP_1 CLEAN - تصميم نظيف بدون ظلال أو تدرجات
  Simple & Clean | Dark Mode Optimized | RTL Support
═══════════════════════════════════════════════════════════════════
*/

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES - نظيفة بدون gradients
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Primary Colors */
    --primary-color: #7a1f2a;
    --primary-light: #a02936;
    --primary-dark: #5a1620;
    
    /* Background - Light Mode */
    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-secondary: #f1f3f5;
    --bg-hover: #e9ecef;
    
    /* Text - Light Mode */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    
    /* Border */
    --border-color: #dee2e6;
    --border-dark: #ced4da;
    
    /* Status Colors - بدون أزرق */
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --info: var(--primary-color);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Spacing */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    
    /* Typography */
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
}

/* Dark Mode - محسّن للعين */
[data-theme="dark"] {
    --bg-body: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-secondary: #242424;
    --bg-hover: #3a3a3a;
    
    /* نصوص واضحة جداً */
    --text-primary: #f8f9fa;
    --text-secondary: #e9ecef;
    --text-tertiary: #dee2e6;
    
    --border-color: #404040;
    --border-dark: #4a4a4a;
    
    /* Primary أفتح في الوضع الليلي */
    --primary-color: #c74a56;
    --primary-light: #d77581;
    --primary-dark: #a03440;
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC CARDS - بسيط بدون ظلال
   ═══════════════════════════════════════════════════════════════ */
.music-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.music-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.music-card-visual {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
}

.music-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-play-btn {
    position: absolute;
    /* top: 31%; */
    /* left: 44%; */
    /* transform: translate(-50%, -50%); */
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-play-btn i {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.music-card:hover .music-play-btn,
.music-card-visual:hover .music-play-btn {
    opacity: 1;
}

.music-play-btn:hover {
    background: var(--primary-light);
    /* transform: translate(-50%, -50%) scale(1.1); */
}

/* موبايل - زر ظاهر دائماً */
@media (max-width: 768px) {
    .music-play-btn {
        opacity: 1;
    }
}

.music-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.music-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.music-card-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.music-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   SVG - بسيط جداً - علامة موسيقى مربعة
   ═══════════════════════════════════════════════════════════════ */
.default-music-svg {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-page-svg {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS - واضحة بدون أزرق
   ═══════════════════════════════════════════════════════════════ */
.section-link,
.view-all-btn,
.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.section-link:hover,
.view-all-btn:hover,
.view-more-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

/* Dark Mode - أزرار واضحة */
[data-theme="dark"] .section-link,
[data-theme="dark"] .view-all-btn,
[data-theme="dark"] .view-more-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .section-link:hover,
[data-theme="dark"] .view-all-btn:hover,
[data-theme="dark"] .view-more-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

/* ═══════════════════════════════════════════════════════════════
   LETTER FILTER
   ═══════════════════════════════════════════════════════════════ */
.letter-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.letter-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.letter-btn:hover,
.letter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   PAGINATION - نظيف وواضح
   ═══════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination .page-item {
    list-style: none;
}

.pagination a,
.pagination span,
.pagination .page-link {
    min-width: 42px;
    height: 42px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .active,
.pagination .current,
.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .disabled,
.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR - بدون scroll
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
}

.sidebar-list li a {
    display: flex;
    align-items: center;
    /* gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color); */
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-list li a:hover {
    /* background: var(--bg-hover); */
    border-color: var(--primary-color);
}

.artist-avatar-sidebar,
.artist-letter-sidebar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.artist-avatar-sidebar {
    object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════
   FILE PAGE PLAY BUTTON - نظيف
   ═══════════════════════════════════════════════════════════════ */
.file-play-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid white;
    color: white;
    font-size: 48px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-play-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.file-play-btn:active {
    transform: scale(0.95);
}

/* Dark Mode */
[data-theme="dark"] .file-play-btn {
    border-color: rgba(255, 255, 255, 0.9);
}

/* تأكد من عدم وجود أزرق */
.btn-primary,
.btn-info {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-info:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADINGS
   ═══════════════════════════════════════════════════════════════ */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    text-align: center;
}

.category-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.category-header p {
    margin: 0;
    opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════
   ARTISTS PAGE
   ═══════════════════════════════════════════════════════════════ */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.artist-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.artist-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.artist-card-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.artist-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-initial {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.artist-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .music-card {
        flex-direction: column;
    }
    
    .music-card-visual {
        width: 100%;
        height: 200px;
    }
    
    .letter-filter {
        justify-content: center;
    }
    
    .file-play-btn {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .sidebar {
        position: static;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SVG THUMBNAILS - دعم الوضع الليلي
   ═══════════════════════════════════════════════════════════════ */
/* Light Mode */
.svg-thumb .svg-bg {
    fill: #7a1f2a;
}

.svg-thumb .svg-circle {
    fill: white;
}

.svg-thumb .svg-play {
    fill: #7a1f2a;
}

.svg-thumb .svg-notes {
    fill: white;
}

/* Dark Mode - ألوان أفتح ومريحة */
[data-theme="dark"] .svg-thumb .svg-bg {
    fill: #c74a56;
}

[data-theme="dark"] .svg-thumb .svg-circle {
    fill: #1a1a1a;
}

[data-theme="dark"] .svg-thumb .svg-play {
    fill: #c74a56;
}

[data-theme="dark"] .svg-thumb .svg-notes {
    fill: #1a1a1a;
}

/* SVG موسيقي - نوتات موسيقية */
.svg-music .svg-note-head {
    fill: white;
}

.svg-music .svg-note-stem {
    fill: white;
}

.svg-music .svg-note-flag {
    fill: white;
    stroke: none;
}

.svg-music .svg-staff line {
    stroke: white;
}

/* Dark Mode - نوتات موسيقية */
[data-theme="dark"] .svg-music .svg-note-head {
    fill: #1a1a1a;
}

[data-theme="dark"] .svg-music .svg-note-stem {
    fill: #1a1a1a;
}

[data-theme="dark"] .svg-music .svg-note-flag {
    fill: #1a1a1a;
}

[data-theme="dark"] .svg-music .svg-staff line {
    stroke: #1a1a1a;
}

/* نتائج البحث - الوضع الليلي */
[data-theme="dark"] .instant-results {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .instant-result-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .instant-result-item:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .instant-result-thumb {
    background: var(--bg-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BUTTON
   ═══════════════════════════════════════════════════════════════ */
.pwa-install-btn {
    font-family: var(--font-primary);
}

.pwa-install-btn:hover {
    background: var(--primary-light) !important;
    transform: translateY(-2px);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.scroll-reveal {
    opacity: 1;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
