﻿
/* --- Catálogo de Álbuns --- */

.catalog-header {
  margin-bottom: 20px;
}

.catalog-header h2 {
  margin: 0 0 15px 0;
  font-size: 1.5rem;
  color: #2c3e50;
  border-left: 4px solid #d32f2f;
  padding-left: 10px;
}

/* Filtros */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}



.filter-btn {
  padding: 6px 14px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.filter-btn.active {
  background: #d32f2f;
  color: white;
  border-color: #d32f2f;
}

/* Grid de Álbuns */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.album-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.album-cover {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Aspect Ratio 1:1 (Quadrado) */
  background: #f9f9f9;
  overflow: hidden;
}

.album-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-year {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 4px;
}

.album-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.album-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-artist {
  font-size: 0.85rem;
  color: #777;
  margin: 0 0 4px 0;
}

.album-tracks {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
}

/* Loading e Mensagens */
.catalog-grid .loading-spinner, 
.catalog-grid .empty-msg, 
.catalog-grid .error-msg {
  text-align: center;
  padding: 40px;
  color: #666;
  grid-column: 1 / -1;
}

.error-msg { color: #d32f2f; }

/* Responsividade */
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Filtros em linha */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  min-width: 120px;
}

/* Paginação */
.catalog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 5px;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #d32f2f;
  color: white;
  border-color: #d32f2f;
}

.page-btn.active {
  background: #d32f2f;
  color: white;
  border-color: #d32f2f;
  font-weight: bold;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-dots {
  padding: 6px 8px;
  color: #999;
}

/* --- Estilos para Detalhes do Álbum --- */
.catalog-details {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: fadeIn 0.4s ease;
}

.album-detail-header {
    margin-bottom: 30px;
}

.back-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    margin-bottom: 20px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

.detail-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.detail-cover {
    flex: 0 0 250px;
    max-width: 250px;
}

.detail-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.detail-info {
    flex: 1;
    min-width: 300px;
}

.detail-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.detail-artist, .detail-year, .detail-label, .detail-genre, .detail-country, .detail-language {
    font-size: 1rem;
    color: #555;
    margin: 5px 0;
}

.detail-sinopse {
    margin-top: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #d32f2f;
    border-radius: 4px;
}

.detail-sinopse h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #333;
}

.detail-sinopse p {
    margin: 0;
    line-height: 1.6;
    color: #666;
}

/* Lista de Faixas */
.detail-tracks, .detail-credits, .detail-platforms {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.detail-tracks h3, .detail-credits h3, .detail-platforms h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
}

.track-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.track-item:last-child {
    border-bottom: none;
}

.track-number {
    font-weight: bold;
    color: #d32f2f;
    min-width: 25px;
}

.track-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.track-duration {
    font-size: 0.85rem;
    color: #888;
    min-width: 50px;
    text-align: right;
}

.track-youtube {
    color: #d32f2f;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.track-youtube:hover {
    transform: scale(1.2);
}

/* Créditos */
.credits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.credits-list li {
    font-size: 0.9rem;
    color: #555;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
}

/* Plataformas */
.platforms-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.platform-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #555;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.platform-link:hover {
    background: #e0e0e0;
    color: #333;
}

.platform-link img {
    height: 20px;
    width: auto;
}

/* Animação de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsividade */
@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
        align-items: center;
    }
    
    .detail-cover {
        flex: 0 0 auto;
        max-width: 100%;
    }
    
    .detail-info {
        text-align: center;
    }
    
    .detail-sinopse {
        text-align: left;
    }
    
    .track-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .track-duration {
        text-align: left;
    }
}