@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Global push for fixed headers */
body {
  padding-top: 28px; /* Offset for the top gold header */
}

:root {
  --page-bg: #080B10;
  --glass-card: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --muted-text: rgba(255, 255, 255, 0.65);
  --primary-accent: #F59E0B; /* Amber Shiny Gold */
  --secondary-accent: #10B981; /* Emerald */
}

/* Mini Highlight Player */
.mini-highlight-player {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: 320px;
  background: linear-gradient(135deg, rgba(142, 154, 154, 0.2) 0%, rgba(147, 160, 160, 0.1) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateX(-120%);
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-highlight-player.active {
  transform: translateX(0);
}

.mini-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.mini-video-container video {
  width: 100%;
  height: 100%;
  object-cover: cover;
}

.mini-player-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.mini-stat-item {
  display: flex;
  flex-direction: column;
}

.mini-stat-label {
  font-size: 8px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mini-stat-value {
  font-size: 14px;
  font-weight: 900;
  color: #F59E0B;
}

.mini-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-player-artwork {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.mini-player-text {
  flex: 1;
  overflow: hidden;
}

.mini-player-title {
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-artist {
  font-size: 10px;
  font-weight: 700;
  color: #F59E0B;
}

.welcome-toast {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 10001;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
  padding: 8px 24px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.welcome-toast.active {
  transform: translateX(-50%) translateY(0);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10002;
  max-width: 400px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(150%);
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-icon {
  width: 40px;
  height: 40px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
}

.cookie-title {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.cookie-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

.cookie-btn-accept {
  flex: 1;
  background: #fff;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.3s ease;
}

.cookie-btn-accept:hover {
  background: #F59E0B;
}

.cookie-btn-settings {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.cookie-btn-settings:hover {
  background: rgba(255, 255, 255, 0.1);
}

@font-face {
  font-family: 'Inter', sans-serif;
  background-color: var(--page-bg);
  color: white;
  margin: 0;
  overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass {
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-hover {
  transition: all 0.3s ease;
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transform: translateY(-2px);
}

/* African Flag Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: inline-block;
  animation: marquee 40s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  margin: 0 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #1F2937;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Typography Enhancements */
.text-editorial {
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section Backgrounds for Glass Visibility */
.chart-section-bg {
  position: relative;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(142, 154, 154, 0.08) 0%,
    transparent 70%
  );
}

/* Unified Frosted Liquid Glass System - Soft Light Grey (Apple-like) */
.glass-card {
  background: linear-gradient(
    135deg,
    rgba(142, 154, 154, 0.18) 0%,
    rgba(147, 160, 160, 0.1) 100%
  );
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.15); /* Softened border opacity */
  border-radius: 20px;
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.2); /* Softened inner glow */
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(142, 154, 154, 0.22) 0%,
    rgba(147, 160, 160, 0.15) 100%
  );
  border-color: rgba(255, 255, 255, 0.25);
}

/* Chart Row Layout - Glass Tray Look */
.chart-row {
  margin-bottom: 2.5rem; /* Increased spacing */
}

.chart-row-header {
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 40px 50px 1fr 40px; /* Mobile simplified layout */
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  background: linear-gradient(
    90deg,
    rgba(142, 154, 154, 0.15) 0%,
    rgba(147, 160, 160, 0.08) 100%
  ) !important;
}

@media (min-width: 768px) {
  .chart-row-header {
    grid-template-columns: 50px 60px 1fr 180px 100px;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .chart-row-header {
    padding: 1.5rem 2.5rem;
    grid-template-columns: 80px 80px 1fr 240px 120px;
    gap: 2rem;
  }
}

/* Hide non-essential metrics on very small mobile */
@media (max-width: 767px) {
  .chart-row-header > div:nth-child(4) { /* ZONE D: METRICS */
    display: none;
  }
}

/* Typography Hierarchy - Gold Accents for Data */
.text-rank {
  font-size: 1.25rem; /* Smaller on mobile */
  font-weight: 900;
  color: var(--primary-accent);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  width: 40px;
  text-align: left;
}

@media (min-width: 768px) {
  .text-rank { font-size: 1.75rem; width: 50px; }
}

@media (min-width: 1024px) {
  .text-rank { font-size: 2.5rem; width: 80px; }
}

.text-song {
  font-size: 0.85rem; /* Smaller on mobile */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #F8FAFA;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .text-song { font-size: 1rem; }
}

.text-artist {
  font-size: 0.7rem; /* Smaller on mobile */
  color: var(--primary-accent); /* Artist name gold */
  font-weight: 700;
  margin-top: 2px;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .text-artist { font-size: 0.8rem; }
}

/* Mobile Menu Refinements */
#mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#mobile-menu .flex-col {
  width: 100%;
  align-items: center;
}

#mobile-menu a, #mobile-menu button {
  font-size: 1.5rem !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
  width: auto;
}

#mobile-menu .space-y-4 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-dropdown-content.active {
  max-height: 500px;
  margin-top: 1rem;
}

.mobile-dropdown-content a {
  font-size: 1rem !important;
  opacity: 0.6;
  padding: 0.5rem 0;
}

.mobile-dropdown-content a:hover {
  opacity: 1;
  color: var(--primary-accent);
}

/* Section Labels */
.detail-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

/* Stat Cards - Elevated Neumorphic depth */
.stat-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
}

.stat-number-large {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary-accent);
  line-height: 1;
  min-width: 60px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.stat-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #F8FAFA;
  letter-spacing: 0.05em;
}

.stat-date {
  font-size: 0.95rem;
  color: #B0B8B8;
  margin-top: 0.25rem;
  position: relative;
  display: inline-block;
}

.stat-date::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Song Preview Player Card */
.player-card {
  padding: 1.5rem;
}

.play-btn-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    #F59E0B 0%,
    #D97706 100%
  ); /* Gold Play Button */
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 
    0 4px 15px rgba(245, 158, 11, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-btn-large:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.play-btn-large.playing {
  background: white;
  color: black;
}

/* Share & Vote Card Utility Zone */
.vote-btn {
  background: linear-gradient(
    135deg,
    #F59E0B 0%,
    #D97706 100%
  ) !important; /* Gold Vote Button */
  border: none !important;
  color: black !important;
  padding: 0.5rem 1rem !important; /* Reduced size */
  font-size: 0.7rem !important;
  font-weight: 900;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.vote-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.vote-count-label {
  color: var(--primary-accent); /* Total Votes label gold */
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.vote-count {
  font-size: 1.25rem !important; /* Reduced digit size */
  font-weight: 900;
  color: white;
}

.share-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: white;
  border-radius: 12px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.share-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.favorite-btn, .toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: white;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.favorite-btn:hover, .toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

.favorite-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #666;
  border-color: white;
}

.chart-row.is-expanded .toggle-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #666;
}

/* Progress & EQ - Light Monochrome */
.progress-bar, .eq-bar {
  background: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Award Item Cards - Soft Tray Style */
.award-card {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05) !important;
}

.award-icon-badge {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Expanded Grid System */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 3rem 4rem;
    gap: 4rem;
  }
}

.chart-detail-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.chart-row.is-expanded .chart-detail-panel {
  max-height: 3000px;
  opacity: 1;
}

.toggle-btn svg {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-row.is-expanded .toggle-btn svg {
  transform: rotate(180deg);
}

.share-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--primary-accent);
  border-radius: 12px;
}

.share-btn:hover {
  background: var(--primary-accent);
  color: black;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.favorite-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--muted-text);
}

.favorite-btn.active {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
}

/* Hide heart (favorite) on mobile only */
@media (max-width: 767px) {
  .favorite-btn {
    display: none !important;
  }
}

.toggle-btn {
  width: 32px; /* Slightly smaller on mobile */
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Spoke Capsule Styles */
.spoke-capsule {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.spoke-capsule:hover {
  transform: translateY(-10px);
  border-color: var(--primary-accent);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.1);
}

.spoke-capsule::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.spoke-capsule:hover::after {
  opacity: 1;
}

.spoke-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-style: italic;
  color: #fff;
}

.spoke-tag {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
  display: block;
}

.spoke-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-top: 1rem;
}

.spoke-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-accent);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.spoke-capsule:hover .spoke-icon {
  background: var(--primary-accent);
  color: #000;
  transform: rotate(5deg) scale(1.1);
}

@media (min-width: 768px) {
  .toggle-btn { width: 36px; height: 36px; }
}

.chart-row.is-expanded .toggle-btn {
  border-color: var(--primary-accent);
  background: var(--primary-accent);
  color: black;
}

/* Billboard Typography (Cleaned up) */
.metric-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: white; /* LW, PK, WK White */
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-accent); /* Metric values Gold */
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Image Swell Feature */
.chart-thumbnail-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chart-thumbnail-container img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-thumbnail-container:hover {
  transform: scale(1.15); /* Container swells */
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
}

.chart-thumbnail-container:hover img {
  transform: scale(1.1); /* Image inside swells slightly more for depth */
}

/* Button & Pill Styles */
.btn-primary {
  background-color: var(--primary-accent);
  color: #000;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.pill {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Image Glow Effect */
.image-glow {
  position: relative;
}

.image-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Verification Badge (Glocal) */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
