/* Format all elements */
* {
  box-sizing: border-box;
}

/* Format the webpage background */
body {
  background: #fff;
  font-family: Inter, Helvetica, Arial, sans-serif;
}

/* Format the game logo */
#logo {
  position: absolute;
  top: 42vh;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: fadeIn 0.6s;
}

#logo h1 {
  color: #8e44ad;
  font-size: 3.8rem;
  font-family: Fondamento, Times, serif;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
}

#logo h2 {
  color: #8e44ad;
  font-size: 2.1rem;
  font-family: Fondamento, Times, serif;
  font-weight: 400;
  line-height: 0.7;
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
}

/* Format the menu tabs */
#tabMenu {
  position: absolute;
  display: none;
  grid-template-columns: auto auto auto auto;
  grid-template-rows: 10px 42px;
  grid-template-areas:
    'empty empty empty empty'
    '. . . .';
  width: 100vw;
  top: 0;
  left: 0;
  animation: fadeIn 1s;
  z-index: 19;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

#tabMenu button {
  color: #333;
  background-color: #d6b8e3;
  text-transform: uppercase;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  border: none;
  border-left: 1px solid #8e44ad;
  border-right: 1px solid #8e44ad;
  outline: none;
  border-radius: 0;
  cursor: pointer;
  float: left;
  transition: color 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  z-index: 20;
}

#tabMenu button:hover {
  color: #fff;
  background-color: #a562c1;
}

#tabMenu button.active {
  color: #fff;
  background-color: #8e44ad;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3), 0 0 15px 0 rgba(0, 0, 0, 0.2);
  z-index: 21;
}

:focus {
  outline: none;
}
::-moz-focus-inner {
  border: 0;
}

#tabMenu #placeholder {
  background-color: #8e44ad;
  grid-area: empty;
  z-index: 22;
}

/* Format the main content area */
#contentBox {
  width: 84vw;
  position: absolute;
  left: 42vw;
  transform: translateX(-50%);
  margin-top: 3rem;
  margin-left: 8vw;
  margin-right: 8vw;
}

.content {
  display: none;
}

.content h1 {
  color: #8e44ad;
  font-size: 1.7rem;
  font-family: Inter, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.2rem;
  text-align: center;
}

.content h2 {
  color: #8e44ad;
  font-size: 1rem;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-weight: 500;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  text-align: center;
}

.content div {
  color: #8e44ad;
  font-weight: 500;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 1.2rem;
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0.2rem;
}

.content>div {
  width: 100%;
}

a {
  color: #8e44ad;
}

hr {
  width: 100%;
  color: #8e44ad;
  margin-top: 3rem;
}

/* Format the inputs and buttons */
.content input {
  color: #5c2c70;
  background-color: #f4f4f4;
  font-size: 16px;
  font-family: Inter, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  text-align: left;
  height: 56px;
  width: 300px;
  border: 1px solid #8e44ad;
  margin-bottom: 16px;
  padding: 16px;
  transition: color 0.2s, background .2s ease-in-out;
}

.content input::placeholder {
  text-transform: initial;
  font-size: 16px;
  line-height: 24px;
}

.content input:focus {
  border: 1px solid #5c2c70;
}

.content input.invalid {
  color: #ff2200;
  background-color: #ffd3cc;
  border: 1px solid #ff2200;
}

.content input.ready {
  color: #4caf50;
  background-color: #d9eed9;
  border: 1px solid #4caf50;
}

.content button {
  color: #fff;
  background-color: #ac6fc6;
  font-size: 24px;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-weight: 500;
  border: none;
  outline: none;
  border-radius: 0;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2), 0 0 15px 0 rgba(0, 0, 0, 0.1);
  padding: 5px 10px;
  margin-top: 10px;
  cursor: pointer;
  transition: color 0.2s ease-in-out, background .2s ease-in-out;
}

.content button:hover {
  background-color: #8e44ad;
}

.content button:disabled {
  background-color: #8e44ad;
  cursor: auto;
}

.content button.ready {
  background-color: #4caf50;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
}

/* Format specific items */
#startMenu {
  animation: fadeIn 0.6s;
}

#haveCode {
  animation: fadeIn 0.6s;
}

#needCode {
  max-width: 750px;
  animation: fadeIn 0.6s;
}

#gameStartText {
  animation: fadeIn 0.6s;
}

#instructions {
  animation: fadeIn 0.6s;
  margin-bottom: 2rem;
}

.content .text {
  display: inline-block;
  max-width: 750px;
}

#codebox {
  color: #4caf50;
  background-color: #d9eed9;
  font-size: 22px;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-align: left;
  height: 56px;
  width: 300px;
  border: 1px solid #4caf50;
  margin-bottom: 16px;
  padding: 16px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

#guildLogo {
  margin-top: 2vh;
  width: 100px;
}

/* Define style for the square input form */
#form-container {
  position: absolute;
  width: 300px;
  left: 50%;
  transform: translateX(-50%);
}

.third {
  float: left;
  width: calc((100% - 32px) / 3);
  padding: 0;
  margin: 0 16px 16px 0;
}

.third:last-of-type {
  margin-right: 0;
}

.sq-input {
  height: 56px;
  color: #5c2c70;
  box-sizing: border-box;
  border: 1px solid #8e44ad;
  background-color: #f4f4f4;
  border-radius: 0;
  display: inline-block;
  transition: border-color .2s ease-in-out;
}

.sq-input--focus {
  border: 1px solid #5c2c70;
}

.sq-input--error {
  border: 1px solid #ff2200;
  background-color: #ffd3cc;
}

#sq-card-number {
  margin-bottom: 10px;
}

#sq-creditcard {
  margin-bottom: 2rem;
}

/* Format the notepad elements */
.content .iconGrid {
  position: absolute;
  display: grid;
  grid-template-columns: 160px 160px 160px 160px;
  grid-template-rows: 160px 160px 160px 160px;
  grid-column-gap: 0;
  grid-row-gap: 0;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 2rem;
}

.content .iconSquare {
  background-color: #c193d5;
  border: 6px solid #fff;
  box-shadow: none;
  font-size: 10vw;
  line-height: 0;
  padding: 0;
  margin: 0;
}

.content .selected {
  background-color: #8e44ad;
}

.content .selected:hover {
  background-color: #8e44ad;
  
}

/* Format the overlay */
#overlay {
  position: fixed;
  display: none;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  background-color: rgba(255,255,255,0.5);
  z-index: 100;
}

.center {
  width: 60px;
  height: 60px;
  position: absolute;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
}

.loadingCircle {
  border: 10px solid #f3f3f3;
  border-top: 10px solid #8e44ad;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  position: absolute;
  top: 0;
  left: 0;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile screen adjustments */
@media only screen and (max-width: 800px) {
  .content .iconGrid {
    grid-template-columns: 19vw 19vw 19vw 19vw;
    grid-template-rows: 19vw 19vw 19vw 19vw;
  }
}

/* Very small screen adjustments */
@media only screen and (max-width: 350px) {
  #logo h1 {
    font-size: 16vw;
  }
  
  #logo h2 {
    font-size: 9vw;
  }
  
  #tabMenu button {
    font-size: 5vw;
  }
  
  .content h1 {
    font-size: 10vw;
  }
  
  .content h2 {
    font-size: 6vw;
  }
  
  .content button {
    font-size: 6.5vw;
  }
  
  #codebox {
    font-size: 6.5vw;
    width: 74vw;
  }
}

