/* VARIÁVEIS DE ESTILO - SPOTIFY PREMIUM */
:root {
  --spotify-green: #1DB954;
  --spotify-green-hover: #1ED760;
  --spotify-black: #121212;
  --spotify-dark-gray: #181818;
  --spotify-light-gray: #282828;
  --spotify-highlight: #333333;
  --text-main: #FFFFFF;
  --text-muted: #B3B3B3;
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* RESET E CONFIGURAÇÕES GERAIS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--spotify-black);
  color: var(--text-main);
  font-family: var(--font-body);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* DEGRADÊ ROMÂNTICO NO TOPO */
.topo {
  width: 100%;
  height: 340px;
  background: linear-gradient(to bottom, #500a29 0%, rgba(18, 18, 18, 0) 100%);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* CONTAINER PRINCIPAL */
.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

/* HEADER ESTILO PLAYLIST SPOTIFY */
.playlist-header {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 28px;
  padding: 24px 0 32px 0;
}

.cover-wrapper {
  flex-shrink: 0;
  width: 232px;
  height: 232px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.cover-wrapper:hover {
  transform: scale(1.02);
}

.foto_inicial {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.playlist-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: inline-block;
}

.playlist-title {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 4px 0 12px 0;
  color: var(--text-main);
}

.playlist-description {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 650px;
}

.playlist-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  color: var(--text-main);
}

.meta-separator {
  color: var(--text-muted);
}

.songs-count {
  color: var(--text-muted);
  font-weight: 400;
}

/* BARRA DE AÇÕES (PLAY, FAVORITO, RELÓGIO) */
.spotify-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 16px 0 40px 0;
}

/* Botão Play Spotify */
.action-btn-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background-color: var(--spotify-green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.action-btn-play:hover {
  transform: scale(1.06);
  background-color: var(--spotify-green-hover);
}

.action-btn-play:active {
  transform: scale(0.96);
}

.pause-bar {
  transition: opacity 0.2s ease;
}

.hidden {
  display: none !important;
}

/* Elementos de ação adicionais */
.action-container {
  position: relative;
  display: inline-block;
}

.action-btn-heart, .action-btn-time {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.2s ease, filter 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn-heart:hover, .action-btn-time:hover {
  transform: scale(1.08);
}

.heart-img {
  width: 44px;
  height: 38px;
  object-fit: contain;
  transition: filter 0.2s ease;
}

.heart-active {
  filter: drop-shadow(0 0 6px rgba(29, 185, 84, 0.6));
}

.time-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* TOOLTIP MENSSAGEM FAVORITO (ESTILO TOAST SPOTIFY) */
.mensagem {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--spotify-green);
  color: #000000;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  z-index: 10;
}

.mensagem::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--spotify-green) transparent transparent transparent;
}

.mensagem.mostrar {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* SEÇÃO DETALHES COMUNS */
.section-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* CONTADOR: NOSSA HISTÓRIA */
.contador-section {
  margin-bottom: 48px;
}

.contador-card {
  display: flex;
  flex-direction: row;
  gap: 32px;
  background: linear-gradient(180deg, var(--spotify-dark-gray) 0%, rgba(18, 18, 18, 0.8) 100%);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  align-items: center;
}

.contador-card:hover {
  border-color: rgba(29, 185, 84, 0.2);
  box-shadow: 0 8px 30px rgba(29, 185, 84, 0.08);
}

.contador-foto-container {
  flex-shrink: 0;
  width: 240px;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.contador-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 20%;
}

.contador-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.contador-box h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--spotify-green);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.contador-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.time-card {
  background-color: var(--spotify-light-gray);
  border-radius: 8px;
  padding: 12px 6px;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.time-card:hover {
  background-color: var(--spotify-highlight);
  transform: translateY(-2px);
}

.time-card span {
  display: block;
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  color: var(--spotify-green);
  line-height: 1.2;
}

.time-card small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.frase-contador {
  margin-top: 20px;
  font-family: 'Meow Script', cursive;
  font-size: 30px;
  color: var(--spotify-green);
  text-align: center;
}

/* CARROSSEL DE MEMÓRIAS */
.carrossel-section {
  margin-bottom: 24px;
}

.carrossel-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.carrossel {
  flex: 1;
  max-width: 380px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  aspect-ratio: 9 / 13;
}

.track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.ajuste-esquerda {
  object-position: 10% center;
}

/* Botões do Carrossel */
.seta-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(24, 24, 24, 0.85);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.seta-btn:hover {
  background-color: var(--spotify-light-gray);
  transform: scale(1.08);
}

.seta-btn:active {
  transform: scale(0.95);
}

/* Botão Play Fixo sobre o Carrossel */
.play-fixo {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--spotify-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 6;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.play-fixo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-left: 2px;
}

.play-fixo:hover {
  transform: scale(1.08);
  background-color: var(--spotify-green-hover);
}

/* Indicadores de bolinha */
.indicadores {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  max-width: 100%;
  flex-wrap: wrap;
  padding: 0 20px;
}

.bolinha {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.bolinha.ativa {
  background-color: var(--text-main);
  width: 16px;
  border-radius: 3px;
}

/* PLAYER MODAL (NOW PLAYING SCREEN) */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.player-modal.mostrar {
  display: flex;
  opacity: 1;
}

.player-card {
  width: 380px;
  max-width: 100%;
  background: linear-gradient(180deg, #242424 0%, #121212 100%);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.fechar-player {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fechar-player:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.player-cover-container {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  background-color: #1a1a1a;
}

.player-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  margin-bottom: 20px;
  text-align: left;
}

.player-track-name {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.player-track-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Barra de Progresso Interativa */
.player-progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 24px;
  user-select: none;
}

.progress-bar-track {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.1s ease;
}

.progress-bar-track:hover {
  height: 6px;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--spotify-green);
  border-radius: 2px;
  width: 0%;
  position: relative;
}

.progress-bar-track:hover .progress-bar-fill {
  background-color: var(--spotify-green-hover);
}

/* Controles de Reprodução */
.player-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.control-btn:hover {
  color: var(--text-main);
}

.prev-btn svg, .next-btn svg {
  width: 28px;
  height: 28px;
}

.play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--text-main);
  color: var(--spotify-black);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-btn-circle:hover {
  transform: scale(1.06);
  background-color: #FFFFFF;
}

