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

:root {
  --main-text: #01f372;
  --main-btn: #0089ff;
  --bg-checked: #9addff;
}
:root {
  height: 100vh;
}
body {
  height: 100%;
  background: url("./fondo.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
  font-family: Geneva, Tahoma, sans-serif;
  letter-spacing: 0.5px;
}
.main {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.main header {
  display: flex;
  padding: 56px;
  justify-content: center;
}
button {
  font-size: 30px;
  font-weight: bold;
  padding: 24px 64px;
  margin-top: 32px;
  border-radius: 48px;
  color: white;
  background-color: var(--main-btn);
}
button.secondary {
  background-color: transparent;
  border: none;
  text-decoration: underline;
}

.reset-data-btn {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 100;
  font-size: 16px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  margin: 0;
  font-weight: 400;
  letter-spacing: 1px;
}

.reset-data-btn:hover {
  opacity: 1;
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
}
.screen-welcome {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 80px 128px;
  height: 100%;
}
.screen-welcome h1,
.screen-welcome p {
  text-align: center;
}
.content-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 40px;

  & h1 {
    font-size: 48px;
    font-weight: 600;
  }
  & h1 span {
    font-size: 112px;
    font-weight: bold;
    color: var(--main-text);
  }
  & .subtitle-welcome {
    font-size: 48px;
    font-family: inherit;
  }
  & .text-welcome span {
    font-weight: 600;
    color: var(--main-text);
  }
}
.footer-welcome p {
  max-width: 866px;
  font-size: 10px;
  line-height: 14px;
}

.screen-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding: 80px;
  height: 100%;

  & .question-instruction {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    text-wrap: balance;
    color: var(--main-text);
  }
  & .question-label {
    font-size: 30px;
    max-width: 70vw;
    text-align: center;
  }
  & .options-list {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 30px;
    color: #1e1e1e;

    & label {
      padding: 16px 32px;
      border-radius: 40px;
      background-color: white;

      & .input-other {
        font-size: 24px;
        margin-top: 12px;
        padding: 12px 24px;
        border-radius: 12px;
        width: 100%;
        border: 1px solid var(--main-btn);
      }
    }
    & label:has(input:checked) {
      background-color: var(--bg-checked);
      border: 1px solid var(--main-btn);
    }
    & input {
      display: none;
    }
  }
}

.camera-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.camera-container video {
  flex: 1;
  width: 100%;
  object-fit: cover;
}

.camera-text {
  text-align: center;
  padding: 24px;
}

.camera-text h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
}

.camera-text p {
  font-size: 22px;
}

.camera-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 32px;
}

.camera-primary-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.camera-secondary-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.camera-buttons button {
  margin-top: 0;
}

.container-load {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
}

.container-load p {
  font-size: 60px;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.screen-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding: 80px;
  height: 100%;

  & .qr-title {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    color: var(--main-text);
  }

  & .qr-description {
    font-size: 30px;
    max-width: 70vw;
    text-align: center;
  }

  & .qr-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  & .qr-image img {
    width: 400px;
    height: 400px;
    object-fit: contain;
  }

  & .qr-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
  }
}

.screen-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding: 80px;
  height: 100%;

  & .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  & .results-subtitle {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    text-wrap: balance;
    color: var(--main-text);
  }

  & .voters-count {
    font-size: 18px;
    color: #ccc;
    white-space: nowrap;
  }

  & .results-bars {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;

    & span {
      font-size: 30px;
      color: #1e1e1e;
    }

    & .results-bar {
      padding: 16px 32px;
      border-radius: 40px;
      background-color: white;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    & .results-bar.selected {
      background-color: var(--bg-checked);
      border: 1px solid var(--main-btn);
    }

    & .results-bar-text {
      display: flex;
      justify-content: space-between;
      font-size: 30px;
      color: #1e1e1e;
    }

    & .results-pct {
      font-weight: 700;
      color: var(--main-btn);
    }

    & .results-button {
      margin-top: 16px;
      display: flex;
      justify-content: flex-end;
    }

    font-size: 14px;
    color: var(--main-text);
    letter-spacing: 1px;
    align-self: flex-end;
  }
}
