@import url("https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css");
/* From global.css */
/* Foi necessário porque o loading vai ser diferente */

body {
  color: #fff;
  text-shadow: 0 0.05rem 0.1rem rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, 0.5);
  min-height: 100vh;
  background: linear-gradient(45deg, #2196f3 0%, #0a3a6e 100%); 
  /* background: linear-gradient(45deg, #f321c3 0%, #6e0a0a 100%); */
  background-size: 200% 200%;
}

#page-content {
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
}

#page-content,
#menu-div,
header,
nav,
.quiz-actions,
.quiz-card-body {
  width: 100%;
}

#page-content,
#menu-div,
header,
nav,
.quiz-card,
.quiz-actions,
.quiz-card-body {
  display: flex;
}

#menu-div,
header {
  justify-content: center;
  align-items: center;
}

nav {
  justify-content: space-between;
}

nav,
.nav-link {
  padding: 0.25rem 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  background-color: transparent;
  border-bottom: 0.25rem solid transparent;
  transition: border-bottom-color 0.2s;
}

.nav-link:hover {
  color: #46d190;
  border-bottom-color: #46d190;
}

.nav-link + .nav-link {
  margin-left: 1rem;
}

.active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Estilos para o campo de busca */

#searchQuizzes {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

#searchContainer {
  width: 85%;
}

#searchInput {
  max-width: 400px;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  border: 2px solid #bdbdbd;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput:hover {
  cursor: pointer;
}

#searchInput:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px #4e73df33;
  outline: none;
}

#filterBtnContainer {
  width: 100%;
}

#btnsContainer {
  width: 85%;
  justify-content: space-evenly;
}

#info {
  width: 85%;
  border-radius: 8px;
  border: 2px solid #bdbdbd;
}

/* Grid de quizzes */
.quizzes-grid {
  width: 85%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px;
}

.quiz-card,
.quiz-card-body {
  flex-direction: column;
}

.quiz-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 18px;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}

.quiz-card-body {
  gap: 16px;
  flex: 1;
  justify-content: space-between;
}

.quiz-actions {
  gap: 10px;
}

.quiz-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.quiz-title,
.quiz-desc {
  margin: 0;
}

.quiz-title,
.noQuizzesMsg {
  font-weight: bold;
}

.quiz-title {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* número máximo de linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 15px;
  word-break: break-word;
  white-space: pre-line;
  color: #3e3b3b;
  font-size: 1.2rem;
}

.quiz-desc {
  font-size: 1rem;
  color: #666;
}

.noQuizzesMsg {
  font-size: 1.5rem;
}

.btn-secondary {
  color: #333;
  text-shadow: none; /* Prevent inheritance from `body` */
  background-color: #fff;
  border: 0.05rem solid #fff;
}
#difficultyLevel {
  margin-bottom: 10px;
}

#difficultyLevel > label {
  margin: 0;
}

#difficultyOptionsDiv {
  gap: 8px;
  align-items: center;
}

#difficultyOptionsDiv > label {
  margin: 0;
}

@media (min-width: 768px) {
  nav {
    width: 50%;
  }

  #filterBtnContainer {
    width: 30%;
  }

  #btnsContainer {
    padding: 20px 0;
  }

  #info {
    width: 70%;
  }

  .quizzes-grid {
    grid-template-columns: repeat(2, 1fr); /* Tablets: 2 colunas */
  }
}

@media (min-width: 1024px) {
  nav {
    width: 40%;
  }

  #searchQuizzes {
    flex-direction: row;
    gap: 0;
  }

  #info {
    width: 45%;
  }

  #filterBtnContainer {
    width: 15%;
  }

  #btnsContainer {
    width: 30%;
    justify-content: flex-start;
    gap: 20px;
    padding: 0;
  }

  .quizzes-grid {
    margin: 25px;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 colunas */
  }
}
