* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  background-color: #000;
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden { display: none !important; }

#game-container {
  position: relative;
  width: 100vw;
  height: 56.25vw;
  max-width: 177.78vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: #000;
}

#cenario {
  position: absolute;
  width: 100%; height: 100%;
  background-image: url('https://static.wikia.nocookie.net/fridaynightfunking/images/9/98/SafetyLullabyRemasterBG.png/revision/latest/scale-to-width-down/1000?cb=20260102063741');
  background-size: cover;
  background-position: center;
}

#sombra-hypno {
  position: absolute;
  top: 0; left: 0;
  width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.95) 70%, rgba(0,0,0,0) 100%);
  z-index: 6;
  transition: opacity 2.5s ease-in-out;
  pointer-events: none;
}

#sombra-hypno.sombra-revelada {
  opacity: 0.2;
}

#cutscene-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: black;
  z-index: 20;
  pointer-events: none;
}

#stage-characters {
  position: absolute;
  width: 100%; height: 100%;
  z-index: 5;
}

#hypno-sprite {
  position: absolute;
  bottom: 15%; left: 8%;
  height: 52%;
}

#gf-sprite {
  position: absolute;
  bottom: 15%; right: 12%;
  height: 38%;
}

#stage-characters.modo-pov #gf-sprite { display: none; }
#stage-characters.modo-pov #hypno-sprite {
  left: 50%;
  transform: translateX(-50%);
  bottom: 10%;
  height: 60%;
}

#hud-strumline {
  position: absolute;
  top: 6%; left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 8%;
  z-index: 10;
}

.downscroll #hud-strumline {
  top: auto;
  bottom: 10%;
}

.strum-group {
  display: flex;
  gap: 12px;
}

.strum, .note {
  width: 7vw;
  height: 7vw;
  max-width: 55px;
  max-height: 55px;
  border-radius: 8px;
  border: 3px solid #fff;
}

.seta-0 { background-color: #c24b99; }
.seta-1 { background-color: #00ffff; }
.seta-2 { background-color: #12fa05; }
.seta-3 { background-color: #f9393f; }

.note-sustain {
  position: absolute;
  width: 16px;
  opacity: 0.7;
  border-radius: 4px;
  z-index: 8;
  pointer-events: none;
}

#notes-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9;
  pointer-events: none;
}

.note {
  position: absolute;
  border-radius: 8px;
}

#hud-bottom {
  position: absolute;
  bottom: 3%; left: 50%;
  transform: translateX(-50%);
  width: 45%;
  text-align: center;
  z-index: 10;
}

.barra-vida-bg {
  position: relative;
  width: 100%;
  height: 18px;
  background-color: #ff0000;
  border: 2px solid #fff;
  margin-bottom: 8px;
  overflow: visible;
}

#barra-vida-fill {
  width: 50%;
  height: 100%;
  background-color: #a600ff;
  float: right;
  transition: width 0.05s linear;
}

.icon-sprite {
  position: absolute;
  top: -35px;
  width: 90px;
  height: 90px;
  background-repeat: no-repeat;
  transition: left 0.05s linear;
}

#icon-hypno {
  background-image: url('https://static.wikia.nocookie.net/fridaynightfunking/images/c/c6/LullabyRebootSafetyLullabyHypnoIcons.png/revision/latest?cb=20260729235041');
  background-size: 180px 90px;
  background-position: 0px 0px;
}

#icon-hypno.lit {
  background-image: url('https://static.wikia.nocookie.net/fridaynightfunking/images/4/4f/LullabyRebootHypnoLitIcons.png/revision/latest?cb=20260729235421');
  background-size: 180px 90px;
  background-position: 0px 0px;
}

#icon-gf {
  background-image: url('https://static.wikia.nocookie.net/fridaynightfunking/images/1/1c/LullabyRebootSafetyLullabyGFIconNormal.png/revision/latest?cb=20260729234806');
  background-size: contain;
  background-position: center;
  transform: scaleX(-1);
}

#score-text {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 2px 2px #000;
}

#botplay-indicator {
  color: #00ffff;
  font-size: 16px;
  font-weight: bold;
  margin-top: 4px;
  letter-spacing: 2px;
  text-shadow: 2px 2px #000;
}

/* OVERLAYS E MENU DE OPÇÕES */
.overlay-screen {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 30;
  color: #fff;
}

.overlay-screen h1 {
  font-size: 38px;
  color: #ff0000;
  text-shadow: 3px 3px #550000;
  margin-bottom: 5px;
}

.subtitulo {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

.painel-opcoes {
  background: rgba(255,255,255,0.05);
  border: 1px solid #444;
  padding: 15px 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 55vh;
  overflow-y: auto;
}

.painel-opcoes h3 {
  color: #a600ff;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.opcao-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.instrucao-controles {
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
}

.grid-controles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ctrl-btn-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 12px;
}

.btn-rebind {
  width: 100%;
  padding: 6px;
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  margin-top: 3px;
}

.btn-rebind.aguardando {
  background: #a600ff;
  color: #fff;
  animation: piscar 0.8s infinite alternate;
}

@keyframes piscar {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.btn-main, .menu-botoes button {
  padding: 12px 30px;
  font-size: 18px;
  font-family: inherit;
  font-weight: bold;
  background-color: #ff0000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  margin: 5px;
}

.btn-main:hover, .menu-botoes button:hover {
  background-color: #cc0000;
  transform: scale(1.05);
}

#hypno-pause-img {
  max-height: 180px;
  margin-bottom: 15px;
}