/*
Theme Name: Melodika
Theme URI: https://melodika.ir
Author: Hamed Bagheri
Author URI: https://hamedbagheri.ir
Description: قالب حرفه‌ای سایت دانلود موزیک - ملودیکا
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: melodika
Tags: music, rtl, dark-mode, persian, download
*/

/* ===== VARIABLES ===== */
:root {
  --bg-primary: #0D0D14;
  --bg-secondary: #12121E;
  --bg-card: #1A1A2E;
  --bg-card-hover: #1E1E35;
  --accent: #7C3AED;
  --accent-light: #A78BFA;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(124, 58, 237, 0.2);
  --border-subtle: rgba(255,255,255,0.06);
  --header-bg: rgba(13,13,20,0.95);
  --wave-color: #7C3AED;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 4px 24px rgba(124, 58, 237, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg-primary: #F0F0F8;
  --bg-secondary: #E8E8F4;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F5F5FF;
  --accent: #6D28D9;
  --accent-light: #7C3AED;
  --accent-glow: rgba(109, 40, 217, 0.15);
  --text-primary: #1E1B4B;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --border: rgba(109, 40, 217, 0.2);
  --border-subtle: rgba(0,0,0,0.08);
  --header-bg: rgba(240,240,248,0.95);
  --wave-color: #6D28D9;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
  --shadow-accent: 0 4px 24px rgba(109, 40, 217, 0.2);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', 'Vazir', Tahoma, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  font-size: 15px;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
h4 { font-size: 1.05rem; }

p { color: var(--text-secondary); margin-bottom: 1em; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; padding: 30px 0 50px; }

.content-area { width: 100%; }
.has-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start; }
.sidebar { position: sticky; top: 90px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-waves {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.logo-waves span {
  display: block;
  width: 3px;
  background: #fff;
  border-radius: 2px;
  animation: logoWave 1.2s ease-in-out infinite;
}
.logo-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.logo-waves span:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.logo-waves span:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.logo-waves span:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.logo-waves span:nth-child(5) { height: 10px; animation-delay: 0.6s; }

@keyframes logoWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent-light); }

/* Search */
.header-search { flex: 1; max-width: 380px; }

.search-form {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  direction: rtl;
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  background: var(--accent);
  border: none;
  padding: 10px 18px;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 15px;
}
.search-form button:hover { background: var(--accent-light); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--text-primary);
}
.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.social-links { display: flex; gap: 8px; }
.social-links a {
  width: 34px;
  height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.social-links a:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Navigation */
.main-nav {
  border-top: 1px solid var(--border-subtle);
  padding: 2px 0;
}

.nav-menu {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px 0;
  flex-wrap: wrap;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-menu > li.current-menu-item > a { color: var(--accent-light); }

/* Dropdown */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu li a {
  display: block;
  padding: 9px 14px;
  color: var(--text-secondary);
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-menu .sub-menu li a:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}

/* ===== SLIDER SECTION ===== */
.home-top-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

/* News list box */
.news-list-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.news-list-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-list-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.news-list-item:last-child { border-bottom: none; }
.news-list-item:hover { background: var(--bg-card-hover); }
.news-list-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.news-list-item .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-list-item .meta { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* Slider */
.main-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 280px;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.slide-content .slide-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 8px;
}
.slide-content .slide-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.slide-content .slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: #1a1a1a;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5;
}
.slider-nav:hover { background: var(--accent); }
.slider-nav.prev { right: 14px; }
.slider-nav.next { left: 14px; }

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.slider-dot {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.slider-dot.active { background: white; width: 20px; border-radius: 4px; }

/* ===== AD BANNER ===== */
.ad-banner {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ad-banner::before {
  content: 'تبلیغات';
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
}
.ad-banner img { width: 100%; height: 100%; object-fit: cover; }
.ad-banner.leaderboard { height: 90px; margin-bottom: 30px; }
.ad-banner.rectangle { height: 250px; width: 100%; }
.ad-banner.sidebar-ad { height: 200px; }
.ad-text-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #4F46E5 100%);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-text-banner .ad-label {
  font-size: 10px;
  opacity: 0.7;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(to left, var(--accent), transparent);
  border-radius: 2px;
}
.section-title .icon { color: var(--accent-light); font-size: 1.1em; }
.view-all {
  font-size: 13px;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s;
}
.view-all:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== FEATURED SONGS (Horizontal scroll) ===== */
.songs-scroll-section { margin-bottom: 40px; }

.songs-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-secondary);
}
.songs-scroll-wrapper::-webkit-scrollbar { height: 4px; }
.songs-scroll-wrapper::-webkit-scrollbar-track { background: var(--bg-secondary); }
.songs-scroll-wrapper::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.songs-scroll {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 4px 2px;
}

