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

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
}

header {
  width: 100%;
  background: #218380;
  display: Flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  padding: 20px;
  color: #ffffff;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #ffffff;
}

main {
  width: 60%;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 5px 2px 7px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 20px 10px 20px 20px;
  margin: 130px auto auto auto;
}

.high-scores {
  padding: 30px 20px 20px 30px;
  width: 300px;
}

h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

p {
  margin: 10px 0px;
  padding-right: 7px;
}

table {
  table-layout: fixed;
  width: 60%;
}

tr:nth-child(even) {
  background-color: rgba(33, 131, 128, 0.5);
}

tr:nth-child(odd) {
  background-color: rgba(33, 131, 128, 0.6);
}

td {
  border-radius: 5px;
}

td,
th {
  padding: 20px;
}

td.shrink {
  word-break: break-all;
}

th {
  text-align: left;
}

button {
  background: #218380;
  height: 40px;
  width: 90px;
  border-radius: 5px;
  border: none;
  color: #ffffff;
  padding: 10px;
  margin-top: 5px;
  margin-right: 10px;
  font-size: 15px;
}

.start {
  margin: 10px 0;
}

#clear-highscores {
  width: 120px;
}

.high-scores {
  width: 80%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.score-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

li {
  cursor: pointer;
}

.quiz-question {
  margin-bottom: 10px;
}

.answer {
  background: #218380;
  width: 100%;
  /* height: 35px; */
  margin-bottom: 5px;
  border-radius: 5px;
  padding: 7px;
  padding-left: 10px;
  color: #ffffff;
}

.right-answer {
  border-top: 1px solid rgba(0, 0, 0, 0.8);
  padding: 15px 0 15px 5px;
  height: 40px;
  background-color: rgba(0, 128, 0, 0.5);
}

.wrong-answer {
  border-top: 1px solid rgb(0, 0, 0);
  padding: 15px 0 15px 5px;
  height: 40px;
  background-color: rgba(255, 0, 0, 0.5);
}

.name-alert {
  background-color: rgba(255, 0, 0, 0.5);
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

/* .correct{
    background-color: rgba(0,128,0, 0.5);
}

.wrong{
    background-color: rgba(255,0,0, 0.5);
} */

.hide {
  display: none;
}

.end {
  padding: 20px;
}

.more {
  background: #218380;
  border-radius: 5px;
  padding: 10px;
  margin: 5px 0;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.button-container a {
  background: #218380;
  height: 40px;
  width: 90px;
  border-radius: 5px;
  border: none;
  color: #ffffff;
  padding: 10px;
  margin-top: 5px;
  margin-right: 10px;
  font-size: 15px;
}

.user-details {
  margin-top: 5px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  border-radius: 5px;
  flex-direction: column;
  gap: 2px;
}

input {
  width: 170px;
  height: 30px;
}

#submit {
  border-radius: 5px;
}

.highscores-list {
  margin: 20px 0;
}

/* ----------------------------------------------Admin-section--------------------------------------------- */

.admin table{
  width:90%;
}

.dashboard {
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.admin main {
 
}

textarea{
  width: 75%;
}

.addQuestions input {
  width: 75%;
}

.addQuestions {
  display: flex;
  flex-direction: column;
  justify-content:center;
  align-items:center
}

.admin h1,
.admin h2 {
  margin: 35px 0;
  display: flex;
  justify-content:center;
  align-items:center
}

.admin h4 {
  font-size: 15px;
}


.question-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width:100%;
}


.actions {
  display: flex;
  gap: 10px;
  margin: 7px 0;
}

.admin button {
  width: 130px;
  margin: 15px 0;
  cursor: pointer;
  
}

.small {
  width: 10%;
}

form div {
  margin: 25px 0;
  display: flex;
  flex-direction: column;
}
label {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.errors {
  border-radius: 5px;
  background: rgba(255, 0, 0, 0.4);
}

.errors li {
  list-style: none;
  margin-bottom: 5px;
  padding: 5px;
}

.admin .add_questions{
  display: flex;
  justify-content:center;
  align-items:center;
  gap:10px;
}

/* ---------------------------------------------Media-Queries----------------------------------------------- */

@media only screen and (max-width: 956px) {

  textarea{
    width: 80%;
  }
  
  .addQuestions input {
    width: 80%;
  }
  
  .admin main{
    width: 80%;
  }

  .admin table{
    width:99%;
  }
}

@media only screen and (max-width: 786px) {
  .admin main{
    width: 90%;
  }  

  main {
    width: 60%;
    padding: 40px 30px 40px 40px;
  }

  h1 {
    margin-top: 18px;
  }
  p {
    padding-right: 0px;
  }

  table {
    width: 90%;
  }
  .shrink-3 {
    display: none;
  }
}

@media only screen and (max-width: 500px) {
  main {
    width: 95%;
    padding: 10px;
    margin: 10px;
    margin: 130px 10px auto 10px;
  }
  .admin main{
    width:97%;
  }

  .action-heading {
    padding: 2px;
  }

  h1 {
    margin-top: 18px;
  }
  p {
    padding-right: 0px;
  }

  .button-container {
    flex-direction: column;
    margin: 10px 0;
  }

  table {
    width: 100%;
  }

  .admin td:nth-of-type(2){
    column-span:1
  }

  .score-container td:nth-of-type(4),
  .score-container th:nth-of-type(4) {
    display: none;
  }
  /* .shrink-3 {
    display: none;
  } */
  .actions {
    flex-direction: column;
  }
  
}

@media only screen and (max-width: 350px) {
  .score-container td:nth-of-type(3),
  .score-container th:nth-of-type(3) {
    display: none;
  }

  .admin .add_questions{
    flex-direction: column;
  }
}
