@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@500;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
  --bg-card: rgba(15, 18, 28, 0.85);
  --border-card: rgba(255, 255, 255, 0.12);
  --accent-cyan: #00f2fe;
  --accent-purple: #4facfe;
  --accent-glow: rgba(0, 242, 254, 0.4);
  --text-active: #ffffff;
  --text-inactive: rgba(255, 255, 255, 0.45);
  --word-highlight: #ff007a;
  --word-highlight-gradient: linear-gradient(90deg, #ff007a, #7928ca, #00f2fe);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

body {
  background: transparent;
  font-family: var(--font-main);
  color: #fff;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.overlay-container {
  width: 100%;
  max-width: 580px;
  background: #141417;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #2c2c32;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px var(--accent-glow);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: translateY(0);
}

.overlay-container.hidden {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}

body.bg-transparent,
.bg-transparent {
  --bg-card: transparent !important;
  --border-card: transparent !important;
}

body.bg-transparent .overlay-container {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── Now Playing Card ── */
.now-playing-card {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.artwork-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.track-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.play-pulse {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 2px solid var(--accent-cyan);
  opacity: 0.8;
  animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

.track-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.track-title-wrapper {
  overflow: hidden;
  white-space: nowrap;
}

.track-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.track-artist {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.requester-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  background: rgba(255, 0, 122, 0.15);
  border: 1px solid rgba(255, 0, 122, 0.3);
  border-radius: 20px;
  padding: 2px 8px;
  width: fit-content;
}

.requester-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.requester-text {
  font-size: 11px;
  font-weight: 700;
  color: #ff4191;
}

.provider-pill {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--accent-cyan);
  border-radius: 6px;
}

/* ── Progress Bar ── */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 14px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff007a, #00f2fe);
  border-radius: 3px;
  transition: width 0.15s linear;
  box-shadow: 0 0 8px #00f2fe;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ── Karaoke Lyrics Viewport ── */
.lyrics-viewport {
  margin-top: 14px;
  height: 110px;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
}

.lyrics-scroll-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  top: 36px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lyric-line {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-inactive);
  transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
  transform: scale(0.96);
  transform-origin: left center;
}

.lyric-line.active {
  color: var(--text-active);
  opacity: 1;
  transform: scale(1.04);
  text-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.lyric-line.passed {
  opacity: 0.35;
  transform: scale(0.92);
}

.lyric-line.placeholder {
  color: #64748b;
  font-size: 14px;
  font-style: italic;
  text-align: center;
  margin-top: 15px;
}

/* Word-by-word karaoke timing highlights */
.lyric-word {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.1s ease, transform 0.15s ease;
  margin-right: 0.25em;
}

.lyric-word.active {
  color: #00f2fe;
  font-weight: 800;
  text-shadow: 0 0 12px #00f2fe, 0 0 24px rgba(0, 242, 254, 0.8);
  transform: translateY(-1px) scale(1.05);
}

.lyric-word.passed {
  color: #ffffff;
  font-weight: 700;
}

/* Secondary Subtitle Translation Line */
.lyric-sub-line {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, transform 0.3s ease;
  transform: translateY(-2px);
  margin-top: 0;
  letter-spacing: 0.1px;
}

.lyric-line.active .lyric-sub-line {
  display: block;
  opacity: 0.95;
  max-height: 40px;
  color: var(--accent-cyan, #00f2fe);
  margin-top: 3px;
  transform: translateY(0);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}
