/* Font is enqueued separately; avoid @import to prevent render-blocking */

:root {
  --qcast-accent: #8b5cf6;
  --qcast-accent-dark: #7c3aed;
  --qcast-accent-light: #a78bfa;
  --qcast-bg: #ffffff;
  --qcast-surface: #fafbfc;
  --qcast-border: #e5e7eb;
  --qcast-border-light: #f3f4f6;
  --qcast-text-primary: #111827;
  --qcast-text-secondary: #6b7280;
  --qcast-text-muted: #9ca3af;
  --qcast-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
  --qcast-shadow-hover:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --qcast-shadow-elevated:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --qcast-radius: 20px;
  --qcast-radius-lg: 24px;
  --qcast-radius-sm: 12px;
  --qcast-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --qcast-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --qcast-glass-bg: rgba(255, 255, 255, 0.8);
  --qcast-glass-border: rgba(255, 255, 255, 0.3);
}

.qcast-player-container {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border-radius: var(--qcast-radius);
  margin: 24px auto;
  max-width: 900px;
  box-shadow: var(--qcast-shadow);
  border: 1px solid var(--qcast-border);
  overflow: hidden;
  transition: var(--qcast-transition);
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 240px 900px;
  backdrop-filter: blur(12px);
}

.qcast-player-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-light) 50%,
    var(--qcast-accent) 100%
  );
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scaleX(0);
  transform-origin: left;
  transition:
    opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.qcast-player-container:hover {
  box-shadow: var(--qcast-shadow-hover);
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.2);
}

.qcast-player-container:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.qcast-player-container.qcast-promo-episode {
  background: linear-gradient(to right, #ffffff, #fffdfa);
}

.qcast-promo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--qcast-promo-color, var(--qcast-accent)) 0%,
    var(--qcast-accent-dark) 100%
  );
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 24px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(139, 92, 246, 0.4);
  animation: pulseGlow 2.5s ease-in-out infinite;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.2),
      0 2px 8px rgba(139, 92, 246, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 6px 24px rgba(139, 92, 246, 0.5),
      0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
  }
}

.qcast-main-player {
  padding: 24px;
  position: relative;
}

@media (max-width: 768px) {
  .qcast-main-player {
    padding: 16px;
  }
}

.qcast-player {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qcast-cover {
  flex-shrink: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qcast-cover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 28px rgba(139, 92, 246, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

.qcast-cover.default-cover:hover {
  box-shadow:
    0 16px 40px rgba(139, 92, 246, 0.35),
    0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-6px) scale(1.03) rotate(1deg);
}

.qcast-player__thumb {
  width: 150px;
  height: 150px !important;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 768px) {
  .qcast-player__thumb {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .qcast-player__thumb {
    width: 80px;
    height: 80px;
  }
}

/* Enhanced default cover with sophisticated design */
.qcast-cover.default-cover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 150px;
  height: 150px;
  overflow: hidden;
}

.qcast-cover.default-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* Animated gradient layers */
    linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.15) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.15) 75%);
  background-size: 60px 60px;
  background-position:
    0 0,
    0 30px,
    30px -30px,
    -30px 0px;
  animation: qcast-pattern-shift 20s linear infinite;
  border-radius: 12px;
  opacity: 0.3;
}

.qcast-cover.default-cover::after {
  content: "♪♫";
  font-size: 48px;
  color: white;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1;
  position: relative;
  letter-spacing: 8px;
  animation: qcast-pulse 3s ease-in-out infinite;
}

@keyframes qcast-pattern-shift {
  0% {
    background-position:
      0 0,
      0 30px,
      30px -30px,
      -30px 0px;
  }
  100% {
    background-position:
      60px 0,
      60px 30px,
      90px -30px,
      30px 0px;
  }
}

@keyframes qcast-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

.qcast-content {
  flex: 1;
  min-width: 0;
}

.qcast-info {
  margin-bottom: 20px;
  padding-bottom: 2px;
}

@media (max-width: 768px) {
  .qcast-info {
    margin-bottom: 14px;
  }
}

.qcast-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--qcast-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.qcast-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--qcast-text-primary);
  margin: 0 0 4px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
  .qcast-title {
    font-size: 15px;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .qcast-title {
    font-size: 14px;
  }
}

