@font-face {
  font-family: "Oswald";
  src: url("Oswald-VariableFont_wght.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito";
  src: url("Nunito-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Nunito";
  src: url("Nunito-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

:root {
  --bg: #0b0f14;
  --card: #121821;
  --card2: #171f2a;
  --text: #e9eef5;
  --muted: #9bb0c9;
  --accent: #00d4ff;
  --accent2: #4df2a1;
  --danger: #ff5b6f;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.35);

  --azul_escur_fundo: #282f65;
  --azul_escuro_vu: #0e1520;
  --cor_vu: #9ef6ff;
  --fundo_branco_trasnparencia: #ffffff99;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  background-color: #bbbbbb;
  background-position: center center;
  background-size: 100%;
}
body {
  margin: 0;
}

.barra_superior {
  width: 100%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.9);
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  padding: 20px;
  align-items: center;
}

.barra_superior .logo1 {
  height: 40px;
  padding-right: 10px;
  border-right: 1px solid #737272;
}

.barra_superior .logo2 {
  height: 20px;
  padding-left: 10px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(100% 100% at 70% 20%, #1b2634, #0d131b);
  box-shadow: var(--shadow);
}
.titlewrap h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
}
.subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Barra de progresso (faixa 100% interativa, sem “thumb”) */
.progress-wrap {
  min-width: 320px;
  text-align: right;
}
#cycleLabel {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

#progressBar {
  position: relative;
  width: 320px;
  max-width: 60vw;
  height: 12px;
  background: var(--azul_escuro_vu);
  border-radius: 6px;
  margin-left: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: pointer; /* deixa claro que é interativa */
  overflow: hidden;
  border: 2px solid var(--azul_escur_fundo);
}

.areaProgresso {
  width: 320px;
  display: flex;
  font-family: "Nunito";
  font-size: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-weight: 400;
  gap: 4px;
}

#progressBar.grabbing {
  cursor: grabbing;
}
#progressFill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0%;
  /* background: linear-gradient(90deg, var(--accent), var(--accent2)); */
  background-color: var(--cor_vu);
  transition: width 0.08s linear;
}

.controles {
  position: fixed;
  bottom: 0;
  width: 680px;
  height: 88px;
  background-color: #ffffff;
  display: flex;
  padding: 20px;
  align-items: center;
  flex-direction: row;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  gap: 20px;
  z-index: 100;
}

.controles .controles-botoes {
  width: 50%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

#status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Container e cards */
.container {
  width: 100%;
  max-width: 2400px;
  margin-left: auto;
  margin-right: auto;
  height: 100vh;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background-image: url(../img/rio-escola-do-samba_bg-02.jpg);
  background-position: center bottom;
  background-size: 2400px;
}

.animacao_brilho {
  width: 100%;
  height: 100%;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* background-image: url(../img/rio-escola-do-samba_bg-02_luz_1.png); */
  background-position: center bottom;
  background-size: 2400px;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* Controles topo */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.controls-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border-width: 0;
  background: var(--azul_escur_fundo);
  font-family: "Nunito";
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition:
    0.15s transform,
    0.15s background,
    0.15s border,
    0.15s opacity;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn.primary {
  background-color: var(--azul_escur_fundo);
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  border-color: rgba(255, 0, 0, 0.35);
  color: #ffd1d6;
}
.btn:active {
  transform: translateY(0);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.controls input[type="range"] {
  width: 220px;
}
#masterLabel {
  color: var(--muted);
  min-width: 40px;
  text-align: right;
}

/* opcional: melhora a leitura do modal de boas-vindas */
#welcome_overlay .modal p {
  margin: 8px 0;
  line-height: 1.35;
}

/* Lista de instrumentos */
.instruments-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  width: 480px;
  margin-bottom: 170px;
  margin-top: 90px;
}

.instrument {
  position: relative;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100px;
}

.instrument:nth-child(1) {
  margin-left: calc(50% - 50px);
  margin-right: calc(50% - 50px);
}

