.jtrp-player {
  --jtrp-hl: #00ff00;
  --jtrp-bg: #1a1a1b;
  --jtrp-text: #ffffff;
  --jtrp-track: #bdbdbd;
  --jtrp-ring: #f0c400;
  --jtrp-play-bg: #ffffff;
  --jtrp-play-icon: #111111;
  --jtrp-vol: 100%;
  position: relative;
  overflow: hidden;
  width: 320px;
  background: var(--jtrp-bg);
  color: var(--jtrp-text);
  font-family: var(--jtrp-font-family, Montserrat, Arial, sans-serif);
  box-sizing: border-box;
  user-select: none;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 14px;
}

.jtrp-player.jtrp-full-width {
  width: 100%;
  max-width: 100%;
}

.jtrp-player *,
.jtrp-player *::before,
.jtrp-player *::after {
  box-sizing: border-box;
}

.jtrp-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 70%;
  height: 55%;
  transform: translate(-50%, -50%);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.4);
  opacity: 0.35;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.jtrp-header,
.jtrp-center,
.jtrp-meta,
.jtrp-volume-block,
.jtrp-footer {
  position: relative;
  z-index: 1;
}

/* Header: only LIVE badge top-right */
.jtrp-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 22px;
  margin-bottom: 2px;
}

.jtrp-live {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 3px 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jtrp-player.is-live .jtrp-live {
  color: var(--jtrp-hl);
  border-color: var(--jtrp-hl);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.35);
  animation: jtrp-live-pulse 1.4s ease-in-out infinite;
}

@keyframes jtrp-live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.jtrp-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--jtrp-text, #fff);
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  opacity: 0.95;
}

.jtrp-icon-btn:hover {
  opacity: 1;
}

/* Center disc */
.jtrp-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 0 0;
  min-height: 0;
  overflow: hidden;
}

.jtrp-disc {
  position: relative;
  width: min(48%, 150px);
  aspect-ratio: 1;
  flex-shrink: 0;
}

.jtrp-meta {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  padding: 12px 8px 0;
  margin-bottom: 16px;
  z-index: 3;
}

.jtrp-disc-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 24px rgba(255, 200, 60, 0.28),
    inset 0 0 18px rgba(255, 200, 60, 0.12);
  pointer-events: none;
}

.jtrp-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--jtrp-ring, #f0c400);
  background: #000;
  display: block;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.jtrp-player.is-playing .jtrp-cover {
  animation: jtrp-spin 16s linear infinite;
}

@keyframes jtrp-spin {
  to {
    transform: rotate(360deg);
  }
}

.jtrp-station-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--jtrp-text, #fff);
  line-height: 1.3;
  position: relative;
  z-index: 3;
}

.jtrp-track-text {
  margin-top: 4px;
  font-size: 12px;
  color: var(--jtrp-track, #bdbdbd);
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 3;
}

/* Thin custom volume bar (avoids thick theme range styles) */
.jtrp-volume-block {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 4px;
  padding-top: 4px;
  z-index: 2;
  clear: both;
}

.jtrp-volume-wrap {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
}

.jtrp-volume-rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  overflow: visible;
}

.jtrp-volume-fill {
  height: 100%;
  width: var(--jtrp-vol);
  border-radius: 999px;
  background: var(--jtrp-hl);
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.45);
}

.jtrp-volume-knob {
  position: absolute;
  top: 50%;
  left: var(--jtrp-vol);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--jtrp-hl);
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.55);
}

.jtrp-player .jtrp-volume,
.jtrp-player input.jtrp-volume[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  cursor: pointer;
  box-shadow: none !important;
}

.jtrp-player .jtrp-volume::-webkit-slider-runnable-track {
  height: 2px !important;
  background: transparent !important;
  border: none !important;
}

.jtrp-player .jtrp-volume::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 10px !important;
  height: 10px !important;
  margin-top: -4px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jtrp-player .jtrp-volume::-moz-range-track {
  height: 2px !important;
  background: transparent !important;
  border: none !important;
}

.jtrp-player .jtrp-volume::-moz-range-progress {
  height: 2px !important;
  background: transparent !important;
  border: none !important;
}

.jtrp-player .jtrp-volume::-moz-range-thumb {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jtrp-volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.jtrp-volume-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--jtrp-text, #fff);
}

.jtrp-volume-label {
  font-size: 12px;
  font-weight: 500;
  min-width: 36px;
  text-align: right;
  color: var(--jtrp-text, #fff);
}

.jtrp-ico-speaker {
  color: var(--jtrp-text, #fff);
  fill: currentColor;
}

.jtrp-mute .jtrp-ico-unmute {
  display: none;
}

.jtrp-player.is-muted .jtrp-mute .jtrp-ico-mute {
  display: none;
}

.jtrp-player.is-muted .jtrp-mute .jtrp-ico-unmute {
  display: block;
}

/* Footer: only centered play */
.jtrp-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  min-height: 58px;
}

.jtrp-play {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--jtrp-play-bg, #ffffff);
  color: var(--jtrp-play-icon, #111);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.jtrp-play:hover {
  filter: brightness(0.96);
  transform: scale(1.03);
}

.jtrp-play:active {
  transform: scale(0.97);
}

.jtrp-play .jtrp-icon-pause {
  display: none;
}

.jtrp-player.is-playing .jtrp-play .jtrp-icon-play {
  display: none;
}

.jtrp-player.is-playing .jtrp-play .jtrp-icon-pause {
  display: block;
}

.jtrp-player.is-loading .jtrp-cover {
  opacity: 0.75;
}

/* Autoplay blocked by browser: pulse play so user taps once */
.jtrp-player.is-autoplay-blocked .jtrp-play {
  animation: jtrp-play-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
}

@keyframes jtrp-play-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}