/* Wrapper Styling */
.qcast-player-list-wrap {
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

@media (max-width: 1024px) {
  .qcast-player-list-wrap {
    padding: 36px 20px;
  }
}

@media (max-width: 768px) {
  .qcast-player-list-wrap {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .qcast-player-list-wrap {
    padding: 20px 12px;
  }
}

/* View Switcher Controls */
.qcast-list-header-integrated {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto 36px auto;
  gap: 24px;
}

@media (max-width: 1024px) {
  .qcast-list-header-integrated {
    margin-bottom: 28px;
  }
}

.qcast-nav-section {
  flex: 1;
  min-width: 0;
}

.qcast-list-controls {
  flex-shrink: 0;
  margin-bottom: 25px;
  /* Alignment with bottom of category text */
}

.qcast-view-switcher {
  display: flex;
  background: var(--qcast-bg);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--qcast-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qcast-view-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qcast-text-secondary);
  transition: all 0.2s ease;
  width: 34px;
  height: 30px;
}

.qcast-view-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.qcast-view-btn:hover {
  background: var(--qcast-border-light);
  color: var(--qcast-text-primary);
}

.qcast-view-btn.active {
  background: #fff;
  color: var(--qcast-accent);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Grid View Styles */
.qcast-player-list.qcast-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .qcast-player-list.qcast-view-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .qcast-player-list.qcast-view-grid {
    gap: 20px;
  }
}

.qcast-player-list.qcast-view-grid .qcast-player-container {
  margin: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1.5px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 2px 4px -1px rgba(0, 0, 0, 0.04);
  border-radius: var(--qcast-radius-lg);
  overflow: hidden;
  position: relative;
}

.qcast-player-list.qcast-view-grid .qcast-player-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--qcast-radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qcast-player-list.qcast-view-grid .qcast-player-container:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 20px 25px -5px rgba(139, 92, 246, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

.qcast-player-list.qcast-view-grid .qcast-player-container:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .qcast-player-list.qcast-view-grid .qcast-player-container:hover {
    transform: translateY(-4px);
  }
}

.qcast-player-list.qcast-view-grid .qcast-player {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  height: 100%;
}

.qcast-player-list.qcast-view-grid .qcast-cover {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.qcast-player-list.qcast-view-grid .qcast-player__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qcast-player-list.qcast-view-grid
  .qcast-player-container:hover
  .qcast-player__thumb {
  transform: scale(1.08);
}

.qcast-player-list.qcast-view-grid .qcast-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.9),
    rgba(250, 251, 252, 0.9)
  );
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .qcast-player-list.qcast-view-grid .qcast-content {
    padding: 20px;
  }
}

.qcast-player-list.qcast-view-grid .qcast-info {
  margin-bottom: 20px;
}

.qcast-player-list.qcast-view-grid .qcast-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  height: auto;
  min-height: 3.5em;
  letter-spacing: -0.02em;
  color: var(--qcast-text-primary);
  transition: color 0.2s ease;
}

.qcast-player-list.qcast-view-grid .qcast-player-container:hover .qcast-title {
  color: var(--qcast-accent);
}

@media (max-width: 768px) {
  .qcast-player-list.qcast-view-grid .qcast-title {
    font-size: 17px;
    min-height: 3em;
  }
}

.qcast-player-list.qcast-view-grid .qcast-controls-row {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--qcast-border-light);
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-areas:
    "play time"
    "wave wave";
  align-items: center;
  gap: 12px;
}

