:root {
  --bg: #0a0a0f;
  --card-bg: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.06);
  --accent: #c084fc;
  --accent2: #8b5cf6;
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --player-height: 90px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: var(--player-height);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* هدر */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-link {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

nav a,
nav button {
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

.btn-disabled {
  border: 1px solid #555;
  padding: 6px 18px;
  border-radius: 8px;
  color: #888;
  cursor: not-allowed;
  opacity: 0.6;
}

/* عناوین */
.page-title {
  margin: 30px 0 20px;
  font-size: 2rem;
  color: #fff;
}

/* تب‌ها */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 24px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aaa;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tab.active,
.tab:hover {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* جستجو */
.search-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 18px;
  color: white;
  font-family: inherit;
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
}

.search-box::placeholder {
  color: #666;
}

/* کارت‌های شبکه‌ای */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(167, 139, 250, 0.2);
}

.card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.card-body {
  padding: 12px;
}

.card-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.card-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* لیست ترک‌ها */
.track-list {
  list-style: none;
}

.track-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 12px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.track-item:hover {
  background: rgba(167, 139, 250, 0.1);
}

.track-num {
  width: 30px;
  color: #888;
  font-weight: 300;
  flex-shrink: 0;
}

/* عنوان آهنگ – اجازه شکستن خط برای نمایش کامل */
.track-title {
  flex: 1;
  margin: 0 15px;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
}

/* نام هنرمند در لیست – با محدودیت عرض اما چندخطی */
.track-item span:not(.track-num):not(.track-title) {
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  max-width: 150px;
  margin-left: 10px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* دکمه‌های کوچک در لیست آهنگ */
.track-actions button,
.track-actions a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a78bfa;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s;
}

.track-actions button:hover,
.track-actions a:hover {
  background: rgba(167, 139, 250, 0.2);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

/* صفحه هنرمند */
.artist-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
}

.artist-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent2);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.artist-info h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.artist-info p {
  color: var(--text-muted);
  max-width: 600px;
}

/* صفحه آلبوم */
.album-header {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.album-cover {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.album-info h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.album-info p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* دکمه‌های عمومی */
.btn {
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: rgba(139, 92, 246, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #fff;
  padding: 12px 28px;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
  background: rgba(139, 92, 246, 0.45);
  border-color: #c084fc;
  box-shadow: 0 6px 20px rgba(167, 139, 250, 0.4);
  transform: scale(1.03);
}

/* پلیر پایین */
#player-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--player-height);
  background: rgba(20, 20, 35, 0.85);
  backdrop-filter: blur(30px);
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  transition: transform 0.3s ease;
}

#player-container.hidden {
  transform: translateY(100%);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.player-cover-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s;
}

.player-cover-img:hover {
  transform: scale(1.05);
}

.player-info {
  min-width: 0;
}

.player-info #player-title {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-info #player-artist {
  font-size: 0.8rem;
  color: var(--accent);
}

/* کنترل‌های پلیر */
.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ddd;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.player-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #a78bfa;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
  transform: scale(1.08);
}

#btn-play {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  border: none;
  font-size: 1.6rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

#btn-play:hover {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.7);
}

/* آیکون‌های داخل دکمه‌ها */
.player-controls button i,
.track-actions button i,
.track-actions a i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: inherit;
}

#btn-play i {
  font-size: 1.6rem;
}

#btn-download i {
  font-size: 1.2rem;
}

.track-actions button i,
.track-actions a i {
  font-size: 1rem;
}

/* نوار پیشرفت */
.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  margin: 0 20px;
}

#progress-bar {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

#volume-slider {
  width: 80px;
  accent-color: var(--accent);
}

#btn-download {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #a78bfa;
  text-decoration: none;
  transition: all 0.3s;
}

#btn-download:hover {
  background: rgba(167,139,250,0.2);
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(167,139,250,0.4);
}

/* =========================
   واکنش‌گرایی موبایل
   ========================= */
@media (max-width: 768px) {
  body {
    padding-bottom: 130px; /* فضای کافی برای پلیر بسته‌بندی‌شده */
  }

  .page-header {
    flex-direction: column;
    gap: 10px;
  }

  .artist-header {
    flex-direction: column;
    text-align: center;
  }

  .album-header {
    flex-direction: column;
    text-align: center;
  }

  .album-cover {
    width: 180px;
    height: 180px;
  }

  #player-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 15px;
  }

  .progress-container {
    width: 100%;
    order: 10;
  }

  /* عرض بیشتر برای نام هنرمند در موبایل */
  .track-item span:not(.track-num):not(.track-title) {
    max-width: 120px;
  }
}