.play-btn-circle:active {
  transform: scale(0.96);
}

.play-btn-circle svg {
  width: 22px;
  height: 22px;
}

/* Controle de Volume */
.player-volume-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 0 20px;
}

.volume-icon {
  flex-shrink: 0;
}

.volume-bar-track {
  width: 120px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.1s ease;
}

.volume-bar-track:hover {
  height: 6px;
}

.volume-bar-fill {
  height: 100%;
  background-color: var(--text-main);
  border-radius: 2px;
  width: 80%; /* Volume padrão 80% */
}

.volume-bar-track:hover .volume-bar-fill {
  background-color: var(--spotify-green);
}

/* RESPONSIVIDADE (MOBILE & TABLET) */
@media (max-width: 768px) {
  .playlist-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 24px;
  }

  .cover-wrapper {
    width: 190px;
    height: 190px;
  }

  .playlist-title {
    font-size: 34px;
    margin: 8px 0;
  }

  .playlist-description {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .playlist-meta {
    justify-content: center;
  }

  .spotify-actions {
    justify-content: center;
    margin-bottom: 32px;
  }

  .contador-card {
    flex-direction: column;
    padding: 24px;
    text-align: center;
  }

  .contador-foto-container {
    width: 240px;
    height: 240px;
    margin: 0 auto;
  }

  .contador-box h3 {
    margin-top: 12px;
    margin-bottom: 16px;
  }

  .contador-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .time-card span {
    font-size: 22px;
  }

  .time-card small {
    font-size: 9px;
  }

  .frase-contador {
    font-size: 26px;
  }

  .carrossel {
    max-width: 290px;
    aspect-ratio: 9 / 13;
  }

  .seta-btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .contador-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* SEÇÃO: ESCUTE QUANDO... */
.escute-quando-section {
  margin-top: 48px;
  margin-bottom: 24px;
}

.escute-quando-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.escute-card {
  background: linear-gradient(180deg, var(--spotify-dark-gray) 0%, rgba(18, 18, 18, 0.8) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.escute-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 185, 84, 0.3);
}

.escute-foto-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #1a1a1a;
}

.escute-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s ease;
}

.escute-card:hover .escute-foto {
  transform: scale(1.04);
}

.escute-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  flex-grow: 1;
}

.escute-card-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.escute-btn {
  background-color: var(--spotify-green);
  color: #000000;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 20px; /* botão pílula */
  transition: transform 0.2s ease, background-color 0.2s ease;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.escute-btn:hover {
  transform: scale(1.05);
  background-color: var(--spotify-green-hover);
}

.escute-btn:active {
  transform: scale(0.96);
}

/* Responsividade da seção */
@media (max-width: 600px) {
  .escute-quando-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ALINHAMENTOS INDIVIDUAIS DAS FOTOS DA SEÇÃO ESCUTE QUANDO... */
.escute-foto-apresentacao {
  object-position: center 35%; /* abaixou um pouco */
}
.escute-foto-dormir {
  object-position: center 50%; /* centralizou mais */
}
.escute-foto-medo {
  object-position: center 50%; /* centralizou mais */
}
.escute-foto-saudades {
  object-position: center 50%; /* centralizou mais */
}
.escute-foto-feliz {
  object-position: center 0%;  /* não corta a testa dela */
}
.escute-foto-triste {
  object-position: center 12%; /* levemente para cima */
}