.qcast-player-list.qcast-view-grid .qcast-play {
  grid-area: play;
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.qcast-player-list.qcast-view-grid .qcast-time {
  grid-area: time;
  font-size: 13px;
  font-weight: 600;
  color: var(--qcast-text-muted);
}

.qcast-player-list.qcast-view-grid .qcast-wave {
  grid-area: wave;
  height: 5px;
  margin-top: 12px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.qcast-player-list.qcast-view-grid .qcast-player-container:hover .qcast-wave {
  opacity: 1;
}

.qcast-player-list.qcast-view-grid .qcast-actions {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--qcast-border-light);
  justify-content: space-between;
}

@media (max-width: 768px) {
  .qcast-list-header-integrated {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .qcast-list-controls {
    margin-bottom: 0;
  }

  /* Hide view switcher on mobile */
  .qcast-view-switcher {
    display: none;
  }

  /* Mobile adjustments for nav section */
  .qcast-nav-section {
    width: 100%;
    overflow: hidden;
  }

  .qcast-playlist-nav {
    max-width: 100%;
    padding-bottom: 12px;
  }

  .qcast-playlist-items {
    gap: 12px;
    padding: 8px 2px;
  }

  .qcast-playlist-item {
    min-width: 70px;
    gap: 8px;
  }

  .qcast-playlist-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .qcast-playlist-icon.default {
    font-size: 20px;
  }

  .qcast-playlist-name {
    font-size: 12px;
    max-width: 70px;
  }

  .qcast-playlist-item::after {
    bottom: -12px;
    height: 2px;
  }
}

@media (max-width: 480px) {
  .qcast-playlist-items {
    gap: 8px;
  }

  .qcast-playlist-item {
    min-width: 60px;
    gap: 6px;
  }

  .qcast-playlist-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .qcast-playlist-icon.default {
    font-size: 18px;
  }

  .qcast-playlist-name {
    font-size: 11px;
    max-width: 60px;
  }
}

@media (max-width: 600px) {
  .qcast-player-list.qcast-view-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .qcast-player-container {
    margin: 16px auto;
  }

  .qcast-player {
    gap: 12px;
  }
}

/* Ensure pagination appears below grid view */
.qcast-player-list-wrap .qcast-pagination {
  width: 100%;
  grid-column: 1 / -1;
}

.qcast-view-grid .qcast-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: var(--qcast-surface);
  border-radius: 12px;
  border: 1px dashed var(--qcast-border);
}

.qcast-client {
  font-size: 13px;
  font-weight: 500;
  color: var(--qcast-text-secondary);
  margin: 0;
  font-style: normal;
  opacity: 0.95;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .qcast-client {
    font-size: 12px;
  }
}

.qcast-controls-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.qcast-volume-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.qcast-volume-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.qcast-main-volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.qcast-main-volume-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--qcast-text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.qcast-main-volume-btn:hover {
  color: var(--qcast-accent);
}

.qcast-main-volume-slider {
  width: 0;
  height: 4px;
  background: var(--qcast-border-light);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.qcast-main-volume-wrap:hover .qcast-main-volume-slider {
  width: 90px;
}

.qcast-main-volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--qcast-accent);
  width: 80%;
}

.qcast-main-volume-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.qcast-play {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--qcast-accent);
  color: white;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: var(--qcast-transition);
}

.qcast-play::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qcast-play:hover {
  transform: scale(1.1);
}

.qcast-play:hover::after {
  opacity: 1;
}

.qcast-play:active {
  transform: scale(0.96);
}

@media (max-width: 768px) {
  .qcast-play {
    width: 44px;
    height: 44px;
  }

  .qcast-main-volume-wrap {
    display: none;
  }
}

.qcast-play::before {
  content: "▶";
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -50%);
}

.qcast-play.is-playing::before {
  content: "⏸";
  transform: translate(-50%, -50%);
  font-size: 16px;
}

.qcast-wave {
  flex: 1;
  height: 6px;
  cursor: pointer;
  min-width: 200px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: var(--qcast-border-light);
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.qcast-wave:hover {
  height: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qcast-wave-progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-light) 50%,
    var(--qcast-accent-dark) 100%
  );
  width: 0%;
  border-radius: 10px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  position: relative;
}

.qcast-wave-progress::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(139, 92, 246, 0.6);
}

@media (max-width: 768px) {
  .qcast-wave {
    height: 5px;
    min-width: 100px;
  }
}

.qcast-time {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--qcast-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.qcast-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .qcast-actions {
    gap: 6px;
  }

  .qcast-like-button {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 12px;
  }

  .qcast-download-button {
    width: 36px;
    height: 36px;
  }
}

.qcast-like-button {
  background: white;
  border: 1.5px solid var(--qcast-border);
  border-radius: 20px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--qcast-text-secondary);
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  position: relative;
  overflow: hidden;
}

.qcast-like-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s ease,
    height 0.4s ease;
}

.qcast-like-button:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: var(--qcast-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.qcast-like-button:hover::before {
  width: 200%;
  height: 200%;
}

.qcast-like-button.is-liked {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.08) 0%,
    rgba(220, 38, 38, 0.05) 100%
  );
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.qcast-heart-icon {
  width: 14px;
  height: 14px;
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease;
}

