/* ==========================================================================
   BAR LUA - PÁGINA EXCLUSIVA PARA PEDIR CANCIONES EN VIVO
   Optimizado para smartphones y tablets de clientes en mesa.
   ========================================================================== */

:root {
  --bg-main: #06020c;
  --bg-card: rgba(20, 8, 35, 0.75);
  --bg-card-hover: rgba(30, 12, 50, 0.85);
  --gold-primary: #e6ca65;
  --gold-light: #fef1b8;
  --gold-gradient: linear-gradient(135deg, #fff7d6 0%, #e6ca65 40%, #b89128 100%);
  --neon-pink: #ff007f;
  --neon-purple: #9d4edd;
  --text-main: #f9f5ff;
  --text-muted: #bda8d6;
  --border-gold: rgba(230, 202, 101, 0.3);
  --border-pink: rgba(255, 0, 127, 0.35);
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 4rem;
}

/* Partículas flotantes */
#luxury-particles-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Luces ambientales de fondo */
.bg-ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(255, 0, 127, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 65%, rgba(157, 78, 221, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 50% 90%, rgba(230, 202, 101, 0.08) 0%, transparent 55%);
}

.pedir-wrapper {
  position: relative;
  z-index: 10;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

/* Header Superior */
.pedir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-crest-mini {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 8px rgba(230, 202, 101, 0.4));
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold-primary);
}

/* Tarjeta Sonando Ahora en Vivo */
.now-playing-banner {
  background: linear-gradient(135deg, rgba(28, 9, 44, 0.9) 0%, rgba(15, 6, 26, 0.95) 100%);
  border: 1px solid var(--border-pink);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 0, 127, 0.05);
  backdrop-filter: blur(12px);
}

.now-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.now-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ff66b2;
  letter-spacing: 1px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.tv-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.tv-equalizer span {
  width: 3px;
  background: var(--gold-primary);
  border-radius: 2px;
  animation: eqBounce 1.2s infinite ease-in-out alternate;
}

.tv-equalizer span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.tv-equalizer span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.tv-equalizer span:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.tv-equalizer span:nth-child(4) { height: 80%; animation-delay: 0.4s; }

@keyframes eqBounce {
  0% { height: 25%; }
  100% { height: 100%; }
}

.now-track-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.now-track-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.now-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--gold-light);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.5rem;
}

/* Tarjeta Formulario de Solicitud */
.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 22px;
  padding: 1.5rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
}

.card-title-group {
  margin-bottom: 1.25rem;
  text-align: center;
}

.card-main-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

.card-main-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Fila de Datos del Cliente: PIN y Mesa */
.client-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 540px) {
  .client-info-grid {
    grid-template-columns: 1fr;
  }
}

.input-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dedication-box {
  margin: -0.55rem 0 1.35rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 0, 127, 0.22);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 0, 127, 0.05), rgba(157, 78, 221, 0.08));
}

.input-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-field {
  width: 100%;
  background: rgba(10, 4, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.input-field:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(230, 202, 101, 0.25);
  background: rgba(15, 6, 26, 0.95);
}

.pin-field {
  text-align: center;
  font-weight: 800;
  letter-spacing: 5px;
  font-size: 1.25rem;
}

.pin-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pin-valid {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  border: 1px solid #4ade80;
}

.pin-invalid {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Buscador Principal de YouTube */
.search-bar-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-input-main {
  width: 100%;
  background: rgba(10, 4, 18, 0.9);
  border: 2px solid var(--border-pink);
  border-radius: 14px;
  padding: 0.95rem 3.5rem 0.95rem 2.8rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.search-input-main:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(230, 202, 101, 0.3);
}

.search-icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.7;
  pointer-events: none;
}

.btn-search-trigger {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold-gradient);
  border: none;
  border-radius: 10px;
  color: #07020d;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-search-trigger:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 0 12px rgba(230, 202, 101, 0.5);
}

/* Chips de Géneros / Sugerencias Rápidas */
.genre-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.genre-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 9999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.genre-chip:hover {
  background: rgba(255, 0, 127, 0.18);
  border-color: var(--neon-pink);
  color: #fff;
}

/* Contenedor de Resultados de Búsqueda */
.search-results-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  transition: all 0.25s ease;
}

.result-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-pink);
  transform: translateY(-2px);
}

.result-thumb-wrap {
  position: relative;
  width: 90px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-duration {
  position: absolute;
  bottom: 3px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.result-info {
  flex-grow: 1;
  min-width: 0;
}

.result-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.result-channel {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-request-song {
  background: linear-gradient(135deg, #ff007f 0%, #b8005b 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 14px rgba(255, 0, 127, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-request-song:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(255, 0, 127, 0.6);
}

/* Spinner de Carga */
.search-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: var(--gold-primary);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(230, 202, 101, 0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fila de Próximas Canciones */
.queue-section {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.queue-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-light);
}

.queue-count-badge {
  background: rgba(255, 0, 127, 0.2);
  border: 1px solid var(--neon-pink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.queue-item:last-child {
  border-bottom: none;
}

/* Toast de Notificación */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #1f0b35 0%, #0d041a 100%);
  border: 2px solid var(--gold-primary);
  color: #fff;
  padding: 0.95rem 1.6rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(230, 202, 101, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  max-width: 90vw;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Ajustes táctiles para móviles pequeños: el flujo de pedir una canción se
   mantiene en una sola columna y sin botones fuera de la pantalla. */
@media (max-width: 540px) {
  body { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  .pedir-wrapper { padding: .8rem .75rem 1.5rem; }
  .pedir-header { margin-bottom: 1rem; padding-bottom: .85rem; gap: .65rem; }
  .brand-logo-img { max-width: 142px !important; height: auto !important; }
  .btn-back-home { min-height: 40px; padding: .4rem .65rem; font-size: .68rem; white-space: nowrap; }
  .now-playing-banner, .request-card, .queue-section { border-radius: 15px; padding: 1rem; }
  .now-live-pill { font-size: .62rem; letter-spacing: .65px; }
  .now-track-title { font-size: 1rem; }
  .card-main-title { font-size: clamp(1.55rem, 9vw, 2rem); }
  .card-main-desc { font-size: .78rem; line-height: 1.55; }
  .client-info-grid { gap: .75rem; margin-bottom: 1rem; }
  .input-field { min-height: 46px; font-size: 16px; padding: .7rem .8rem; }
  .search-bar-wrap { gap: .35rem; }
  .search-input-main { min-width: 0; padding-right: .55rem; font-size: 16px; }
  .btn-search-trigger { min-height: 44px; padding: .5rem .65rem; font-size: .68rem; }
  .genre-chips-wrap { gap: .45rem; }
  .genre-chip { min-height: 36px; font-size: .67rem; padding: .42rem .6rem; }
  .result-card { align-items: flex-start; gap: .65rem; padding: .65rem; }
  .result-thumb-wrap { width: 74px; height: 48px; }
  .result-title { font-size: .78rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .result-channel { font-size: .66rem; }
  .btn-request-song { min-height: 42px; padding: .45rem .55rem; font-size: .63rem; }
  .queue-item { gap: .55rem; font-size: .78rem; }
  .toast-notice { bottom: max(1rem, env(safe-area-inset-bottom)); padding: .75rem 1rem; font-size: .78rem; }
}

@media (max-width: 360px) {
  .brand-logo-img { max-width: 118px !important; }
  .btn-back-home span:first-child { display: none; }
  .btn-back-home { font-size: .62rem; }
  .result-thumb-wrap { display: none; }
}
