:root {
  --cor-papel: #ffffff;
  --cor-texto: #2a2a2a; 
  --cor-destaque: #8b0000;
  --cor-maestro: #111;
  --cor-borda-menu: #333;
  --cor-linha-pauta: rgba(0, 0, 0, 0.15); 
  --altura-tecla-branca: 60px;
  --altura-tecla-preta: 55px; 
  --compasso-distancia: 200px; 
}


body {
  padding: 0;
  margin: 0;
  font-family: 'Times New Roman', serif; 
  background-color: #f0f0f0; 
  border-top: 5px solid var(--cor-maestro); 
  color: var(--cor-texto);
}

.page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 50px 70px;
  background: var(--cor-papel);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  border-left: 5px solid var(--cor-maestro); 
  
  background-image: 
    repeating-linear-gradient(
      to bottom,
      var(--cor-linha-pauta) 0px, var(--cor-linha-pauta) 1px, transparent 1px, transparent 4px, 
      var(--cor-linha-pauta) 5px, var(--cor-linha-pauta) 6px, transparent 6px, transparent 9px, 
      var(--cor-linha-pauta) 10px, var(--cor-linha-pauta) 11px, transparent 11px, transparent 14px, 
      var(--cor-linha-pauta) 15px, var(--cor-linha-pauta) 16px, transparent 16px, transparent 19px, 
      var(--cor-linha-pauta) 20px, var(--cor-linha-pauta) 21px, transparent 21px, transparent 100px 
  );
  background-size: 100% 100px;
}

.page-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2; 
    
    background-image: repeating-linear-gradient(
        to right,
        rgba(0, 0, 0, 0.1) 0,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent var(--compasso-distancia)
    );
    background-size: var(--compasso-distancia) 100%;
    
    left: 100px; 
    right: 50px; 
}


h1 {
  text-align: left;
  font-size: 3.5em;
  font-weight: bold;
  color: var(--cor-texto);
  margin-top: 0;
  padding-left: 200px; 
  padding-top: 10px; 
  position: relative;
  line-height: 1.2;
}

h1::before {
  content: '𝄞';
  position: absolute;
  left: 0px; 
  top: 0px; 
  font-size: 2em; 
  color: var(--cor-destaque);
  line-height: 1;
}

h2 {
  text-align: left;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--cor-destaque);
  margin-bottom: 10px; 
  margin-top: 40px;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: 3px; 
  border-bottom: 3px double var(--cor-maestro); 
  padding-bottom: 5px;
  position: relative;
}

h3 {
  font-weight: bold;
  font-size: 1.2em;
  color: var(--cor-maestro);
  margin-top: 30px;
  border-bottom: 1px solid var(--cor-maestro); 
  padding-bottom: 5px;
  font-style: italic;
  position: relative;
}

.section-content, .summary, #jar-preamble, #jar-explanation, .benefits, #jar-participation, .requirements, p {
  width: 100%;
  margin: 10px 0; 
  padding: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.6em; 
  font-size: 1em; 
  font-weight: normal;
  color: var(--cor-texto);
  text-align: justify; 
  letter-spacing: 0.5px; 
  text-indent: 0; 
  padding-bottom: 0;
  border-bottom: none;
  position: relative;
}

#jar-preamble::before, #jar-explanation::before, .benefits::before, #jar-participation::before, .requirements::before {
    position: absolute;
    left: -55px;
    top: 0;
    font-size: 0.8em;
    font-weight: bold;
    color: var(--cor-destaque);
    transform: rotate(-90deg); 
    transform-origin: 0 0;
    content: var(--content-label, "SEC");
}
#jar-preamble { --content-label: "INTRO"; }
#jar-explanation { --content-label: "VERSE 1"; }
.benefits { --content-label: "CHORUS"; }
#jar-participation { --content-label: "BRIDGE"; }
.requirements { --content-label: "VERSE 2"; }


