:root {
    /* Declare custom properties here */
    --main-color: #123123;
}

body {
    font-family: 'Slackside One', -apple-system, BlinkMacSystemFont, Roboto, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    min-height: calc(100vh + 100px);
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    max-height: 100%;
}

.header {
    /* background-color: antiquewhite; */
    height: 120px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modes input styling */
.mode-dropdown {
    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;
}

.mode-dropdown > label {
    padding: 10px; 
    
    text-transform: uppercase;
    font-size: 28px;

}

.mode-dropdown > select {
    font-family: 'Slackside One', -apple-system, BlinkMacSystemFont, Roboto, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 20px;

    min-width: 200px;
    padding: 2px;

    text-align: center;

    border: 0;
    border-bottom: 1.5px solid black;

    background-color: transparent;
}
.mode-dropdown > select:focus {
    outline: none;
}

.content {
    flex: 1;
}

.content > p {
    text-transform: uppercase;
}

/* Gameboard Grid */
.content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* border: 1px solid blue; */
}

/* Header */
.gameboard-head {
    width: 500px;
    display: flex;
    align-items: center;

    padding-bottom: 15px;

    transition: all 0.3s;
}

/* Head X and O Button Styling */
.head-x, .head-o {
    width: 50%;
    font-family: "Slackside one", sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    color: #000;
    background-color: white;
    cursor: pointer;
    border: 3px solid;
    padding: 0.25em 0.5em;
    box-shadow: 0px 0px 0px 0px;
    top: 5px;
    left: 5px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.head-x:active, .head-o:active, .player-active {
    box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
    top: 0px;
    left: 0px;
}


/* Gameboard grid container */
.gameboard {
    display: flex;
    /* border: 3px solid #e63946; */
    transition: all 0.3s;
    flex-wrap: wrap;
    height: 500px;
    width: 500px;


}

.grid-unit {
    background-color: white;

    font-size: 36px;
    flex: auto;
    outline: 3px solid black;
    
    display: flex;
    justify-content: center;
    align-items: center;

    position: relative;

    cursor: pointer;

    caret-color: transparent;

}

/* Restart button */

.restart-wrapper {
    height: 150px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.restart {
  align-self: center;
  background-color: #fff;
  background-image: none;
  background-position: 0 90%;
  background-repeat: repeat no-repeat;
  background-size: 4px 3px;
  border-radius: 15px 225px 255px 15px 15px 255px 225px 15px;
  border-style: solid;
  border-width: 2px;
  box-shadow: rgba(0, 0, 0, .2) 15px 28px 25px -18px;
  box-sizing: border-box;
  color: black;
  cursor: pointer;
  display: inline-block;
  font-family: 'Slackside One', sans-serif;
  font-size: 1.1rem;
  line-height: 23px;
  outline: none;
  padding: .75rem;
  text-decoration: none;
  transition: all 235ms ease-in-out;
  border-bottom-left-radius: 15px 255px;
  border-bottom-right-radius: 225px 15px;
  border-top-left-radius: 255px 15px;
  border-top-right-radius: 15px 225px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.restart:hover {
  box-shadow: rgba(0, 0, 0, .3) 2px 8px 8px -5px;
  transform: translate3d(0, 2px, 0);
}

.restart:focus {
  box-shadow: rgba(0, 0, 0, .3) 2px 8px 4px -6px;
}

/* Result Modal Styling */
dialog::backdrop {
    opacity: 0.9;
}

.result {
    width: 50%;
    height: 30vh;

    border: 3px solid black;
}

/* result modal flex to be run only when displayed */
.result-displayed {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.result-text {
    margin-bottom: 30px;
    font-size: 42px;
}

/* Footer */
.footer {
    background-color: #eeeeee;
    color: black;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;

    font-weight: 100;
}

.github-logo {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.github-a img{
    opacity: 0.5;
    transition: all 300ms;
}

.github-a img:hover {
    opacity: 1;
    transform: rotate(360deg) scale(1.2);
}


/* Mobile Responsiveness */
@media only screen and (max-width: 550px) {
    .gameboard-head {
        width: 300px;
    }

    .gameboard {
        width: 300px;
        height: 300px;
    }
    
    .grid-unit {
        font-size: 26px;
    }
    
}