/* ===== SONG CARD ===== */
.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.song-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
  border-color: var(--border);
}

.song-card-small { width: 160px; flex-shrink: 0; }
.song-card-small .cover { position: relative; height: 160px; overflow: hidden; }
.song-card-small .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.song-card-small:hover .cover img { transform: scale(1.05); }
.song-card-small .cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.song-card-small:hover .cover-overlay { opacity: 1; }
.play-btn {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
}
.play-btn:hover { transform: scale(1.1); }

.song-card-small .info { padding: 12px; }
.song-card-small .song-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.song-card-small .artist-name {
  font-size: 12px;
  color: var(--text-muted);
}
.song-card-small .card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.btn-download-sm {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-download-sm:hover { background: var(--accent-light); color: white; }
.btn-download-sm.quality { background: var(--bg-secondary); color: var(--text-secondary); font-size: 10px; flex: 0; padding: 7px 10px; }
.btn-download-sm.quality:hover { background: var(--accent); color: white; }

/* Song List Card (for latest section) */
.song-list-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.song-list-card:hover { background: var(--bg-card-hover); border-color: var(--border); }
.song-list-card .cover {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.song-list-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.song-list-card .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: var(--radius-sm);
}
.song-list-card:hover .play-overlay { opacity: 1; }
.play-btn-sm {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}
.song-list-card .song-info { flex: 1; min-width: 0; }
.song-list-card .song-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.song-list-card .artist { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.song-list-card .dl-links { display: flex; gap: 6px; }
.dl-link {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dl-link.q128 { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.dl-link.q320 { background: var(--accent); color: white; }
.dl-link:hover { filter: brightness(1.1); }
.song-list-card .song-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.song-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-muted);
}
.song-badge.new { background: rgba(124,58,237,0.15); color: var(--accent-light); }

/* ===== HOME TWO-COLUMN ===== */
.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  margin-top: 10px;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
  align-items: center;
  flex-wrap: wrap;
}
.page-info { color: var(--text-muted); font-size: 14px; margin-left: 8px; }
.page-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.widget-title {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.widget-title .icon { color: var(--accent-light); }
.widget-body { padding: 14px; }

/* Artist mini card */
.artist-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
  text-decoration: none;
}
.artist-mini:last-child { border-bottom: none; }
.artist-mini:hover { background: var(--bg-card-hover); }
.artist-mini img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.artist-mini .name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.artist-mini .count { font-size: 12px; color: var(--text-muted); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.tag-cloud a {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.tag-cloud a:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== SINGLE SONG PAGE ===== */
.single-song-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }

.song-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.song-hero-inner { display: flex; gap: 0; }
.song-cover-wrap {
  width: 260px;
  flex-shrink: 0;
  position: relative;
}
.song-cover-wrap img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.song-cover-wrap .ambient-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.song-hero-content { padding: 28px 24px; flex: 1; }
.song-genre-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 12px;
}
.song-title-main {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.song-artist-link {
  font-size: 1.05rem;
  color: var(--accent-light);
  margin-bottom: 16px;
  display: inline-block;
}
.song-meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.meta-tag {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Audio Player */
.audio-player {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.player-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  margin-bottom: 12px;
  cursor: pointer;
}
.player-waveform span {
  display: block;
  width: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.1s;
}
.player-waveform span.played { background: var(--accent); }
.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.player-time { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.player-progress-wrap { flex: 1; }
.player-progress {
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.player-progress-fill {
  height: 100%;
  background: linear-gradient(to left, var(--accent-light), var(--accent));
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s;
}
.player-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.player-btn:hover { color: var(--accent-light); }
.player-btn.play-pause {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  font-size: 20px;
  border-radius: 50%;
}
.player-btn.play-pause:hover { background: var(--accent-light); }
.volume-ctrl { display: flex; align-items: center; gap: 8px; }
.volume-slider {
  width: 70px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Download Buttons */
.download-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  font-family: inherit;
}
.btn-download.primary {
  background: linear-gradient(135deg, var(--accent), #4F46E5);
  color: white;
  box-shadow: var(--shadow-accent);
}
.btn-download.primary:hover { filter: brightness(1.15); transform: translateY(-1px); color: white; }
.btn-download.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-download.secondary:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-download .quality { font-size: 11px; opacity: 0.8; }

/* Lyrics */
.lyrics-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.lyrics-box h3 { margin-bottom: 16px; font-size: 1rem; }
.lyrics-content {
  color: var(--text-secondary);
  line-height: 2.2;
  font-size: 15px;
  white-space: pre-line;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.lyrics-toggle {
  margin-top: 14px;
  background: none;
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}
.lyrics-toggle:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Related songs */
.related-songs { margin-bottom: 24px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

/* Comments */
.comments-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.comments-section h3 { margin-bottom: 20px; }

.comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.comment-item:last-of-type { border-bottom: none; }
.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-author { font-size: 14px; font-weight: 600; }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.comment-reply-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-form { margin-top: 24px; }
.comment-form h4 { margin-bottom: 16px; font-size: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  direction: rtl;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { min-height: 110px; resize: vertical; }
.btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-submit:hover { background: var(--accent-light); }

/* ===== ARTIST ARCHIVE ===== */
.artist-profile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 30px;
}
.artist-profile-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--accent) 0%, #4F46E5 100%);
  position: relative;
}
.artist-profile-cover-img { width: 100%; height: 100%; object-fit: cover; }
.artist-profile-info {
  padding: 0 24px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-top: -50px;
  position: relative;
}
.artist-profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  object-fit: cover;
  flex-shrink: 0;
}
.artist-bio { flex: 1; padding-top: 60px; }
.artist-name-big { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.artist-bio-text { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.artist-stats {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
}
.stat-item { text-align: center; }
.stat-num { font-size: 1.3rem; font-weight: 700; color: var(--accent-light); }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* Artist grid (all artists page) */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}
.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.25s;
  text-decoration: none;
}
.artist-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-accent); border-color: var(--border); }
.artist-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--accent);
  display: block;
}
.artist-card .name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.artist-card .songs-count { font-size: 12px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 13.5px; color: var(--text-muted); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent-light); }
.footer-about p { font-size: 13.5px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--accent); color: white; border-color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--accent-light); }

