/* ===== Modern Color Scheme ===== */
:root {
    --primary: #4361ee;       /* Vibrant blue */
    --secondary: #3a0ca3;    /* Deep purple */
    --accent: #f72585;       /* Energetic pink */
    --dark: #1a1a2e;         /* Dark navy */
    --light: #f8f9fa;        /* Off-white */
    --gray: #e2e8f0;         /* Light gray */
    --success: #4cc9f0;      /* Bright teal */
  }
  
  /* ===== Base Reset ===== */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }
  
  /* ===== Header/Navigation ===== */
  header {
    background: white;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
  }
  
  .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
  }
  
  .admin-login {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
  }
  
  .admin-login:hover {
    background: rgba(67, 97, 238, 0.1);
  }
  
  /* ===== Hero Section ===== */
  .hero {
    text-align: center;
    padding: 5rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
  }
  
  .search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.2);
  }
  
  #searchInput {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
  }
  
  #searchBtn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  #searchBtn:hover {
    background-color: var(--secondary);
  }
  
  /* ===== Music Grid ===== */
  .music-results {
    padding: 3rem 0;
  }
  
  .music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
  }
  
  .music-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  .music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  }
  
  .music-cover {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center center;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
    background: linear-gradient(45deg, #f5f7fa, #e4e8f0); /* Fallback gradient */
}

/* For portrait-oriented covers */
.music-cover[style*="height"] {
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px;
}
  
  .music-info {
    padding: 1.5rem;
  }
  
  .music-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .music-artist {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
  }
  
  /* ===== Audio Player ===== */
  .audio-player {
    width: 100%;
    margin-top: 1rem;
  }
  
  .audio-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
  }
  
  .audio-controls button {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .audio-controls button:hover {
    background: var(--secondary);
    transform: scale(1.05);
  }
  
  .progress-container {
    width: 100%;
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    cursor: pointer;
  }
  
  .progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
  }
  
  .time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
  }
  
  /* ===== Download Button ===== */
  .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
  }
  
  .download-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
  }
  
  /* ===== Footer ===== */
  footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
  }
  
  footer p {
    opacity: 0.8;
    font-size: 0.9rem;
  }
  
  /* ===== Responsive Design ===== */
  @media (max-width: 768px) {
    .hero h1 {
      font-size: 2.2rem;
    }
    
    .music-grid {
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .search-container {
      margin: 0 1rem;
    }
  }

  /* Audio Player Styles */
.audio-player {
    margin: 1rem 0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Professional Play/Pause Buttons */
.play-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    border-radius: 50%;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn i {
    font-size: 14px;
    margin-left: 2px; /* Adjust play icon alignment */
}

.play-btn .fa-pause {
    margin-left: 0; /* Perfectly center pause icon */
}

.progress-container {
    flex-grow: 1;
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.current-time {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 40px;
    text-align: right;
}
.time-display {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 90px;
    text-align: center;
}

.duration {
    color: #94a3b8;
}

/* Song Details Page */
.song-page {
  max-width: 800px;
  margin: 2rem auto;
}

.song-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.song-header img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.song-meta h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.song-meta h2 {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.song-player {
  margin: 2rem 0;
}

.song-player audio {
  width: 100%;
  margin-bottom: 1rem;
}

.song-lyrics {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
}

.song-lyrics h3 {
  margin-bottom: 1rem;
}

/* Homepage Updates */
.song-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.details-btn {
  display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.details-btn:hover {
  background-color: var(--secondary);
    transform: translateY(-2px);
}

