* {
  font-family: 'Montserrat', sans-serif;
  color: #ECF0F1;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

hr {
  border: none;
  height: 0.3px;
  background-color: #ECF0F1;
}

/*========== Navigation Bar ==========*/
header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 10%;
  background-color: #24252A;
  z-index: 100;
  box-shadow: 0 0 20px #303f56;
}

header a {
  margin-right: auto;
}

.logo {
  cursor: pointer;
  width: 250px;
}

nav .nav_links {
  padding: 0;
  display: flex;
}

nav li {
  list-style: none;
  padding: 1rem;
}

nav li a {
  font-weight: 500;
  font-size: 0.95rem;
  display: block;
  text-decoration: none;
}

nav .active {
  color: #457b9d;
}

nav li a:hover {
  color: #457b9d;
  transition: 0.3s ease 0s;
}

.account-buttons button {
  margin-left: 20px;
  width: 105px;
}

button,
.button {
  border: none;
  border-radius: 40px;
  background-color: rgba(238, 108, 77, 1);
  font-size: 14px;
  padding: 9px 20px;
  letter-spacing: 1px;
  color: #24252A;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover {
  background-color: rgba(238, 108, 77, 0.5);
  color: #fec89a;
  transition: 0.3s ease 0s;
}

.toggle-button {
  position: absolute;
  top: 1.6rem;
  right: 10%;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.toggle-button .bar {
  height: 3px;
  width: 100%;
  background-color: #ECF0F1;
  border-radius: 10px;
}

/* Button Display */
.account-buttons {
  display: flex;
}

.account-menu {
  display: none;
}

/*========== User Profile ==========*/
.profile {
  margin-left: 20px;
  border: 5px solid rgba(238, 108, 77, 1);
  background-color: rgba(238, 108, 77, 0.5);
  border-radius: 40px;
  padding: 9px 20px;
  letter-spacing: 1px;
  font-size: 14px;
  color: #e9d8a6;
  font-weight: bolder;
  cursor: pointer;
}

.profile:hover {
  background-color: rgba(238, 108, 77, 0.3);
  text-shadow: 0 0 0.2em #1da9cc;
  transition: 0.3s ease 0s;
}

/*========== Login-SignUp & Profile page ==========*/
.login-popup {
  width: 100%;
  height: 100%;
  background-color: rgba(36, 37, 42, 0.9);
  position: absolute;
  top: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.signup-popup {
  width: 100%;
  height: 100%;
  background-color: rgba(36, 37, 42, 0.9);
  position: absolute;
  top: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.profile-popup {
  width: 100%;
  height: 100%;
  background-color: rgba(36, 37, 42, 0.9);
  position: absolute;
  top: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.login-page,
.signup-page,
.profile-page {
  width: 300px;
  height: 400px;
  background-color: #e9ecef;
  border-radius: 15px;
  text-align: center;
  padding: 20px;
  position: relative;
  display: grid;
}

.login-page img,
.signup-page img,
.profile-page img {
  margin: auto;
  width: 100px;
}

label {
  color: #24252A;
  font-weight: bold;
}

.note {
  font-size: 9px;
}

input {
  width: 230px;
  height: 30px;
  display: block;
  margin-bottom: 15px;
  margin-left: auto;
  margin-right: auto;
  color: #24252A;
  font-size: 16px;
  padding: 10px;
  border-radius: 5px;
}

.close {
  position: absolute;
  top: 0;
  right: 15px;
  font-size: 50px;
  transform: rotate(45deg);
  color: #24252A;
  cursor: pointer;
}

main {
  min-height: 100%;
  background-color: #262932;
  padding: 30px 10%;
  padding-bottom: 5%;
  position: relative;
  width: 100%;
}

footer {
  background-color: #293241;
  position: relative;
  height: 35px;
  margin-top: -35px;
  clear: both;
  padding: 10px;
  text-align: center;
  letter-spacing: 1px;
}

/*========== Home Page ==========*/
.background {
  position: absolute;
  right: 0;
  width: 100%;
  height: 100vh;
  opacity: 10%;
}

.home {
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home .textbox {
  position: relative;
  width: 800px;
  letter-spacing: 1px;
  font-size: 100%;
  z-index: 10;
}

.home .textbox h1 {
  color: #fec89a;
}

.home .textbox h1 span {
  font-size: 2em;
  font-weight: bold;
  color: #fffcf2;
}

.home .textbox p {
  max-width: 150%;
}

.home .imgBox {
  width: 600px;
  display: flex;
  justify-content: flex-end;
  z-index: 9;
}

.home .imgBox img {
  max-width: 100%;
}

.textbox, .imgBox {
  opacity: 0;
  animation: floatIn 3.2s ease forwards;
}

@keyframes floatIn {
  from {
    transform: translateY(-35%);
  }

  to {
    opacity: 1;
    transform: translateX(0%);
  }
}

/*========== Basic & Opening Page ==========*/
.headings {
  font-size: 100%;
  text-align: center;
  display: grid;
}

.headings h1 {
  opacity: 0;
  animation: floatIn 1s ease forwards;
}

.headings p {
  margin: auto;
  max-width: 65%;
  opacity: 0;
  animation: floatIn 1.2s ease 0.5s forwards;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
  display: grid;
}

.col-md-4 .piece {
  width: 60%;
  margin: auto;
}

.col-md-4 .title {
  font-size: 250%;
  margin: auto;
}

.mb-3 {
  background-color: #555b6e;
  border-radius: 30px;
  padding: 20px;
  font-size: 100%;
}

.mb-3:hover {
  box-shadow: 0 0 15px #abc4ff;
  transition: 0.5s ease 0s;
}

h2 {
  font-size: 25px;
  text-align: center;
  padding: 10px;
}

iframe {
  margin: auto;
  border-radius: 30px;
  border: 2px solid black;
  display: inline-block;
  max-width: 100%;
  max-height: 100%
}

/* .backTop {
  display: block;
  background-color: #DC3545;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  position: fixed;
  bottom: 50px;
  right: 3%;
  opacity: 80%;
}

.backTop img {
  width: 40px;
  height: 40px;
  padding: 13px 7.5px;
}

.backTop:hover {
  cursor: pointer;
  transition: 0.5 ease;
  opacity: 100%
} */
#goTop {
  display: none;
  background-color: #DC3545;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 4px;
  position: fixed;
  bottom: 20px;
  right: 30px;
  opacity: 80%;
  z-index: 99;
  cursor: pointer;
}

#goTop img {
  width: 30px;
  height: 18px;
  margin: auto;
}

#goTop:hover {
  transition: 0.5 ease;
  opacity: 100%
}

/*========== Play Page ==========*/
.box {
  display: grid;
}

.chessboard {
  position: relative;
  justify-content: center;
  align-items: center;
}

.footer {
  display: grid;
}

.footer p {
  margin: auto;
}

.footer span {
  background-color: #FAFAF6;
  color: #24252A;
  text-align: center;
  padding: 2px 5px;
  border-radius: 3px;
}

/*========== Grandmasters Page ==========*/
.headings h2 {
  font-weight: 200;
  font-size: 22px;
  opacity: 0;
  animation: floatIn 1.2s ease 0.5s forwards;
}

/*Tool Tip for chess modes*/
.tooltip {
  font-size: 12px;
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip a {
  font-weight: bold;
  color: #F1EFE4;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: black;
  text-align: center;
  border-radius: 8px;
  padding: 5px;
  position: absolute;
  z-index: 10;
}

.hyperlinks:hover {
  color: #457b9d;
  transition: 0.3s ease 0s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  bottom: 100%;
  left: 100%;
}

.players a {
  text-decoration: none;
}

.players thead tr th .active {
  color: #457b9d;
}

.players tbody tr .active {
  color: #BFFBFB;
}

/*Tool Tip for title tag*/
.titles {
  background-color: #b33430;
  width: 35px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
  font-weight: bolder;
  padding: 2px 3px;
  position: relative;
  display: inline-block;
  cursor: default;
}

.woman {
  width: 45px;
}

.titles:hover {
  box-shadow: 0 0 5px white;
  transition: 0.2s ease 0s;
}

.titles .tooltiptext {
  visibility: hidden;
  width: 100px;
  background-color: black;
  text-align: center;
  border-radius: 8px;
  padding: 5px;
  position: absolute;
  z-index: 10;
}

.titles:hover .tooltiptext {
  visibility: visible;
  bottom: 100%;
  left: 100%;
  margin-left: -70px;
}

th, td {
  padding: 10px;
}

thead, tfoot {
  background-color: #232430;
}

table th, tfoot td {
  color: #F1EFE4;
}

tbody tr:nth-child(odd) {
  background-color: #313343;
}

tbody tr:nth-child(even) {
  background-color: #2C2E3A;
}

.players tr td:nth-child(2) {
  width: 280px;
}

.players tr td:nth-child(4),
tr td:nth-child(5),
tr td:nth-child(6) {
  width: 100px;
}

.players tbody tr td:nth-child(1),
tr td:nth-child(4),
tr td:nth-child(5),
tr td:nth-child(6) {
  text-align: center;
}

.hyperlinks {
  font-size: 16px;
}

table tfoot tr td span {
  float: right;
  color: #F1EFE4;
}

table tfoot {
  font-size: 10px;
}

.elo {
  margin-left: auto;
  margin-right: auto;
}

.elo .rating {
  text-align: center;
  background-color: #272937 !important;
}

.tables {
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

#show {
  width: 100%;
  position: relative;
  background-color: rgba(85, 91, 110, 0.3);
  border-radius: 5px;
  padding: 5px 10px;
}

#show:hover {
  background-color: rgba(85, 91, 110, 0.4);
  cursor: pointer;
  transition: 0.3s ease;
}

#show h3 {
  font-weight: normal;
}

#show h3 span {
  position: absolute;
  font-size: 20px;
  font-weight: bolder;
  right: 15px;
}