.qcast-heart-icon::before {
  content: "♡";
  font-size: 16px;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.qcast-like-button.is-liked .qcast-heart-icon::before {
  content: "❤️";
  font-size: 12px;
}

.qcast-like-button.pulse-animation .qcast-heart-icon {
  animation: heartPulse 0.5s ease;
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

.qcast-like-count {
  min-width: 10px;
}

.qcast-download-button {
  background: white;
  border: 1.5px solid var(--qcast-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--qcast-text-secondary);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.qcast-download-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s ease,
    height 0.4s ease;
  z-index: 0;
}

.qcast-download-button:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: var(--qcast-accent);
  transform: translateY(-2px) rotate(-10deg);
  color: var(--qcast-accent);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.qcast-download-button:hover::before {
  width: 200%;
  height: 200%;
}

.qcast-download-icon {
  width: 13px;
  height: 13px;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.qcast-download-icon::before {
  content: "↓";
  font-size: 14px;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

.qcast-ad-banner {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.qcast-ad-banner.visible {
  max-height: 140px;
  opacity: 1;
  transform: translateY(0);
}

.qcast-ad-banner.slide-in {
  animation: bannerSlideIn 0.5s ease-out forwards;
}

.qcast-ad-banner img:hover {
  box-shadow: var(--qcast-shadow-hover);
  transform: translateY(-2px);
}

.qcast-ad-banner a {
  display: block;
  text-decoration: none;
  position: relative;
}

.qcast-ad-banner a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 85, 0, 0.1) 0%,
    rgba(255, 85, 0, 0.05) 100%
  );
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.qcast-ad-banner a:hover::before {
  opacity: 1;
}

/* Banner close button */
.qcast-ad-banner .banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.qcast-ad-banner:hover .banner-close {
  opacity: 1;
}

.qcast-ad-banner .banner-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* Banner timing indicator */
.qcast-ad-banner .banner-timer {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--qcast-accent);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qcast-ad-banner.show-timer .banner-timer {
  opacity: 1;
}

/* Enhanced animations */
@keyframes bannerSlideIn {
  0% {
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  50% {
    opacity: 0.7;
  }

  100% {
    max-height: 140px;
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bannerPulse {
  0%,
  100% {
    box-shadow: var(--qcast-shadow);
  }

  50% {
    box-shadow: 0 4px 20px rgba(255, 85, 0, 0.2);
  }
}

.qcast-ad-banner.pulse img {
  animation: bannerPulse 2s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .qcast-main-player {
    padding: 16px 20px;
  }

  .qcast-player {
    gap: 16px;
  }

  .qcast-player__thumb {
    width: 64px;
    height: 64px;
  }

  .qcast-cover.default-cover {
    width: 100px;
    height: 100px;
  }

  .qcast-cover.default-cover::after {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .qcast-controls-row {
    gap: 12px;
  }

  .qcast-play {
    width: 36px;
    height: 36px;
  }

  .qcast-play::before {
    font-size: 12px;
  }

  .qcast-play.is-playing::before {
    font-size: 14px;
  }

  .qcast-ad-banner.visible {
    max-height: 120px;
    margin-bottom: 12px;
  }
}

@media (max-width: 576px) {
  .qcast-main-player {
    padding: 16px;
  }

  .qcast-player {
    flex-direction: column;
    gap: 16px;
  }

  .qcast-cover {
    align-self: center;
  }

  .qcast-player__thumb {
    width: 300px;
    height: 300px;
  }

  .qcast-cover.default-cover {
    width: 300px;
    height: 300px;
  }

  .qcast-cover.default-cover::after {
    font-size: 64px;
    letter-spacing: 12px;
  }

  .qcast-info {
    text-align: center;
    margin-bottom: 12px;
  }

  .qcast-wave {
    min-width: 150px;
  }

  .qcast-time {
    min-width: 70px;
    font-size: 12px;
  }

  .qcast-ad-banner.visible {
    max-height: 100px;
    margin-bottom: 8px;
  }

  .qcast-ad-banner .banner-close {
    width: 28px;
    height: 28px;
    font-size: 14px;
    top: 6px;
    right: 6px;
  }

  .qcast-ad-banner .banner-timer {
    bottom: 6px;
    left: 6px;
    font-size: 10px;
    padding: 3px 6px;
  }
}

@media (max-width: 480px) {
  .qcast-controls-row {
    gap: 8px;
  }

  .qcast-wave {
    min-width: 200px;
  }

  .qcast-time {
    width: auto;
    text-align: right;
    margin-top: 0;
  }

  .qcast-player__thumb {
    width: 300px;
    height: 300px;
  }

  .qcast-cover.default-cover::after {
    font-size: 32px;
  }

  .qcast-wave {
    min-width: 120px;
  }

  .qcast-time {
    min-width: 60px;
  }

  /* Compact banner for very small screens */
  .qcast-ad-banner.visible {
    max-height: 80px;
  }
}

/* Focus and Accessibility */
.qcast-play:focus {
  outline: 2px solid var(--qcast-accent);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qcast-player-container {
  animation: fadeIn 0.4s ease-out;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .qcast-player-container {
    animation: none;
  }

  .qcast-play,
  .qcast-wave {
    transition: none;
  }
}

/* Ad Modal Overlay & Content */
.qcast-ad-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
  /* Maximum possible z-index to stay on top of everything */
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 1;
  visibility: visible;
}

.qcast-ad-modal-overlay.qcast-hidden {
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.qcast-ad-modal-content {
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 24px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.5);
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(1) translateY(0);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

.qcast-ad-modal-overlay.qcast-hidden .qcast-ad-modal-content {
  transform: scale(0.8) translateY(40px);
}

.qcast-ad-modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: var(--qcast-accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 20px rgba(255, 85, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 10;
}

.qcast-ad-modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--qcast-accent-dark);
}

.qcast-ad-modal-caption {
  text-align: center;
  padding: 15px 0 5px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--qcast-text-secondary);
  font-weight: 700;
  opacity: 0.8;
}

.qcast-ad-progress-container {
  margin-top: 15px;
  padding: 0 10px 5px;
}

.qcast-ad-progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.qcast-ad-progress-fill {
  height: 100%;
  background: var(--qcast-accent);
  width: 0%;
  transition: width 0.1s linear;
}

.qcast-ad-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.qcast-ad-skip {
  background: transparent;
  border: 1px solid var(--qcast-accent);
  color: var(--qcast-accent);
  padding: 8px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
}

.qcast-ad-skip:hover {
  background: var(--qcast-accent);
  color: #fff;
}

.qcast-ad-findout {
  background: var(--qcast-accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 14px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.18s ease,
    transform 0.12s ease;
  border: 1px solid transparent;
}

.qcast-ad-findout:hover {
  background: transparent;
  border: 1px solid var(--qcast-accent-dark);
  transform: translateY(-1px);
  color: var(--qcast-accent-dark);
}

.qcast-ad-countdown {
  font-size: 11px;
  color: var(--qcast-text-secondary);
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.qcast-ad-modal-content .qcast-sticky-ad-link {
  border-radius: 14px;
  overflow: hidden;
  display: block;
  background: #000;
  /* Backdrop for contain-mode images */
  /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
  /* Removed as per instruction */
}

.qcast-ad-modal-content .qcast-sticky-ad-img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.qcast-ad-modal-content .qcast-sticky-ad-video {
  width: 100%;
  height: auto;
  max-height: 400px;
  display: block;
  background: #000;
  border-radius: 14px;
}

/* Hide the old sticky ad banner if modal is used */
.qcast-sticky-ad-banner {
  display: none !important;
}

/* Sticky Bottom Player Styles */
/* Sticky Bottom Player Overhaul */
.qcast-sticky-player {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 999999;
  height: 90px;
  display: flex;
  flex-direction: column;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

/* Minimized State - Compact Pill */
.qcast-sticky-player.is-minimized {
  height: 40px;
  width: auto;
  min-width: 120px;
  max-width: fit-content;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  padding: 0;
  cursor: pointer;
  box-shadow:
    0 8px 20px -4px rgba(139, 92, 246, 0.2),
    0 4px 8px -2px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.qcast-sticky-player.is-minimized:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 12px 28px -6px rgba(139, 92, 246, 0.25),
    0 6px 12px -2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateX(-50%) translateY(-3px);
}

.qcast-sticky-player.is-minimized .qcast-sticky-container,
.qcast-sticky-player.is-minimized .qcast-sticky-dismiss {
  display: none;
}

/* Expand Toggle */
.qcast-sticky-expand {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.qcast-sticky-player.is-minimized .qcast-sticky-expand {
  display: flex;
}

.qcast-expand-icon {
  width: 18px;
  height: 18px;
  background: var(--qcast-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 5px rgba(var(--qcast-accent-rgb), 0.3);
}

.qcast-expand-icon::before {
  content: "▶";
  color: white;
  font-size: 7px;
  margin-left: 2px;
}

.qcast-expand-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1a1a;
}

.qcast-sticky-player:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 30px 60px -12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.qcast-sticky-player.qcast-hidden {
  transform: translateY(150%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

.qcast-sticky-dismiss {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  color: #666;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.qcast-sticky-player:hover .qcast-sticky-dismiss {
  opacity: 1;
  transform: scale(1);
}

.qcast-sticky-dismiss:hover {
  background: #f84444;
  color: #fff;
  transform: scale(1.1);
}

.qcast-sticky-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
}

.qcast-sticky-left {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 28%;
  min-width: 200px;
}

.qcast-sticky-thumb-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.qcast-sticky-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.qcast-sticky-player:hover .qcast-sticky-thumb {
  transform: scale(1.1);
}

.qcast-sticky-info {
  min-width: 0;
}

.qcast-sticky-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.qcast-sticky-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qcast-sticky-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qcast-sticky-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.qcast-sticky-controls button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qcast-sticky-controls button:not(.qcast-sticky-play):hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--qcast-accent);
  transform: scale(1.1);
}

.qcast-sticky-play {
  width: 44px;
  height: 44px;
  background: var(--qcast-accent) !important;
  color: white !important;
  box-shadow: 0 10px 20px rgba(var(--qcast-accent-rgb), 0.2);
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.qcast-sticky-play:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(var(--qcast-accent-rgb), 0.35) !important;
}

.qcast-sticky-play:active {
  transform: scale(0.95);
}

.qcast-sticky-play::before {
  content: "▶";
  font-size: 16px;
  margin-left: 2px;
}

.qcast-sticky-play.is-playing::before {
  content: "⏸";
  margin-left: 0;
  font-size: 18px;
}

.qcast-sticky-prev::before {
  content: "⏮";
  font-size: 22px;
}

.qcast-sticky-next::before {
  content: "⏭";
  font-size: 22px;
}

.qcast-sticky-progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 520px;
}

.qcast-sticky-time-current,
.qcast-sticky-time-total {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  width: 36px;
  font-variant-numeric: tabular-nums;
}

.qcast-sticky-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.qcast-sticky-progress-bar:hover {
  height: 8px;
}

.qcast-sticky-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-light) 50%,
    var(--qcast-accent-dark) 100%
  );
  border-radius: 6px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.qcast-sticky-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid var(--qcast-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 4px 12px rgba(139, 92, 246, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.qcast-sticky-progress-bar:hover .qcast-sticky-progress-handle {
  transform: translate(-50%, -50%) scale(1);
}

.qcast-sticky-right {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 28%;
}

.qcast-sticky-volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  margin-top: 12px;
}

.qcast-sticky-volume-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.qcast-sticky-volume-btn:hover {
  color: var(--qcast-accent);
}

.qcast-sticky-volume-slider {
  width: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.qcast-sticky-volume-wrap:hover .qcast-sticky-volume-slider {
  width: 80px;
}

.qcast-sticky-volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--qcast-accent);
  width: 80%;
}

.qcast-volume-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.qcast-sticky-player .qcast-actions {
  display: flex;
  gap: 10px;
}

.qcast-sticky-player .qcast-actions button,
.qcast-sticky-player .qcast-actions a {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
}

.qcast-sticky-player .qcast-actions button:hover,
.qcast-sticky-player .qcast-actions a:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--qcast-accent);
  transform: translateY(-2px);
}

/* Queue Button */
.qcast-queue-button {
  position: relative;
}

.qcast-queue-button svg {
  display: block;
}

.qcast-queue-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--qcast-accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}

.qcast-queue-button.active {
  background: var(--qcast-accent) !important;
  color: white !important;
}

/* Queue Panel */
.qcast-queue-panel {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 380px;
  max-width: 90vw;
  max-height: 450px;
  background: white;
  border-radius: 12px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  margin-bottom: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10001;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qcast-queue-panel:not(.qcast-hidden) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.qcast-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

.qcast-queue-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.qcast-queue-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.qcast-queue-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

.qcast-queue-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.qcast-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.qcast-queue-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.qcast-queue-item.is-current {
  background: rgba(var(--qcast-accent-rgb, 139, 92, 246), 0.08);
}

.qcast-queue-item.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--qcast-accent);
  border-radius: 0 3px 3px 0;
}

.qcast-queue-item-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
}

.qcast-queue-item-info {
  flex: 1;
  min-width: 0;
}

.qcast-queue-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qcast-queue-item-client {
  font-size: 12px;
  color: #666;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qcast-queue-item-duration {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  flex-shrink: 0;
}

/* Dark Mode for Queue */
@media (prefers-color-scheme: dark) {
  body.qcast-dark .qcast-queue-panel {
    background: rgba(30, 30, 30, 0.98);
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  body.qcast-dark .qcast-queue-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
  }

  body.qcast-dark .qcast-queue-header h3 {
    color: #fff;
  }

  body.qcast-dark .qcast-queue-close {
    color: #aaa;
  }

  body.qcast-dark .qcast-queue-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  body.qcast-dark .qcast-queue-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  body.qcast-dark .qcast-queue-item-title {
    color: #fff;
  }

  body.qcast-dark .qcast-queue-item-client {
    color: #aaa;
  }

  body.qcast-dark .qcast-queue-item-thumb {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Queue Panel Mobile Responsive */
@media (max-width: 768px) {
  .qcast-queue-panel {
    width: calc(100vw - 24px);
    max-height: 60vh;
    left: 12px;
    right: 12px;
    margin-bottom: 84px; /* Account for sticky player height */
  }

  .qcast-queue-header {
    padding: 12px 16px;
  }

  .qcast-queue-header h3 {
    font-size: 14px;
  }

  .qcast-queue-item {
    padding: 8px;
    gap: 10px;
  }

  .qcast-queue-item-thumb {
    width: 44px;
    height: 44px;
  }

  .qcast-queue-item-title {
    font-size: 13px;
  }

  .qcast-queue-item-client {
    font-size: 11px;
  }

  .qcast-queue-item-duration {
    font-size: 11px;
  }
}

/* Specific Dark Mode overrides for the Overhauled Sticky Player */
@media (prefers-color-scheme: dark) {
  body.qcast-dark .qcast-sticky-player {
    background: rgba(26, 26, 26, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      0 20px 40px -10px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  body.qcast-dark .qcast-sticky-player.is-minimized {
    background: rgba(40, 40, 40, 0.9);
  }

  body.qcast-dark .qcast-expand-label {
    color: #fff;
  }

  body.qcast-dark .qcast-sticky-title {
    color: #fff;
  }

  body.qcast-dark .qcast-sticky-subtitle {
    color: #aaa;
  }

  body.qcast-dark .qcast-sticky-controls button {
    color: #fff;
  }

  body.qcast-dark .qcast-sticky-progress-bar {
    background: rgba(255, 255, 255, 0.1);
  }

  body.qcast-dark .qcast-sticky-volume-slider {
    background: rgba(255, 255, 255, 0.1);
  }

  body.qcast-dark .qcast-sticky-player .qcast-actions button,
  body.qcast-dark .qcast-sticky-player .qcast-actions a {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
  }
}

/* Responsive Mobile Adjustments for Premium Sticky Player */
@media (max-width: 768px) {
  .qcast-sticky-player {
    height: 72px;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .qcast-sticky-container {
    padding: 0;
    gap: 12px;
  }

  .qcast-sticky-left {
    flex: 1;
    min-width: 0;
  }

  .qcast-sticky-thumb-wrap {
    width: 44px;
    height: 44px;
  }

  .qcast-sticky-title {
    font-size: 13px;
  }

  .qcast-sticky-center {
    flex: 0 0 auto;
    order: 3;
    gap: 0;
  }

  .qcast-sticky-controls button:not(.qcast-sticky-play) {
    display: none;
  }

  .qcast-sticky-progress-row {
    position: absolute;
    top: -2px;
    left: 16px;
    right: 16px;
    max-width: none;
    pointer-events: none;
  }

  .qcast-sticky-progress-bar {
    height: 2px;
  }

  .qcast-sticky-time-current,
  .qcast-sticky-time-total {
    display: none;
  }

  .qcast-sticky-right {
    width: auto;
    order: 2;
    gap: 8px;
  }

  .qcast-sticky-volume-wrap {
    display: none;
  }

  .qcast-sticky-player .qcast-actions button,
  .qcast-sticky-player .qcast-actions a {
    width: 32px;
    height: 32px;
  }
}

.qcast-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Player display */
.qcast-player-loaded {
  display: block;
}

/* Playlist Navigation */
.qcast-playlist-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--qcast-border) transparent;
  max-width: 900px;
  margin: 0;
  position: relative;
  padding-bottom: 8px;
}

.qcast-playlist-nav::-webkit-scrollbar {
  height: 4px;
}

.qcast-playlist-nav::-webkit-scrollbar-track {
  background: transparent;
}

.qcast-playlist-nav::-webkit-scrollbar-thumb {
  background: var(--qcast-border);
  border-radius: 4px;
}

.qcast-playlist-nav::-webkit-scrollbar-thumb:hover {
  background: var(--qcast-text-muted);
}

.qcast-playlist-items {
  display: flex;
  gap: 20px;
  padding: 8px 5px;
}

.qcast-playlist-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 85px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.qcast-playlist-item::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-light) 100%
  );
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.qcast-playlist-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

.qcast-playlist-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(to bottom, #ffffff 0%, var(--qcast-surface) 100%);
  border: 2px solid var(--qcast-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.qcast-playlist-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qcast-playlist-item:hover .qcast-playlist-icon::before {
  opacity: 1;
}

.qcast-playlist-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qcast-playlist-icon.default {
  font-size: 24px;
  background: linear-gradient(
    135deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-dark) 100%
  );
  border: none;
}

.qcast-playlist-placeholder {
  font-size: 18px;
  font-weight: 700;
  color: var(--qcast-text-secondary);
}

.qcast-playlist-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--qcast-text-secondary);
  transition: all 0.3s ease;
  text-align: center;
  font-family: "Inter", sans-serif;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qcast-playlist-item:hover .qcast-playlist-icon {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--qcast-accent);
}

.qcast-playlist-item:hover .qcast-playlist-name {
  color: var(--qcast-accent);
  transform: translateY(-2px);
}

.qcast-playlist-item.active .qcast-playlist-icon {
  border-color: var(--qcast-accent);
  background: linear-gradient(
    135deg,
    rgba(255, 85, 0, 0.08) 0%,
    rgba(255, 85, 0, 0.03) 100%
  );
  box-shadow:
    0 0 0 3px rgba(255, 85, 0, 0.2),
    0 4px 12px rgba(255, 85, 0, 0.15);
  transform: scale(1.05);
}

.qcast-playlist-item.active .qcast-playlist-name {
  color: var(--qcast-accent);
  font-weight: 700;
}

.qcast-no-results {
  text-align: center;
  padding: 40px;
  color: var(--qcast-text-muted);
  font-style: italic;
}

/* Pagination Styling */
.qcast-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  margin-bottom: 32px;
  padding: 20px;
  flex-wrap: wrap;
}

.qcast-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
  border: 1px solid var(--qcast-border);
  color: var(--qcast-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--qcast-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.qcast-page-link:hover {
  border-color: var(--qcast-accent);
  color: var(--qcast-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 85, 0, 0.15);
  background: #ffffff;
}

.qcast-page-link.active {
  background: linear-gradient(
    135deg,
    var(--qcast-accent) 0%,
    var(--qcast-accent-dark) 100%
  );
  border-color: var(--qcast-accent);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 85, 0, 0.35);
}

.qcast-page-link.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.4);
}

.qcast-page-indicator {
  font-size: 14px;
  color: var(--qcast-text-muted);
  font-weight: 500;
  padding: 0 8px;
}

.qcast-page-ellipsis {
  color: var(--qcast-text-muted);
  padding: 0 4px;
  font-size: 18px;
}

@media (max-width: 768px) {
  .qcast-pagination {
    gap: 8px;
    padding: 16px;
    margin-top: 32px;
    margin-bottom: 24px;
  }
}

@media (max-width: 576px) {
  .qcast-pagination {
    gap: 6px;
    padding: 12px;
  }

  .qcast-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .qcast-page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .qcast-page-ellipsis {
    font-size: 16px;
  }
}
