:root {
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --header-height: 70px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  height: 100%;
  overflow: hidden;
}

.container {
  /*width: 100%;*/
  height: 100vh;
  margin: 0 auto;
  position: relative;
}

header {
  background: #111;
  padding: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

header h3 {
  margin: 0;
  color: white;
}

#videoContainer {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#videoPlayer {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

video, iframe {
  height: 100%;
  width: auto;
  object-fit: contain;
  background-color: black;
  border: none;
  max-width: 100%;
}

#questionOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  z-index: 10;
  padding-bottom: var(--header-height);
}

#answerOverlay {
    display: flex;
    position: absolute;
    top: 0px;
    font-size: 1.1em;
    font-style: italic;   
    background: #22222269;
    padding: 8px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #444;
    transition: background 0.3s;
    text-align: center;
    word-wrap: break-word;
}

.option {
  background: #222;
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #444;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  max-width: 320px;
  text-align: center;
  word-wrap: break-word;
}

.option.selected {
    border: 1px solid #e1b652;
}

.option:hover {
  background: #444;
}


button.option {
  all: unset; /* Remove estilos nativos do botão */
  display: block; /* Garante comportamento tipo bloco */
  background: #222;
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #444;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  max-width: 320px;
  text-align: center;
  word-wrap: break-word;
}

button.option:hover {
  background: #444;
}

.nav-back {
  position: absolute;
  top: 90%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 22px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 15;
}

.multiOp {
    font-size: 1.2em;
    font-weight: normal;
    color: lightgray;
    text-align: left;    
}

#resultContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--overlay-bg);
  z-index: 25;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  padding-bottom: var(--header-height);
}

#startOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--overlay-bg);
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

#startOverlay h1, #startOverlay p {
  margin: 0 0 20px;
  padding: 0 10px;
  max-width: 90%;
  word-wrap: break-word;
}

#startOverlay button {
  padding: 10px 20px;
  font-size: 16px;
  background: #28a745;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  max-width: 90%;
}

@media (max-width: 579px) {
  .option {
    font-size: 16px;
  }

  #questionOverlay h2 {
    font-size: 18px;
    padding: 0 10px;
  }
}

#quizForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-top: 20px;
}

#quizForm input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #222;
  color: #fff;
}

#quizForm input::placeholder {
  color: #bbb;
}

#quizForm button {
  padding: 10px 20px;
  font-size: 16px;
  background: #28a745;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
}

.loader {
  display: flex;
  margin-top: 20px;
}

/* Animação tipo 1: Spinner */
.spinner {
  border: 8px solid #080000;
  border-top: 8px solid #b8dddf;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btnSomCentral {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 100px;
  height: 100px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 42px;
  color: #fff;
  transition: background 0.3s, transform 0.2s;
}

.btnSomCentral:hover {
  background: rgba(40, 167, 69, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}
