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

body {
  font-family: Rubik, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #004894, #0097d8);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  color: white;
}

.head {
  display: flex;
  justify-content: space-between;
}

header h1 {
  font-size: 2em;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
}

/* Title */
header h1 a:link,
header h1 a:visited,
header h1 a:hover,
header h1 a:active {
  text-decoration: none;
  color: white;
}

.menu {
  overflow: auto;
  white-space: nowrap;
  text-align: center;
}

.menu a {
  display: inline-block;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0px 12px;
  color: #fff;
  text-decoration: none;
}

.menu a:hover {
  background-color: #71b2ee;
}

.menu a .notification {
  padding: 2px 5px 0px 5px;
  position: relative;
  top: -5px;
  border-radius: 50%;
  background: red;
  color: white;
}

.titles {
  margin-top: 5px;
  color: #0063cd;
}

.login-button {
  margin: auto 0;
}

.login-form {
  padding: 20px;
}

/* Buttons, inputs, forms display */
select {
  -webkit-appearance: none;
  appearance: none;
  text-align: center;
}

button,
input,
select {
  background-color: #f8f9fa;
  color: #333;
  max-width: 100%;
  border: solid black 1px;
  padding: 6px 12px;
  margin: 5px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 8px;
}

button.edit-match,
button.submit-button {
  background-color: #80b8f4;
}

input.edit-score {
  text-align: center;
}

button.cancel-button {
  background-color: #ffb5b5;
  color: #b20000;
}

button.edit-match,
button.cancel-button {
  border: 0;
}

button.delete-button {
  border: 0;
}

input.edit-score {
  max-width: 100px;
}

input.question {
  min-width: 300px;
}

button:hover,
select:hover {
  background-color: #e2e6ea;
}

#search-form {
  max-width: 300px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
}

#search-form button,
#search-form input,
#search-form select {
  width: 95%;
}

/* Main content */
.container {
  padding: 20px;
}

.div-central {
  padding: 20px;
}

/* Login and admin pages */
.login-container,
.challenge-container,
.deco-container {
  border: #616161 solid 1px;
  border-radius: 16px;
  background-color: #fff;
}

.login-container,
.challenge-container {
  max-width: 60%;
  margin: 50px auto;
  padding: 50px;
  text-align: center;
}

.deco-container {
  margin: 20px 10px;
  padding: 20px 40px;
}

/* Matches display */
.matches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 40px 20px;
  margin: 0 auto;
}

.match {
  width: 400px;
  text-align: center;
  background-color: #fff;
  margin: 20px;
  padding: 15px 5px;
  border-radius: 16px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.match.mine {
  border: solid #4e8bd5 2px;
}

.match.match-bonus {
  border: solid #e73c3c 2px;
}

.match:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.shortcut:link,
.shortcut:visited,
.shortcut:hover,
.shortcut:active {
  text-decoration: none;
}

.shortcut:hover {
  border-bottom: 2px solid #e73c3c;
}

.match-score {
  color: #2971b9;
}

.div-match-score {
  margin-bottom: 15px;
}

.match-score-title {
  font-size: 1.8em;
  border-radius: 8px;
  margin: 0 auto;
}

.score {
  font-weight: bold;
  color: #e73c3c;
}

.score-hidden {
  filter: blur(5px);
}

.username {
  color: black;
  margin: 0px 5px;
}

.div-container,
.edit-form {
  background-color: #ecf0f1;
  border-radius: 8px;
}

.div-container,
.edit-form,
.filters {
  padding: 5px;
  margin-top: 5px;
  font-style: italic;
  text-align: center;
}

.div-container p {
  margin: 5px;
}

.match-date {
  /*color: #e73c3c;*/
  padding: 6px;
}

.match-update-date {
  color: rgb(113, 111, 120);
  font-size: small;
}

.logo-parent {
  position: relative;
}

.logo-bonus {
  position: absolute;
  top: -10px;
  left: 0px;
}

.logo-team {
  padding-top: 5px;
}

.delete-match {
  position: absolute;
  top: -10px;
  right: 0px;
}

.rank-title {
  text-align: center;
}

.rank-container {
  padding: 20px;
  margin: 40px auto;
}

/* HTML table display */
.table {
  border-collapse: collapse;
  width: 50%;
  text-align: center;
}

.table-rank {
  margin: auto;
}

.table-admin {
  width: 90%;
}

.table thead tr th {
  background-color: #0063cd;
  color: white;
  height: 40px;
}

.table tbody tr td {
  background-color: white;
  border-top: 1px solid #989898;
  height: 35px;
}

.table tr:first-child th:first-child {
  border-top-left-radius: 8px;
}
.table tr:first-child th:last-child {
  border-top-right-radius: 8px;
}
.table tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}
.table tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

/* Modal background */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 100;
  /* Sits on top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  /* Semi-transparent background */
}

/* Modal content (form) */
.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 50px;
  border: 1px solid black;
  width: 40%;
  border-radius: 8px;
  z-index: 101;
}

/* Style for submit button */
.modal-content button,
.modal-content input[type=text] {
  width: 80%;
}

.modal-content button,
.modal-content form,
.modal-content input {
  margin: 5px auto;
}

.flex {
  display: flex;
  justify-content: center;
}

/*
footer {
  text-align: center;
  background-color: #0063cd;
  color: white;
  padding: 15px 0;
  position: relative;
  bottom: 0;
  width: 100%;
  font-size: 0.9em;
}

footer p {
  margin: 0;
}
*/

@media screen and (max-width: 768px) {
  body {
    line-height: 1.2;
  }

  header {
    padding: 8px;
    background: none;
    background-color: #004894;
  }

  header h1 {
    font-size: 1.4em;
  }

  .menu {
    margin: 10px 0px;
  }

  .login-button {
    margin: auto 0;
    position: absolute;
    top: 5px;
    right: 0px;
  }

  .container {
    padding: 10px;
  }

  .matches {
    padding: 0px;
  }

  .match {
    width: 100%;
    max-width: none;
    padding: 10px 10px;
    margin: 5px;
  }

  .match-score-title {
    font-size: 1.6em;
  }

  .logo-bonus {
    top: -5px;
    left: -5px;
    width: 30px;
    height: 30px;
  }

  .modal-content {
    background-color: white;
    margin: 50px 10px;
    width: auto;
    padding: 15px;
  }

  .rank-container {
    padding: 0px;
  }

  .table {
    width: 100%;
  }

  .login-container {
    max-width: 90%;
  }

  .challenge-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
  }

  .deco-container {
    margin: 15px 5px;
    padding: 10px 20px;
  }

  button,
  input,
  select {
    font-size: default;
  }

  #search-form button,
  #search-form input,
  #search-form select {
    width: 90%;
  }
}