/* Style system for Top 12 Songs Page - Premium Dark Mode / Glassmorphism */

:root {
  --bg-color: #060713;
  --card-bg: rgba(15, 18, 36, 0.65);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f4f6;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --primary-glow: rgba(124, 58, 237, 0.15);
  
  /* Accent Colors */
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-gold: #fbbf24;
  --accent-silver: #cbd5e1;
  --accent-bronze: #d97706;
}

/* Reset & Base Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-title {
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 70%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.text-muted-custom {
  color: var(--text-secondary);
}

.header-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  margin: 1.5rem auto 0;
  border-radius: 2px;
}

/* Decorative Background Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background-color: var(--accent-purple);
  top: -10%;
  left: -5%;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background-color: var(--accent-indigo);
  top: 40%;
  right: -10%;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background-color: var(--accent-cyan);
  bottom: -5%;
  left: 10%;
}

/* Music Icon styling in Header */
.music-icon-wrapper {
  display: inline-flex;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--accent-purple);
  box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.2);
  animation: pulse-music 3s infinite ease-in-out;
}

@keyframes pulse-music {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 40px 0 rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
  }
}

/* Song Cards */
.song-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  transform: translateY(0);
}

/* Page load animations (staggered via JS) */
.js-enabled .song-card {
  opacity: 0;
  transform: translateY(30px);
}

.js-enabled .song-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.song-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.15), 
              0 0 0 1px rgba(139, 92, 246, 0.2);
}

/* Badges and Headers */
.song-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.artist-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: right;
  word-break: break-word; /* allows long words to wrap cleanly if needed */
}

.rank-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.rank-1 {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

.rank-2 {
  background: rgba(203, 213, 225, 0.15);
  border-color: rgba(203, 213, 225, 0.4);
  color: var(--accent-silver);
  box-shadow: 0 0 15px rgba(203, 213, 225, 0.15);
}

.rank-3 {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.4);
  color: var(--accent-bronze);
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.15);
}

/* Card Body elements */
.song-title {
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.genre-badge {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.song-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}


/* Video Containers */
.video-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.song-card:hover .video-container {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

/* Footer border */
.border-top-custom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .song-card {
    margin-bottom: 1rem;
  }
}
