/* Estilos base */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Poppins', arial, sans-serif;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes glowEffect {
  0% { box-shadow: 0 0 10px #ff5722; }
  50% { box-shadow: 0 0 20px #ff5722; }
  100% { box-shadow: 0 0 10px #ff5722; }
}

@keyframes textShadowGlow {
  0% { text-shadow: 0 0 10px #ff5722; }
  50% { text-shadow: 0 0 20px #ff5722; }
  100% { text-shadow: 0 0 10px #ff5722; }
}

@keyframes gradientBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Loading effect */
.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Estilos de texto */
tr {
  font: small-caps 110%/200% 'Poppins', serif;
  transition: all 0.3s ease;
}

tr:hover {
  background: linear-gradient(45deg, #f3f3f3, #ffffff);
  transform: scale(1.01);
}

/* Encabezado principal con efecto glow */
h3 {
  background: linear-gradient(45deg, #2193b0, #6dd5ed);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  font: small-caps 120%/200% 'Poppins', arial;
  padding: 15px;
  border-radius: 8px;
  animation: gradientBg 3s ease infinite, textShadowGlow 2s infinite;
  background-size: 200% 200%;
  cursor: pointer;
}

h3:active {
  transform: scale(0.98);
}

/* Enlaces y textos */
p, a {
  font: small-caps 110%/200% 'Poppins', serif;
  transition: all 0.3s ease;
}

a:hover {
  color: #2193b0;
  transform: translateX(5px);
  animation: textShadowGlow 2s infinite;
}

/* Feedback visual para enlaces visitados */
a:visited {
  color: #6dd5ed;
}

/* Barra de navegación */
header {
  width: 100%;
  height: 70px;
  background: linear-gradient(to right, #ffffff, #f8f9fa);
  padding: 15px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.5s ease-out;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* Contenedor del buscador con tooltip */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-container::before {
  content: '🔍 Buscar partituras';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.search-container:hover::before {
  opacity: 1;
}

/* Campo de búsqueda con efecto glow */
#input-search {
  font: small-caps 110%/200% 'Poppins', arial;
  width: 350px;
  height: 45px;
  font-size: 18px;
  text-indent: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  transition: all 0.3s ease;
  background: white;
  animation: glowEffect 2s infinite;
  padding-right: 40px;
}

#input-search:focus {
  border-color: #ff5722;
  box-shadow: 0 0 20px rgba(255, 87, 34, 0.4);
  transform: scale(1.02);
  outline: none;
}

#input-search::placeholder {
  color: #999;
  opacity: 0.7;
}

/* Botón de limpiar búsqueda */
.clear-search {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  transition: all 0.3s ease;
  opacity: 0;
}

#input-search:valid ~ .clear-search {
  opacity: 1;
}

.clear-search:hover {
  color: #ff5722;
  transform: scale(1.1);
}

/* Contenedor de búsqueda */
.content-search {
  width: 107%;
  height: 100vh;
  position: fixed;
  top: 145px;
  left: 0;
  background: rgba(224, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  display: none;
  animation: fadeIn 0.3s ease;
  z-index: 999;
}

/* Progress bar para carga */
.progress-bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #ff5722, #2193b0);
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.loading .progress-bar {
  transform: scaleX(1);
}

/* Tabla de contenido */
.content-table {
  width: 80%;
  background: white;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: slideIn 0.5s ease-out, glowEffect 3s infinite;
  position: relative;
}

.content-table.empty {
  padding: 20px;
  text-align: center;
  color: #666;
}

.content-table.empty::after {
  content: '¡No se encontraron resultados!';
  display: block;
  margin-top: 10px;
  font-style: italic;
}

.content-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

tbody tr {
  transition: all 0.3s ease;
  cursor: pointer;
}

tbody tr:hover {
  background: linear-gradient(45deg, #f3f3f3, #ffffff);
  transform: translateX(10px);
  animation: glowEffect 2s infinite;
}

tbody tr td a {
  display: block;
  padding: 15px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

tbody tr td a:hover {
  color: #ff5722;
  background: rgba(255, 87, 34, 0.1);
  animation: textShadowGlow 2s infinite;
}

/* Scroll personalizado */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Ocultar elementos de la tabla */
#table_length, #table_filter, #table_info, #table_paginate {
  display: none;
}

/* Responsive design */
@media (max-width: 768px) {
  #input-search {
      width: 280px;
  }
  
  .content-table {
      width: 95%;
  }
  
  tbody tr td a {
      padding: 10px;
  }
}