/* Modern centered round player (YouTube Music style) */

.cgpt-player { width:260px; text-align:center; }
.cgpt-player-center { display:flex; justify-content:center; align-items:center; }
.cgpt-play-toggle { background:linear-gradient(135deg,#1db954,#1ed760); border:none; width:96px; height:96px; border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:0 8px 20px rgba(0,0,0,0.2); cursor:pointer; color:#ffffff; }
.cgpt-play-toggle[data-state="loading"] { opacity:0.6; transform:scale(0.98); }
.cgpt-play-toggle .cgpt-play-icon { width:56px; height:56px; }
.cgpt-player-controls { margin-top:12px; display:flex; gap:8px; align-items:center; justify-content:center; flex-direction:column; }
.cgpt-progress { width:100%; height:8px; background:#eee; border-radius:8px; overflow:hidden; }
.cgpt-progress-bar { width:0%; height:100%; background:#1db954; transition:width 0.2s linear; }
.cgpt-volume-range { width:160px; }
.cgpt-player-empty { color:#666; font-style:italic; }



/* --- Play button glow & animations (added) --- */
:root {
  --cgpt-glow-color: rgba(29,185,84,0.9);
  --cgpt-glow-size: 18px;
  --cgpt-glow-strength: 0.9;
}

/* round glow around play toggle */
.cgpt-play-toggle {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  --cgpt-glow-blur: 22px;
  box-shadow: 0 0 var(--cgpt-glow-blur) rgba(0,0,0,0); /* default no glow */
}

/* glow element using pseudo */
.cgpt-play-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  box-shadow: 0 0 var(--cgpt-glow-blur) var(--cgpt-glow-color);
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform;
  filter: blur(6px);
}

/* idle subtle pulse */
@keyframes cgpt-idle-pulse {
  0% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.03); opacity: 0.55; }
  100% { transform: scale(1); opacity: 0.75; }
}

/* hover stronger pulse */
.cgpt-play-toggle:hover::after {
  opacity: 1;
  transform: scale(1.08);
  animation: cgpt-hover-pulse 1.2s infinite ease-in-out;
}

@keyframes cgpt-hover-pulse {
  0% { transform: scale(1.03); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
  100% { transform: scale(1.03); opacity: 1; }
}

/* when idle (not playing) show subtle pulse */
.cgpt-play-toggle[data-state="stopped"]::after,
.cgpt-play-toggle[data-state="paused"]::after {
  opacity: 0.85;
  animation: cgpt-idle-pulse 3.5s infinite ease-in-out;
}

/* when loading, make glow faint */
.cgpt-play-toggle[data-state="loading"]::after {
  opacity: 0.5;
  transform: scale(1.02);
  animation: none;
}

/* when playing — stronger visible glow */
.cgpt-play-toggle[data-state="playing"]::after {
  opacity: 1;
  animation: cgpt-playing-pulse 1.2s infinite linear;
}

@keyframes cgpt-playing-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* helper classes set by JS for voice-specific styles */
.cgpt-play-toggle.cgpt-voice-female { --cgpt-glow-color: rgba(255,120,145,0.95); }
.cgpt-play-toggle.cgpt-voice-male   { --cgpt-glow-color: rgba(80,160,255,0.95); }
.cgpt-play-toggle.cgpt-voice-neutral{ --cgpt-glow-color: rgba(29,185,84,0.95); }
.cgpt-play-toggle.cgpt-voice-eleven { --cgpt-glow-color: rgba(255,200,80,0.95); }
.cgpt-play-toggle.cgpt-voice-custom { --cgpt-glow-color: rgba(170,120,255,0.95); }

/* animated amplitude reaction: JS will update --cgpt-glow-blur or transform as needed */


/* Added player title styles */




/* Updated kor4e-player-title styling (centered above player) */




/* Updated forcing title above player */

/* Enforce title above player even inside flex wrapper */
.cgpt-player-wrapper 
/* Also add a fallback rule in case wrapper uses non-flex layout */




/* === Final fix: ensure title is above player and both are centered === */






/* === FINAL-FINAL FIX: Title + Player perfectly centered === */
.cgpt-player-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

/* Force inner player and controls to center */
.cgpt-player,
.cgpt-player-center,
.cgpt-player-controls {
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto !important;
}

/* Title styling */
.kor4e-player-title {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 18px;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  background: linear-gradient(90deg, #00a859 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #00a859;
}
