/* ------------------ 🔁 Animación de fondo dinámico ------------------ */
@keyframes cambiarColor {
  0%   { background: linear-gradient(45deg, #ff6b6b, #1e3a8a);}
  50%  { background: linear-gradient(45deg, #f39c12, #8e44ad);}
  100% { background: linear-gradient(45deg, #16a085, #e74c3c);}
}

/* ------------------ 🌐 Tipografía global ------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', sans-serif;
  background-size: 200% 200%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}


/* Fondo animado detrás */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  animation: cambiarColor 10s infinite alternate;
  background-size: 200% 200%;
}

#form-normal,
#form-premium,
.mensaje-flotante,
#mensaje-exito,
#mensaje-error {
  opacity: 1;
  transition: opacity 0.4s ease;
}


.mensaje-flotante.error {
  background-color: #ffd1d1;
  color: #b30000;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.mensaje-flotante.success {
  background-color: #e0ffe2;
  color: #267b3c;
  padding: 14px 18px;
  border-left: 6px solid #4caf50;
  margin: 20px 0;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1.05em;
}

/* ------------------ 🧩 Estructura principal ------------------ */
.bg_after_body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
  grid-gap: 20px;
  padding: 20px;
  width: 100%;
  max-width: 95%;
  margin: 100px auto 40px;
  background: rgba(43, 43, 61, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.form-tabs {
  display: flex;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    border: 1px solid #3a3a50;
    background-color: #3f3f57;
}

.tab.active {
  background-color: #2d2d3e;
  font-weight: bold;
  box-shadow: none;
  border-radius: 20px 20px 0px 0px;
}


.formulario_request,
.last_requests,
.songs_queue {
  background: rgba(43, 43, 61, 0.85);
  padding: 20px;
  border-radius: 10px;
  color: #F5F5F5;
  width: 100%;
  text-align: center;
}

.songs_queue {
  margin-top: 20px;
  position: relative;
}

.songs_queue::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}


/* Distribución grid */
.formulario_request  { grid-column: 1; grid-row: 1; }
.last_requests       { grid-column: 2; grid-row: 1; overflow-x: auto; }
.songs_queue         { grid-column: 1 / span 2; grid-row: 2; }

/* ------------------ 🧭 Cabecera ------------------ */
header {
  width: 100%;
  height: 60px;
  background: linear-gradient(to right, rgba(30,30,47,0.9), rgba(30,30,47,0.6));
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
}

/* ------------------ 🌍 Select de idioma ------------------ */
.form_select {
  background: rgba(43, 43, 61, 0.85);
  padding: 10px;
  width: auto;
  border-radius: 4px;
  margin: 10px auto;
  color: white;
}

label[for="idioma"] {
  font-weight: bold;
  margin-right: 6px;
}

/* ------------------ ✏️ Inputs y textarea ------------------ */
input[type="text"],
textarea {
  width: 90%;
  max-width: 400px;
  padding: 12px 16px;
  border: 1px solid #3A3A50;
  background: #2B2B3D;
  color: #F5F5F5;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8888A5;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #00C4B4;
  background: #35354B;
  box-shadow: 0 0 10px rgba(0, 196, 180, 0.3);
}

/* ------------------ 🔘 Botones ------------------ */
button {
  background: #FF6B00;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.3s ease, transform 0.2s;
  width: 50%;
  box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
}

button:hover {
  background: #FF8428;
  transform: translateY(-2px);
}

/* ------------------ 🏷️ Labels ------------------ */
label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #F5F5F5;
}

#particles-js {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}


/* ------------------ ⬇️ Select nativo ------------------ */
select {
  appearance: none;
  background-color: #fff;
  color: #333;
  padding: 6px 30px 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg%20fill%3D'%23333'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http://www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M7%2010l5%205%205-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

select:focus {
  border-color: #00C4B4;
  outline: none;
}

/* ------------------ ✅ Mensajes de sistema ------------------ */
#mensaje-error, #mensaje-exito {
  margin: 10px auto;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  width: 90%;
  max-width: 600px;
}

#mensaje-error {
  color: #E53935;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 0, 0, 0.3);
}

#mensaje-exito {
  color: #4CAF50;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* ------------------ 📊 Tablas ------------------ */
h2 {
  text-align: center;
  color: #FFCC00;
  margin-top: 30px;
  font-size: 22px;
}

table {
  width: 100%;
  margin: 20px auto;
  border-collapse: collapse;
  background: #2B2B3D;
  border-radius: 8px;
  overflow: hidden;
  color: wheat;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #444;
  text-align: center;
}

th {
  background-color: #FFCC00;
  color: #1E1E1E;
  font-weight: bold;
}

tr:hover {
  background-color: #3D3D4F;
}

a {
  color: #FFCC00;
  text-decoration: none;
  font-weight: bold;
}

/* ------------------ 🎵 Estado de canciones ------------------ */
.estado-pendiente  { color: #FFC107; font-weight: bold; }
.estado-aprobado   { color: #4CAF50; font-weight: bold; }
.estado-rechazado  { color: #E53935; font-weight: bold; }

/* ------------------ 🎧 Resultados de búsqueda ------------------ */
.resultados-container {
  max-width: 600px;
  margin: auto;
}

.resultado {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border: 1px solid #5D5D7A;
  border-radius: 10px;
  margin-bottom: 5px;
  transition: background 0.3s;
  background: rgba(255, 255, 255, 0.03);
}

.resultado:hover {
  background: rgba(255, 255, 255, 0.07);
}

.resultado img {
  width: 80px;
  height: 60px;
  margin-right: 10px;
  border-radius: 6px;
}

.resultado .info {
  flex-grow: 1;
  color: #F5F5F5;
}

/* ------------------ 📱 Responsive (móviles) ------------------ */
@media screen and (max-width: 768px) {
  .bg_after_body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .formulario_request,
  .last_requests,
  .songs_queue {
    width: 100%;
    padding: 16px;
  }

  .formulario_request { order: 1; }
  .last_requests      { order: 2; }
  .songs_queue        { order: 3; }
}
