/* ========== RESET CSS ========== */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  font-family: "Inter", sans-serif;

  /* VARIABLES */
  --blue-color: #b1d1ec;
  --green-color: #c2edb2;
  --yellow-color: #EDD6B2;
  --darkBlue-color: #6D8598;
  --white-color: #fff;
  --progress: 0%;
}

body {
  background-color: var(--blue-color);
}

/* ========== QUIZ HEADER ========== */
.quiz__header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid #fff;
  background-color: var(--darkBlue-color);
}

.quiz__header::before {
  content: "";
  display: block;
  width: 50%;
  height: 1px;
  background-color: var(--white-color);
}

.quiz__header::after {
  content: "";
  display: block;
  width: 50%;
  height: 1px;
  background-color: var(--white-color);
}

.quiz__box-header {
  position: relative;
  background: var(--white-color);
  clip-path: polygon(85% 0%, 100% 50%, 85% 100%, 15% 100%, 0% 50%, 15% 0%);
  width: 200px;
  border: 1px solid #000;
}

.quiz__title {
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-weight: 900;
  text-align: center;
}

.quiz__start {
  height: calc(100vh - 160px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.quiz__button {
  background-color: var(--yellow-color);
  text-transform: uppercase;
  width: 20%;
  padding: 1rem 0;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  color: #000;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .1rem;
}

.quiz__button:hover {
  background-color: #d1bd9d;
}

/* ========== QUIZ ========== */
.quiz__container {
  display: flex;
  height: calc(100vh - 160px);
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.quiz__timer {
  background-color: var(--white-color);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  align-self: flex-start;

  font-size: 1.25rem;
  font-weight: bold;

  width: 110px;
}

@keyframes piscar {
  50% { background-color: #e74c3c; color: #fff; }
}

.quiz__timer--blink {
  animation: piscar 0.7s infinite;
}

.quiz__box {
  width: 90%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.quiz__question-number {
  font-size: 4rem;
  font-family: "Archivo Black", sans-serif;
  text-transform: uppercase;
}

.quiz__box-question {
  position: relative;
  clip-path: polygon(100% 0%, 100% 75%, 85% 100%, 0% 100%, 0% 25%, 15% 0%);
  background-color: var(--white-color);
  max-width: 500px;
  height: 200px;
  align-content: center;
  padding: 2rem;
  box-shadow: inset 0px 0px 6px 2px #0084ff; 
}

.quiz__box-question::before {
  content: "\"";
  display: block;
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 2rem;
  font-weight: bold;
}

.quiz__box-question::after {
  content: "\"";
  display: block;
  position: absolute;
  bottom: 5px;
  left: 10px;
  font-size: 2rem;
  font-weight: bold;
  transform: rotate(180deg);
}

.quiz__question {
  font-size: 1.125rem;
  font-weight: 500;
}

.quiz__progress-bar {
  width: 100%;
  max-width: 500px;
  height: 12px;
  background-color: var(--white-color);
}

.quiz__progress-bar::after {
  content: "";
  display: block;
  position: relative;
  background-color: var(--green-color);
  width: var(--progress, 0%);
  height: 12px;
}

/* ========== CARD ANSWERS ========== */
.quiz__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
}

.quiz__box-option {
  background-color: var(--white-color);
  display: flex;
  flex-direction: row;
  padding: 1rem;
  gap: 1rem;
  border-radius: 1rem;
  cursor: pointer;
}

.quiz__box-option:hover {
  background-color: #e6e6e6;
}

.quiz__option {
  align-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.quiz__answer {
  align-content: center;
  font-weight: 500;
}

/* ========== FINAL SCREEN ========== */
.quiz__results {
  height: calc(100vh - 160px);
  width: 20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.quiz__points {
  display: flex;
  justify-content: space-evenly;
}

.quiz__points-correct {
  background-color: var(--green-color);
  padding: 1rem;
  border-radius: 1rem;
}

.quiz__points-wrong {
  background-color: #edbeb2;
  padding: 1rem;
  border-radius: 1rem;
}

.quiz__message {
  gap: .5rem;
}

.quiz__restart {
  width: 80%;
  margin: 0 auto;
  height: 40px;
  border: none;
  border-radius: 1rem;
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1rem;
  cursor: pointer;
}

.quiz__restart:hover {
  background-color: var(--yellow-color);
}

/* ========== FOOTER ========== */
.quiz__footer {
  background-color: var(--darkBlue-color);
  height: 80px;
  align-content: center;
}

.quiz__footer-paragraph {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 1rem;
}

.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .quiz__box {
    gap: 1rem;
    justify-content: space-between;
  }

  .quiz__question-number {
    font-size: 2.75rem;
  }

  .quiz__options{
    gap: .5rem;
  }

  .quiz__box-option {
    padding: .5rem;
  }

  .quiz__answer {
    font-size: .75rem;
  }

  .quiz__footer-paragraph {
    font-size: 1rem;
  }
}

@media (max-width: 500px) {
  .quiz__header {
    height: 60px;
  }

  .quiz__container {
    height: calc(100vh - 120px);
    width: 90%;
    margin: auto;
  }

  .quiz__question-number {
    font-size: 1.75rem;
  }

  .quiz__box-question {
    height: 180px;
  }

  .quiz__question {
    font-size: 0.875rem;
  }
  
  .quiz__options {
    grid-template-columns: 1fr;
  }

  .quiz__box-option {
    gap: .25rem;
  }

  .quiz__option {
    font-size: 1.25rem;
  }

  .quiz__message {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: .5rem;
  }

  .quiz__footer {
    height: 60px;
  }

  .quiz__footer-paragraph {
    font-size: 0.6rem;
    margin: 0 .5rem;
  }
}