/* Estilização Compacta do Formulário - Versão Final */
.search-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #f8f9fa;
  padding: 8px 10px 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  box-sizing: border-box;
}

.search-row {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  width: 100%;
}

.search-row label {
  margin-right: 5px;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
  min-width: 50px;
}

.search-row input,
.search-row select {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  height: 32px;
  box-sizing: border-box;
}

.search-row input {
  flex: 1;
  min-width: 120px;
}

.search-row select {
  min-width: 90px;
}

/* Estilo para resultados de músicas */
.song-result {
  padding: 12px;
  margin: 8px 2%;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 96%;
  box-sizing: border-box;
}

.song-result:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.song-result strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #333;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.song-code {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.song-code span {
  padding: 2px 6px;
  background: #f8f9fa;
  border-radius: 4px;
}

.song-title {
  display: block;
  font-size: 14px;
  color: #444;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Layout Mobile Otimizado */
@media (max-width: 600px) {
  .search-container {
    padding: 6px 8px 4px;
  }

  .search-row {
    flex-wrap: nowrap;
    margin-bottom: 4px;
  }

  .search-row:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .search-row:first-child > div {
    display: flex;
    width: 100%;
    align-items: center;
  }

  .search-row:first-child label {
    text-align: left;
    min-width: 55px;
    margin-right: 8px;
  }

  .search-row:first-child input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
  }

  .search-row:nth-child(2) {
    justify-content: flex-start;
    gap: 8px;
  }

  .search-row select {
    min-width: 0;
    flex: 1;
    max-width: 120px;
  }

  .song-result {
    padding: 10px;
    margin: 6px 2%;
  }

  .song-code {
    gap: 6px;
    font-size: 12px;
  }

  .sort-options {
    gap: 6px;
    margin: 8px 2%;
  }

  .sort-options button {
    padding: 6px;
    font-size: 14px;
    min-width: 36px;
  }
}

/* Botão de Login/Registro Compacto */
#authSection {
  margin: 5px 0;
  font-size: 13px;
}

/* Barra de Progresso Compacta */
#progressInfo {
  font-size: 12px;
  margin: 3px 0;
}

/* Versão do App Compacta */
#versionInfo {
  font-size: 11px;
  margin: 2px 0;
}

/* Estilo para ordenação */
.sort-options {
  display: flex;
  gap: 8px;
  margin: 10px 2%;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.sort-options button {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  min-width: 40px;
  text-align: center;
}

.sort-options button:hover {
  background: #e9ecef;
}

.sort-options button.active {
  background: #007bff;
  color: white;
  border-color: #0056b3;
}

/* Estilo para comentários */
.comments {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  border-left: 3px solid #007bff;
}

/* Estilo para ações da música */
.song-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.song-actions button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.song-actions button:hover {
  opacity: 0.9;
}

#installButton {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

#installButton:hover {
  background-color: #45a049;
}

#installMessage {
  font-size: 14px;
  margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 50px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content {
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    color: #666;
}

.btn-close:hover {
    color: #333;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

.modal-footer button {
    margin-left: 10px;
}

.song-result {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.song-result .song-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.song-result .song-actions button {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.song-result .comments {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.sort-options {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.sort-options button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.sort-options button.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

#listOptions {
    padding: 20px;
}

#listOptions button {
    width: 100%;
    margin-bottom: 10px;
}

.temporary-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}