/* Sets up a grid for the page as well as other base properties and a background image */
html {
    width: 100%;
    height: 100%;
    margin: auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 3fr 1fr;
    background-image: url(images/bg.jpg);
    background-attachment: fixed;
    background-position: absolute;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
}

/* The body is place in the center of the grid and then utilized a vertical flexbox to place the elements of the body */
body {
    grid-column: 2/3;
    grid-row: 1/3;
    padding: 2em 5em;
    margin: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    border: 5px solid transparent;
    box-shadow: 5px 10px 20px 15px rgba(128, 128, 128, 0.688);
    border-radius: 15px;
    background-color: rgba(0, 163, 222, 0.725);
}

/* the button styling  */
button {
    background-color: rgb(249, 249, 249);
    border: 2px hidden transparent;
    border-radius: 10px;
    color: rgb(0, 146, 204);
    padding: 10px 32px;
    text-align: center;
    transition-duration: .5s;
}

button:hover {
    background-color: rgb(16, 141, 225);
    color: white;
}

/* the footer is placed at the bottom of the page to serve as attribution for the background photo */
footer {
    position: absolute;
    bottom: 0;
    height: 2.5em;
    width: 30%;
    color: gray;
}

a {
    text-decoration: none;
    color: gray;
}

h1, h2 {
    font-family: 'Hachi Maru Pop', cursive;
}

.heading {
    padding-bottom: 0%;
    font-size: 2em;
}

.subheading {
    padding-top: 0%;
    font-size: 1.2em;
    font-style: italic;
}

span {
    font-style: bold;
}

.cursor {
    position: relative;
}

/* this creates a blinking cursor where the word is to be entered, simply to give more life to the site */
.cursor i {
    position: absolute;
    width: .75px;
    height: 30%;
    background-color: rgb(255, 255, 255);
    left: 1.1em;
    top: 1.5em;
    animation-name: blink;
    animation-duration: 900ms;
    animation-iteration-count: infinite;
    opacity: 1;
}

.cursor input:focus + i {
    display: none;
}

@keyframes blink {
    from {opacity: 1; }
    to {opacity: 0; }
}

h1, h2, #word-form, #restart-button, #poem-display {
    padding: 1em;
    align-self: center;
}


#poem-display {
    padding: 2em;
    line-height: 1.6em;
    font-size: large;
}

#word-form {
    align-self: center;
}

:focus {
    outline: none;
    
}

#word-input {
    height: 2em;
    border: none;
    background-color: transparent;
    color: white;
}

#restart-button {
    align-self: center;
    max-width: fit-content;
    max-height: fit-content;
}