/* ===== FLOATING MINI PLAYER ===== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  z-index: 999;
  display: none;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(20px);
}
.mini-player.active { display: flex; }
.mini-player-cover {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.mini-player-info { flex: 0 0 200px; min-width: 0; }
.mini-player-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player-artist { font-size: 12px; color: var(--text-muted); }
.mini-player-controls { display: flex; gap: 12px; align-items: center; }
.mini-player-progress { flex: 1; }
.mini-player-bar {
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.mini-player-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 35%;
}
.mini-player-time { font-size: 12px; color: var(--text-muted); text-align: center; }
.mini-player-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s;
}
.mini-player-close:hover { color: var(--text-primary); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px 0;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text-primary); }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  z-index: 998;
  padding: 8px 0 12px;
}
.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 12px;
  transition: color 0.2s;
}
.mobile-nav-item .icon { font-size: 20px; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--accent-light); }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }

/* Section spacing */
section.home-section { margin-bottom: 40px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-bottom-grid { grid-template-columns: 1fr; }
  .single-song-layout { grid-template-columns: 1fr; }
  .song-hero-inner { flex-direction: column; }
  .song-cover-wrap { width: 100%; height: 280px; }
}

@media (max-width: 768px) {
  .has-sidebar { grid-template-columns: 1fr; }
  .home-top-section { grid-template-columns: 1fr; }
  .news-list-box { display: none; }
  .main-slider { height: 220px; }
  .mobile-menu-toggle { display: flex; }
  .main-nav .nav-menu { display: none; flex-direction: column; padding: 10px 0; }
  .main-nav.open .nav-menu { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .artists-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-bottom-nav { display: block; }
  body { padding-bottom: 70px; }
  .header-search { max-width: 200px; }
  .social-links { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .song-meta-tags { gap: 6px; }
  .artist-profile-info { flex-direction: column; align-items: flex-start; }
  .artist-bio { padding-top: 10px; }
  .download-btns { gap: 8px; }
  .btn-download { padding: 10px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .logo-text { font-size: 1.1rem; }
  .songs-scroll .song-card-small { width: 140px; }
  .songs-scroll .song-card-small .cover { height: 140px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