.instrument .top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Ícone: cinza se MUTADO; colorido se DESMUTADO */
.instrument .icon {
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    filter 0.15s,
    opacity 0.15s;
  width: 100px;
  height: 100px;
  border-radius: 50px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--azul_escur_fundo);
  cursor: pointer;
  position: relative;
  padding: 11px;
}

.instrument .icon img {
  position: absolute;
  z-index: 3;
  width: 60%;
  top: 20%;
  left: 20%;
  object-fit: contain;
  display: block;
  transition:
    filter 0.15s,
    opacity 0.15s;
}

.instrument .icon .icon-vu {
  position: absolute;
  z-index: 1;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  top: 3px;
  left: 3px;
  display: flex;
  align-items: end;
  /* background-color: #ff0000; */
  border-radius: 100px;
  overflow: hidden;
}

.instrument .icon .icon-vu2 {
  position: absolute;
  z-index: 2;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  top: 6px;
  left: 6px;
  display: block;
  background-color: var(--azul_escur_fundo);
  border-radius: 60px;
}

.instrument .icon .icon-vu .bar {
  width: 100%;
  height: 0%;
  background-color: var(--cor_vu);
  display: flex;
}

.instrument .icon.muted .icon-vu .bar {
  background-color: #757575;
}

.instrument.on .icon img {
  filter: none;
  opacity: 1;
}
.instrument.off .icon img {
  filter: grayscale(100%) brightness(0.7) contrast(1.05);
  opacity: 0.8;
}

/* Bordas de status (verde=ativo, vermelho=mutado) */
/* .instrument .icon.active {
  border-color: #2ce69b42;
  box-shadow:
    0 0 0 2px rgba(44, 230, 155, 0.25),
    0 0 12px rgba(44, 230, 155, 0.2);
} */
/* .instrument .icon.muted {
  border-color: #ff5b6f;
  box-shadow:
    0 0 0 2px rgba(255, 91, 111, 0.25),
    0 0 12px rgba(255, 91, 111, 0.2);
} */

.instrument .meta {
  flex: 1;
  width: 100%;
}

.instrument .flags {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--fundo_branco_trasnparencia);
  border-radius: 20px;
  /* padding: 0px 4px; */
}

.instrument .title {
  margin: 0;
  font-weight: 500;
  color: var(--azul_escur_fundo);
  font-family: "Oswald";
  font-size: 16px;
  flex: 1;
  text-align: center;
  text-transform: uppercase;
  place-items: center;
  letter-spacing: -0.5px;
}

.botaoImagem {
  width: 48px;
  height: 48px;
  background: unset;
  color: #bde3ff;
  border: 0px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  margin: 0;
  padding: 0;
}

.info-btn {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: unset;
  color: #bde3ff;
  border: 0px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  line-height: 0;
}

.info-btn img {
  width: 24px;
  height: 24px;
}

.info-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.instrument .row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.instrument .row .grow {
  flex: 1;
}
.instrument .row label {
  min-width: 72px;
  color: var(--muted);
}
.instrument .row input[type="range"] {
  width: 100%;
}

.badges {
  display: flex;
  gap: 6px;
}
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bcd2e6;
  background: var(--azul_escuro_vu);
}
.badge.solo {
  border-color: #2ce69b;
  color: #d8ffef;
}
.badge.muted {
  border-color: #ff8594;
  color: #ffdbe0;
}

.vu {
  width: 100%;
  height: 8px;
  background: #0c121b;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.vu .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ce69b, #00d4ff);
  transition: width 0.08s linear;
}

.app-footer {
  text-align: center;
  padding: 18px;
  color: var(--muted);
}

/* Overlays / Modais */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.76);
  display: none;
  align-items: end;
  justify-content: center;
  z-index: 200;
}
.overlay.show {
  display: flex;
}
.overlay.hidden {
  display: none;
}

/* Overlays / Modais */
.overlay_info {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.76);
  display: none;
  align-items: end;
  justify-content: center;
  z-index: 2000;
  display: flex;
  transition: opacity 0.3s;
  opacity: 0;
  > .modal {
    transform: translateY(100vh);
  }
}