.table {
  display: none;
}

/*========== Responsive ==========*/
@media (max-width: 1200px) {
  .toggle-button {
    display: flex;
  }

  nav {
    display: none;
    width: 100%;
  }

  nav .nav_links {
    margin-top: 20px;
  }

  nav .active {
    background-color: #222222;
    border-radius: 40px;
  }

  nav li a:hover {
    background-color: #222222;
    border-radius: 40px;
    transition: 0.3s ease 0s;
  }

  header {
    outline: 1px solid white;
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    width: 100%;
    flex-direction: column;
  }

  nav li {
    text-align: center;
    padding: 0;
  }

  nav li a {
    padding: 0.8rem 1rem;
  }

  nav.active {
    display: flex;
  }

  .account-buttons {
    position: absolute;
    top: 20px;
    right: 15%;
  }

  .account-menu {
    position: absolute;
    top: 15px;
    right: 15%;
  }

  /* ========== Responsive Table ========== */
  .elo thead {
    display: none;
  }

  .players thead {
    position: relative;
  }

  .players thead th {
    text-align: left;
  }

  .players thead th:first-child,
  .players thead th:nth-child(2),
  .players thead th:nth-child(3) {
    display: none;
  }

  .players thead th:nth-child(4),
  .players thead th:nth-child(5),
  .players thead th:nth-child(6) {
    display: inline-block;
    background-color: #272937;
  }

  .tables {
    width: 100%;
  }

  .players {
    margin-left: auto;
    margin-right: auto;
  }

  .players tbody tr td:first-child {
    text-align: left;
    color: #B7B6B2;
  }

  .players tr td:nth-child(2),
  .players tr td:nth-child(3),
  .players tr td:nth-child(4),
  .players tr td:nth-child(5),
  .players tr td:last-child {
    width: 100%;
    text-align: right;
  }

  td {
    display: block;
  }

  td:first-child {
    background-color: #232430;
  }

  .players td:nth-child(2), tr {
    /* outline: 1px solid white; */
  }

  .players tbody td:first-child::before {
    content: "Rank #";
    color: #B7B6B2;
    float: left;
    letter-spacing: 2px
  }

  .players td:nth-child(2)::before {
    content: "Name: ";
  }

  .players td:nth-child(3)::before {
    content: "Country: ";
  }

  .players td:nth-child(4)::before,
  .players td:nth-child(5)::before,
  .players td:nth-child(6)::before {
    content: "Ratings: ";
  }

  .players tbody .active:nth-child(4),
  .players tbody .active:nth-child(5),
  .players tbody .active:nth-child(6) {
    display: block;
  }

  .players tbody .normal:nth-child(4),
  .players tbody .normal:nth-child(5),
  .players tbody .normal:nth-child(6) {
    display: none;
  }

  .players td::before {
    color: #F1EFE4;
    font-weight: bold;
    float: left;
  }

  .elo tbody td {
    background-color: #313343;
    text-align: center;
  }

  .elo .rating::before {
    content: "Min. Rating: ";
    color: #B7B6B2;
    font-weight: bold;
  }

  .elo .rating {
    background-color: #272937 !important;
    color: #F1EFE4;
  }
}

@media (max-width: 800px) {
  .account-buttons {
    position: static;
    margin: auto;
  }

  .account-menu {
    position: absolute;
    top: 15px;
    right: 17%;
  }

  .account-buttons button {
    margin-left: 0;
  }

  .account-buttons span {
    display: none;
    margin: 10px;
  }

  .account-buttons.active span {
    display: flex;
  }
}

@media (max-width: 750px) {
  .imgBox img {
    display: none;
  }

  .home .imgBox {
    position: absolute;
  }
}

@media (max-width: 530px) {
  .account-menu {
    position: static;
    margin: auto;
  }

  .account-menu .profile {
    margin-left: 0;
  }

  .account-menu span {
    display: none;
    margin: 10px;
  }

  .account-menu.active span {
    display: flex;
  }

  .headings {
    font-size: 80%;
  }
}

@media (max-width: 424px) {
  .headings {
    font-size: 60%;
  }
}

@media (max-width: 375px) {
  .logo {
    width: 80%;
  }

  .toggle-button {
    top: 1.3rem;
  }

  .headings {
    font-size: 50%;
  }
}