.page-wrapper p {
    text-indent: 40px; 
    padding-left: 50px; 
    position: relative;
    margin-right: 50px; 
    width: calc(100% - 50px); 
}
.page-wrapper p::before {
    content: '♩'; 
    position: absolute;
    left: 0;
    top: -0.3em;
    font-size: 3em; 
    color: var(--cor-maestro);
    line-height: 1;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); 
}

.summary {
  text-align: left;
  border-left: 5px solid var(--cor-destaque);
  background: rgba(255, 255, 255, 0.8);
  padding: 15px;
  text-indent: 0;
}
.summary p::before {
    content: none; 
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: linear-gradient(to right, #ccc 0%, #fff 100%);
  border-right: 6px solid var(--cor-borda-menu);
  padding: 0;
  margin-left: -210px;
  transition: 0.5s ease-out;
  font-size: 1em;
  z-index: 10;
  overflow-y: auto;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.sidebar:hover {
  margin-left: 0px;
  transition: 0.5s ease-in;
  background: #fff;
  border-right: 5px solid var(--cor-maestro);
}

.sidebar ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  flex-grow: 1; 
}

.sidebar li {
  height: var(--altura-tecla-branca);
  line-height: var(--altura-tecla-branca);
  text-align: left;
  border-bottom: 1px solid #999;
  transition: all 0.2s ease; 
  position: relative;
  font-weight: bold;
  z-index: 5; 
  color: var(--cor-maestro);
  background: white;
  padding-left: 10px; 
  padding-right: 25px;
  border-right: 3px solid #666;
  white-space: nowrap;
  overflow: hidden;
  font-size: 0.9em; 
  cursor: pointer; 
  user-select: none; 
}

/* Efeito ao passar o mouse: Brilha e move sutilmente */
.sidebar li:hover {
  background: #f0f0f0; 
  filter: brightness(1.05);
  transform: translateX(2px); 
}

/* Efeito de "Clique" (Ativo) - AGORA EM CINZA */
.sidebar li:active {
  background: #cccccc; /* Cinza suave */
  color: #000;
  filter: brightness(1.1);
  transform: translateX(4px) scale(0.99); 
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar li::after { 
    content: '';
    position: absolute;
    top: calc(var(--altura-tecla-branca) - 20px); 
    right: 0;
    width: 70%;
    height: var(--altura-tecla-preta); 
    background: var(--cor-maestro);
    z-index: 4; 
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.sidebar li:nth-child(1)::after, 
.sidebar li:nth-child(6)::after, 
.sidebar li:nth-child(10)::after { 
    content: none;
}

.sidebar li:nth-child(6), 
.sidebar li:nth-child(10) { 
    background: #e0e0e0;
    color: var(--cor-maestro);
    font-weight: bold;
    font-size: 0.9em;
    height: 40px;
    line-height: 40px;
    margin: 10px 0 0 0;
    width: 100%;
    transform: none;
    z-index: 5;
    box-shadow: none;
    text-align: center;
    border-bottom: 2px solid var(--cor-destaque);
    padding: 0;
}
.sidebar li:nth-child(6) { margin-top: 20px; } 

.sidebar ul li.empty-key {
    background: white;
    height: var(--altura-tecla-branca);
    line-height: var(--altura-tecla-branca);
    border-bottom: 1px solid #999;
    z-index: 5; 
    cursor: default;
    border-right: 3px solid #666;
    flex-grow: 0; 
}
.sidebar ul li.empty-key::after {
    content: ''; 
}

.sidebar li:hover::after {
    filter: brightness(1.5); 
    background: var(--cor-destaque); 
    transform: translateY(calc(var(--altura-tecla-branca) - 17px)); 
}

.footer {
  margin-top: 80px;
  padding: 20px 0;
  text-align: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cor-texto);
  font-style: italic;
  margin-bottom: 0;
  border-top: 6px solid var(--cor-maestro);
  border-bottom: 3px solid var(--cor-maestro);
}

.sidebar ul li:last-child {
    flex-grow: 1; 
    height: auto; 
}
.sidebar ul li:last-child::after {
    content: none !important; 
}