.overlay_info.show {
  opacity: 1;
}

.overlay_info.show .modal {
  transition: transform 0.3s ease-out;
  transform: translateY(0vh);
}

.overlay_info.hidden {
  opacity: 0;
}

.overlay_info.hidden .modal {
  transition: transform 0.3s ease-in;
  transform: translateY(100vh);
}

.overlay_benvindo {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.76);
  display: none;
  align-items: end;
  justify-content: center;
  z-index: 200;
  display: flex;
  transition: opacity 0.3s;
  opacity: 1;

  > .modal {
    transition: transform 0.5s ease-in;
  }
}

#infoPlayer {
  width: 100%;
}

.overlay_info .modal h2 {
  margin-bottom: 0;
}

.overlay_info .modal {
  display: flex;
  flex-direction: column;
}

#infoDesc {
  overflow-y: auto;
}
.descricao {
  flex: 1;
  overflow-y: auto;
}

.descricao video {
  width: 100%;
}

.overlay_benvindo.hidden {
  opacity: 0;
}

.overlay_benvindo.hidden .modal {
  transform: translateY(100vh);
}

.modal {
  position: relative;
  width: 100%;
  max-width: min(calc(100% - 20px), 680px);
  background-color: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px;
  font-size: 18px;
  font-family: "Nunito";
  /* box-shadow: var(--shadow); */
  max-height: calc(100vh - 50px);
}

.modal h2 {
  margin-top: 0;
  font-family: "Oswald";
  font-size: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}

.modal .btn_modal_x {
  background-color: unset;
  margin: 0;
  padding: 0;
  border-width: 0;
  height: fit-content;
  cursor: pointer;
}

.modal .atencao {
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 30px;
  gap: 20px;
  font-size: 16px;
}

.modal .atencao .alerta {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.loaderbar {
  width: 100%;
  height: 12px;
  background: var(--azul_escuro_vu);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  border: 2px solid var(--azul_escur_fundo);
}

.loaderbar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--cor_vu);
  transition: width 0.1s ease;
}

.loading-text {
  color: var(--muted);
  margin-top: 8px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 8px;
}

.demonstracao {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin-top: 40px;
  border-bottom: #a6a6a6 solid 1px;
  padding-bottom: 40px;
}

.demonstracao .area_demonstracao {
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: row;
}

.demonstracao .area_demonstracao img {
  width: 100px;
}

.demonstracao .area_demonstracao .area_texto_demonstracao {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demonstracao .area_demonstracao .area_texto_demonstracao img {
  width: 24px;
  padding: 4px;
}

.demonstracao .area_demonstracao .area_texto_demonstracao .texto_demonstracao {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: self-start;
}

/* Responsivo */
@media (max-width: 1200px) {
  .container {
    background-size: 2080px;
  }

  .instrument .icon {
    width: 80px;
    height: 80px;
  }

  .animacao_brilho {
    background-size: 2080px;
  }
  .instruments-list {
    gap: 10px;
    width: 320px;
  }
  .controles {
    width: 600px;
  }

  .instrument {
    width: 90px;
  }
}

/* Responsivo */
@media (max-width: 770px) {
  .areaProgresso {
    width: 100%;
  }
  .controles {
    width: 320px;
    height: fit-content;
    align-items: center;
    flex-direction: column;
    gap: 20px;
  }

  #progressBar {
    width: 100%;
    max-width: 100%;
  }

  .controles .controles-botoes {
    width: 100%;
  }

  .instruments-list {
    gap: 10px;
    width: 320px;
    margin-bottom: 148px;
  }

  .modal .atencao {
    flex-direction: column;
    padding: 0px;
    gap: 10px;
  }

  .modal .atencao .alerta {
    flex-direction: row;
    align-items: center;
    flex: 1;
    text-align: left;
    gap: 10px;
  }

  .modal h2 {
    margin-bottom: 10px;
  }
}

/* Responsivo */
@media (max-width: 640px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .controls-right {
    justify-content: space-between;
  }
}
