:root {
  --bg: rgba(8, 10, 15, 0.98);
  --bg-secondary: rgba(18, 22, 30, 0.95);
  --bg-tertiary: rgba(28, 35, 45, 0.9);
  --fg: #ffffff;
  --fg-muted: #a8b5c7;
  --fg-subtle: #7a8699;
  --accent: #1db954;
  --accent-hover: #1ed760;
  --accent-light: rgba(29, 185, 84, 0.2);
  --accent-glow: rgba(29, 185, 84, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-light: rgba(0, 0, 0, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-primary: linear-gradient(135deg, rgba(29, 185, 84, 0.15), rgba(30, 215, 96, 0.08));
  --gradient-secondary: linear-gradient(135deg, rgba(18, 22, 30, 0.9), rgba(8, 10, 15, 0.95));
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: 'SF Pro Display', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--fg);
  font-weight: 400;
  line-height: 1.4;
  overflow: hidden;
}

.overlay {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg);
  backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 20px 28px;
  box-shadow:
    0 12px 40px var(--shadow),
    0 0 0 1px var(--glass-bg),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 20px rgba(29, 185, 84, 0.1);
  width: fit-content;
  min-width: 550px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.overlay::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(29, 185, 84, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.overlay:hover::after {
  opacity: 1;
}

.overlay:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 50px var(--shadow),
    0 0 0 1px var(--border-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 25px rgba(29, 185, 84, 0.15);
}

.cover-wrap {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
  background-color: var(--accent-hover);
  box-shadow:
    0 12px 30px var(--shadow),
    0 0 0 1px var(--glass-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(29, 185, 84, 0.25) 0%,
    rgba(30, 215, 96, 0.1) 50%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.cover-wrap:hover::before {
  opacity: 1;
}

.cover-wrap:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow:
    0 16px 40px var(--shadow),
    0 0 0 1px var(--border-hover),
    0 0 20px rgba(29, 185, 84, 0.2);
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 0;
}

.cover-wrap:hover .cover {
  transform: scale(1.15);
}

.meta {
  flex: 1;
  min-width: 320px;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  position: relative;
}

.title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--fg);
  text-shadow:
    0 2px 4px var(--shadow),
    0 0 20px rgba(29, 185, 84, 0.3);
  margin-bottom: 6px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--fg) 0%, var(--fg-muted) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.artist {
  font-weight: 600;
  font-size: 20px;
  color: var(--fg-muted);
  opacity: 0.95;
  transition: all 0.3s ease;
}

.overlay:hover .artist {
  color: var(--accent);
  opacity: 1;
}

.progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  box-shadow:
    0 0 20px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%);
  animation: progressShine 2.5s infinite;
}

@keyframes progressShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.2) 70%,
    transparent 100%);
  animation: progressPulse 3s infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.times {
  display: flex;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.overlay.enter {
  animation: slideInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInScale {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    filter: blur(10px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px) scale(1.02);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.line.scrollable {
  mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
}

.line.scrollable > span {
  display: inline-block;
  padding-inline: 16px;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  backdrop-filter: blur(24px);
  color: var(--fg);
  font-size: 18px;
  padding: 32px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 12px 40px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: noticePulse 2s ease-in-out infinite;
}

@keyframes noticePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.notice a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px var(--accent-glow);
}

.notice a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

/* Enhanced responsive design */
@media (max-width: 700px) {
  .overlay {
    min-width: auto;
    padding: 16px 20px;
    gap: 18px;
    border-radius: 20px;
  }

  .cover-wrap {
    width: 70px;
    height: 70px;
    border-radius: 16px;
  }

  .title {
    font-size: 22px;
  }

  .artist {
    font-size: 16px;
  }

  .meta {
    min-width: 240px;
  }

  .times {
    font-size: 13px;
    min-width: 70px;
  }
}

@media (max-width: 500px) {
  .overlay {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 16px 20px;
  }

  .meta {
    min-width: auto;
    max-width: none;
  }

  .progress {
    justify-content: center;
  }
}

/* Loading animation for initial load */
@keyframes initialLoad {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.overlay {
  animation: initialLoad 0.6s ease-out;
}

/* Subtle breathing effect */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.005); }
}

.overlay:hover {
  animation: breathe 3s ease-in-out infinite;
}