@import 'variables.css';

/* General */

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito.woff2') format('woff2');
  font-style: normal;
  font-display: swap;
}

* {
  font-family: "Nunito", sans-serif;
  font-synthesis: none;
}

body {
  background-color: var(--gray);
  font-size: var(--normal-text);
  color: var(--white);
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  padding-top: 92px;
  flex: 1;
  padding-bottom: 32px;
  text-align: center;
}

.tile {
  background-color: var(--black);
  border-radius: var(--large-br);
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  text-align: center;
  height: auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  justify-items: center;
}

#tile,.tile h1 {
  margin-top: 0;
}

#tile,.tile h2 {
  margin-top: 0;
}

/* Images */

img {
  border-radius: var(--small-br);
}

.preview {
  height: 120px;
  width: auto;
  margin-bottom: 24px;
}
/* Header */

.header {
  background-color: var(--black);
  border-bottom: solid var(--gray) 1px;
  width: 100%;
  height: 60px;
  position: fixed;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 14;
}

.logo {
  align-self: flex-start;
  vertical-align: middle;
  height: 35px;
  width: auto;
  cursor: pointer;
  border-radius: 0;
}

.desktopNav {
  gap: 24px;
  display: flex;
}

.mobile-menu {
  display: none;
}

.header nav a {
  font-size: var(--text-size-normal);
  font-family: var(--ui-font);
  display: inline-block;
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
}

.header nav a:hover {
  color: var(--ui-color-hover);
}

.burger {
  display: none;
  cursor: pointer;
  height: 30px;
  width: auto;
  border-radius: 0;
}

footer {
  background-color: var(--black);
  font-size: var(--normal-text);
  color: var(--white);
  padding: 15px 0;
  text-align: center;
  width: 100%;
  bottom: 0;
  border-top: solid var(--gray) 1px;
}

/* Text */

h1 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 8px;
}

h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

p {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0px;
}

.last {
  margin-bottom: 0;
}

/* Link */

a:link {
  color: var(--white);
  text-decoration: none;
}

a:visited {
  color: var(--white);
  text-decoration: none;
}

a:hover {
  color: rgb(142, 142, 147);
  text-decoration: none;
}

/* Button */

.light-button {
  position: relative;
  background-color: transparent;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 100px;
  background-clip: padding-box, border-box;
  background-origin: border-box;
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--gray), var(--gray)),
    linear-gradient(45deg, #008400, #6fff15);
}

.dark-button {
  position: relative;
  background-color: transparent;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 100px;
  background-clip: padding-box, border-box;
  background-origin: border-box;
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--black), var(--black)),
    linear-gradient(45deg, #008400, #6fff15);
}

.light-button:hover, .dark-button:hover {
  border: 2px solid rgb(142, 142, 147);
}

.image-button {
  background-color: var(--black);
  border-radius: var(--pill-br);
  border: solid var(--light-green) 2px;
  font-size: var(--normal-text);
  min-width: 200px;
  text-align: right;
  height: 70px;
  padding-inline: 10px;
  align-items: center;
  color: var(--white);
  margin-inline: 10px;
  transition: all 0.3s;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  max-width: 400px;
}

.image-button .icon {
  border-radius: var(--pill-br);
  flex: 0 0 auto;
  height: 70%;
}

.image-button .icon img {
  border-radius: var(--pill-br);
  height: 100%;
}

.image-button .text {
  flex: 1;
  text-align: center;
  display: flex;
  justify-content: center;
}

.image-button:hover {
  background-color: var(--gray);
  transform: scale(1.1);
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  justify-items: center;
}

/* Chess */

#board {
  margin-bottom: 20px;
  margin-inline: auto;
}

/* Input */

input[type="text"],
input[type="password"] {
  background-color: var(--black);
  border-radius: var(--medium-br);
  border: solid var(--light-green) 2px;
  font-size: var(--normal-text);
  width: 350px;
  cursor: pointer;
  color: var(--white);
  min-width: 90px;
  padding-inline: 25px;
  height: 55px;
  transition: all 0.3s;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: 10px;
}

@media (max-width: 950px) {
  .image-button {
    width: 250px;
  }

  .image-button img {
    scale: 80%;
  }

  h1 {
    width: 90%;
  }

  .preview {
    height: 125px;
    width: auto;
  }
}

@media (max-width: 1025px) {
  header, main, .mobile-menu {
    padding-inline: 5%;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  header, main {
    padding-inline: 10%;
  }
}

@media (min-width: 1441px) {
  header, main {
    padding-inline: calc((100% - 1200px)/2);
  }
}

@media (max-width: 768px) {
  .desktopNav {
    display: none;
  }

  .burger {
    display: block;
    height: 40%;
    width: auto;
  }

  .mobile-menu {
    position: absolute;
    top: 59px;
    left: 0;
    width: 100%;
    background-color: var(--black);
    display: none;
    flex-direction: column;
    align-items: end;
    gap: 16px;
    padding-block: 16px;
    z-index: 15;
    box-sizing: border-box;
    border-bottom: solid var(--gray) 1px;
  }

  .mobile-menu.active {
    display: flex;
  }
}