/* ============== Todo dentro de #play-panel ============== */
#play-panel {
  max-width: 900px;
  margin: 0 auto;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  box-sizing: border-box;
}

/* --- Categorías --- */
#play-panel #play-categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

#play-panel .cat-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #111827;
  transition: all .15s ease;
  outline: none;
}

#play-panel .cat-btn:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

#play-panel .cat-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
  font-weight: 600;
}

/* --- Input --- */
#play-panel .play-input-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;

  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;

  border: 1px solid #d1d5db;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
}

#play-panel input#my-search {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  border: none;
  outline: none;
  min-width: 0;
}

#play-panel button#my-search-btn {
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: background .18s;
  flex-shrink: 0;
}

#play-panel button#my-search-btn:hover {
  background: #000;
}

/* --- Contenido --- */
#play-panel #play-content {
  margin-top: 10px;
}

/* --- Resultados (search-1) --- */
#play-panel #my-results > div {
  margin: 4px auto;
  max-width: 800px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

#play-panel #my-results > div:last-child {
  border-bottom: none;
}

#play-panel #my-results a {
  text-decoration: none;
  font-size: 19px;
}

#play-panel #my-results a:hover {
  text-decoration: underline;
}

#play-panel #my-results small {
  color: #4b5563;
}

/* --- Paginación --- */
#play-panel #pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 16px auto 0;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
}

#play-panel #pagination::-webkit-scrollbar {
  display: none;
}

#play-panel #pagination button {
  min-width: 34px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s ease;
  color: #374151;
}

#play-panel #pagination button:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

#play-panel #pagination button:disabled {
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: 600;
  cursor: default;
}

#play-panel #pagination span {
  color: #9ca3af;
  padding: 0 4px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

/* --- Loading (AISLADO) --- */
#play-panel .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: #444;
  font-size: 14px;
  font-family: sans-serif;
}

#play-panel .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ddd;
  border-top: 3px solid #444;
  border-radius: 50%;
  animation: play-spin 1s linear infinite;
  margin-bottom: 10px;
}

/* 👇 Keyframes con nombre único */
@keyframes play-spin {
  100% { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  #play-panel .play-input-row {
    max-width: 100%;
    border-radius: 20px;
  }

  #play-panel input#my-search {
    font-size: 15px;
    padding: 10px 12px;
  }

  #play-panel button#my-search-btn {
    padding: 10px 16px;
    font-size: 15px;
  }

  #play-panel #my-results a {
    font-size: 19px;
  }
}

/* play-body-content */
#play-body-content {
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid ;
}

#play-body-content:empty {
  border: none;
  padding: 0;
}

/*
  voz4
*/
/* ===== CONTENEDOR ===== */
/* =========================
   CONTENEDOR
========================= */
.tts-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;

  padding: 8px 12px;
  border-radius: 10px;

  color: inherit;

  background: color-mix(in srgb, currentColor 4%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;

  backdrop-filter: blur(4px);

  /* 👇 CENTRADO */
  margin-inline: auto;
}

/* =========================
   BOTÓN PLAY / STOP
========================= */
.tts-play {
  all: unset;
  cursor: pointer;
  flex-shrink: 0; /* 🔑 nunca se aplasta */

  width: 34px;
  height: 34px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000;
  color: #000;

  transition: opacity 0.15s ease, transform 0.1s ease;
}

.tts-play:hover {
  opacity: 0.85;
}

.tts-play:active {
  transform: scale(0.95);
}

/* =========================
   ICONOS SVG
========================= */
.tts-icon {
  width: 14px;
  height: 14px;
  fill: #fff;
}

/* =========================
   SELECT VOZ
========================= */
.tts-bar select {
  background: transparent;
  color: inherit;

  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 6px;

  padding: 4px 6px;
  font-size: 12px;

  cursor: pointer;
  max-width: 160px; /* 🔑 evita overflow */
}

.tts-bar select:hover {
  border-color: currentColor;
}

/* =========================
   LABELS
========================= */
.tts-bar label {
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
}

/* =========================
   SLIDERS
========================= */
.tts-bar input[type="range"] {
  appearance: none;
  width: 80px;
  height: 2px;

  background: color-mix(in srgb, currentColor 30%, transparent);
  border-radius: 2px;
  cursor: pointer;
}

/* Thumb Webkit */
.tts-bar input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  margin-top: -4px;
}

/* Thumb Firefox */
.tts-bar input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: currentColor;
}

/* =========================
   UTIL
========================= */
.hidden {
  display: none;
}

/* =========================
   RESPONSIVE – TABLET
========================= */
@media (max-width: 640px) {
  .tts-bar {
    gap: 8px;
    font-size: 12px;
  }

  .tts-bar select {
    max-width: 120px;
    font-size: 11px;
  }

  .tts-bar input[type="range"] {
    width: 64px;
  }
}

/* =========================
   RESPONSIVE – MOBILE
========================= */
@media (max-width: 420px) {
  .tts-bar {
    gap: 6px;
    padding: 6px 8px;
  }

  /* Oculta texto de labels (solo sliders) */
  .tts-bar label {
    font-size: 0;
  }

  .tts-bar label input {
    font-size: 0;
  }

  /* Sliders más compactos */
  .tts-bar input[type="range"] {
    width: 56px;
  }

  /* Select más compacto */
  .tts-bar select {
    max-width: 100%;
    flex: 1;
  }
}
