:root {
  --roxo: #a471f0;
  --roxo-escuro: #3c2d54;
  --fundo: #fdfdfd;
  --fundo-escuro: #3c2d54;
  --texto: #222;
  --texto-claro: #ffffff;
  --highlight: #a471f0;
  --lilas-escuro: #9370db;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Georgia', serif;
  background: var(--fundo);
  color: var(--texto);
  overflow-x: hidden;
  width: 100%;
}


.transp {
    background: #FFF;
}

#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #d6d6d6;
  z-index: 2000;
}

#progress-bar {
  height: 100%;
  background-color: var(--roxo);
  width: 0%;
  transition: width 0.2s;
}

.toggle-btn {
  position: fixed;
  left: 10px;
  top: 10px;
  background: var(--roxo);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  line-height: 40px; /* Centraliza verticalmente */
  text-align: center; /* Centraliza horizontalmente */
  padding: 0;
  z-index: 1003;
  cursor: pointer;
}


.container {
  display: flex;
  flex-direction: row;
  transition: all 0.3s ease;
  width: 100%;
  overflow-x: hidden;
}

.header-bar {
  width: 100%;
  height: 40px;
  background-color: var(--roxo);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  margin: 0;
}

.info {
  color: var(--highlight);
}

#email {
  text-decoration: none;
  color: #222222;
  font-weight: 200;
}

.sidebar {
  width: 280px;
  background: #e6d6fa;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0 20px 20px 0;
  position: fixed;
  top: 40px;
  bottom: 0;
  left: 0;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.open {
  transform: translateX(0);
}

.album-cover {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: -30px;
  z-index: 2;
  position: relative;
}

.cylinder-label {
  background: var(--roxo);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
  position: relative;
  top: -35px;
  z-index: 1;
  width: 160px;
}

.cylinder-label .artista {
  font-size: 0.75rem;
}

.cylinder-label .album {
  font-size: 0.6rem;
  opacity: 0.9;
}

.musica {
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  color: var(--roxo-escuro);
}

.autora {
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 10px;
  text-align: center;
  color: var(--roxo-escuro);
}

body.dark-mode .musica,
body.dark-mode .autora {
  color: var(--lilas-escuro);
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.menu button {
  background: white;
  color: var(--roxo);
  border: none;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 10px;
  transition: 0.3s;
}

.menu button:hover {
  background: #e2d4fb;
}

.botoes-util {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.botoes-util button {
  padding: 6px 10px;
  font-size: 14px;
  border: none;
  background: #fff;
  color: var(--roxo);
  border-radius: 6px;
  cursor: pointer;
}

.spotify-player {
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  border-radius: 12px;
}

.contador {
  margin-top: 10px;
  font-size: 0.85rem;
  text-align: center;
}

.redes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 0;
  padding-top: 10px;
}

.redes a {
  color: var(--roxo-escuro);
  font-size: 20px;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 20px;
  max-width: 100%;
  transition: margin-left 0.3s ease;
  margin-top: 60px;
}

.sidebar:not(.open)~.main-content {
  margin-left: 0;
}

header {
  text-align: center;
  padding: 0;
  margin: 0;
}

header img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-top: -40px;
  /* Ajuste para colar na header */
  z-index: 1000;
  /* A capa fica atrás do botão da sidebar */
}

h2 {
  text-align: right;
  color: var(--highlight);
}

.frase {
  text-align: right;
  font-style: italic;
  color: #888;
  margin-bottom: 20px;
}

.texto {
  background: rgba(164, 113, 240, 0.1);
  padding: 20px;
  border-radius: 20px;
  line-height: 1.6;
}

#contador {
  background-color: #f5ecff;
  /* fundo claro suave no modo claro */
  padding: 6px;
  border-radius: 10px;
  max-width: 100%;
}

body.dark-mode #contador {
  background-color: #ffffff;
  filter: invert(1) hue-rotate(180deg);
}

body.dark-mode {
  background: var(--fundo-escuro);
  color: var(--texto-claro);
}

body.dark-mode .texto {
  background: #4e3c69;
}

body.dark-mode .menu button,
body.dark-mode .botoes-util button {
  background: #5a4b78;
  color: var(--texto-claro);
}

body.dark-mode .menu button:hover,
body.dark-mode .botoes-util button:hover {
  background: #6d5a90;
}

body.dark-mode .redes a {
  color: var(--highlight);
}

body.dark-mode .cylinder-label {
  background: var(--roxo-escuro);
  color: var(--highlight);
}

body.dark-mode h2,
body.dark-mode .frase {
  color: #d2b9ff;
}

body.dark-mode #email {
  text-decoration: none;
  color: #aa94d3;
  font-weight: 200;
}

body.dark-mode .sidebar {
  background: #beabe2;
}

body.dark-mode .header-bar {
  background-color: #69459f;
}


@media (max-width: 768px) {
  .container {
    flex-direction: column;
    overflow-x: hidden;
  }

  .header-bar {
    height: 30px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-radius: 0 0 20px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateY(0);
  }

  .main-content {
    margin-left: 0;
    padding: 15px;
    margin-top: 10px;
  }

  body.sidebar-open .main-content {
    margin-left: 0;
  }

  header img {
    width: 100%;
    max-width: 100%;
    margin-top: 0px;
    /* Agora a capa fica colada na header */
    z-index: 1000;
    /* Manter a capa atrás do botão da sidebar */
  }
}

.btn-cilindro {
  background: var(--highlight);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 10px;
  transition: background 0.3s ease;
  font-family: 'Georgia', serif;
  display: inline-block;
}

.btn-cilindro:hover {
  background: var(--roxo-escuro);
}

.sinopse {
  display: none;
  margin-top: 15px;
  border-radius: 20px;
  background: rgba(218, 208, 234, 0.1);
  padding: 20px;
  line-height: 1.6;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Georgia', serif;
  text-align: justify;
}

.sinopse.mostrar {
  display: block;
}

body.dark-mode .sinopse {
  background: #4e3c69;
  color: var(--texto-claro);
}

body.dark-mode .btn-cilindro {
  background: var(--roxo);
  color: var(--texto-claro);
}

/* NOVO BLOCO: Descrição personalizada compatível com sinopse */
.descricao {
  font-family: 'Georgia', serif;
  text-align: justify;
  font-size: 17px;
  color: var(--texto);
}

.descri {
  padding: 5%;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: background-color 0.3s, color 0.3s;
  font-family: 'Georgia', serif;
  text-align: justify;
  font-size: inherit;
  background: rgba(164, 113, 240, 0.1);
  color: var(--texto);
}

.descri.light {
  background-color: rgba(164, 113, 240, 0.1);
  color: var(--texto);
  border: 1px solid transparent;
}

.descri.dark {
  background-color: #4e3c69;
  color: var(--texto-claro);
  border: 1px solid #4e3c69;
}

/* GARANTIR QUE .frase FIQUE À DIREITA */
.frase {
  text-align: right;
  font-style: italic;
  color: #888;
  margin-bottom: 20px;
}

/* GARANTIR QUE .texto NÃO ESTEJA CENTRALIZADO */
.texto {
  text-align: justify;
  background: rgba(164, 113, 240, 0.1);
  padding: 20px;
  border-radius: 20px;
  line-height: 1.6;
  font-family: 'Georgia', serif;
}

body.dark-mode .texto {
  background: #4e3c69;
}
