/* Imports Roboto font in case it doesn't already exist on the user's computer */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* TEXT STYLES */

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100vh;
    margin: 0;
    padding: 4vw 2vw;
    box-sizing: border-box;
}

h1 {
    font-weight: 700;
    padding: 0px;
}

p {
  font-weight: 400;
  line-height: 1.5; /* More legible text */
}

.line-wrap {
    line-height: 25%;
}

/* DIV STYLES*/

.header {
    width: 30%;
    margin-left: auto; 
    margin-right: auto;
    text-align: center;
}

#header-with-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 15px;
}

#header-title {
    flex: 4 1 90%;
    margin: 0;
}

#header-menu {
    flex: 1 2 10%;
}

.content {
    width: 30%;
    margin-left: auto; 
    margin-right: auto;
    text-align: center;
}

.footer {
    width:30%;
    display:flex;
    align-items: center; 
    justify-content: center;
    flex-direction: column-reverse;
    margin-left:auto;
    margin-right:auto;
    font-size: 10pt;
    font-style: italic;
}
.footer p {
  margin: 0.5em 0 0 0;
}

#social-icons-flexbox {
    display: flex;
    width:40%;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    font-size: 14pt;
}

.score-banner {
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 0 20px;
    margin: 20px 0 0 0 ;
}

#total-count {
    flex-grow: 2;
    margin:10;
}
#correct-count {
    flex-grow: 2;
    margin:10;

}

/* TABLE */

table {
    text-align: left;
    text-justify: inter-word;
    width: 80%;
    margin-left: auto; 
    margin-right: auto;    
}

td {
    padding: 0px 10px 10px 10px;
    font-weight: 400;

}

/* TEXT DECORATIION */

.error {
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: red;
    text-decoration-thickness: 1px;
    text-underline-offset: 10%;
}

.boxed {
    border: 1px black solid;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 5px 5px 0px black;
}

.boxed-black {
    border: 1px black solid;
    padding: 10px;
    border-radius: 5px;
    background-color: black;
    color: white;
    margin: 1.5em 0 0.5em 0;
}


/* BUTTONS */

a {
    text-decoration: none;
    color: black;
}

.btn {
    color: black;
    padding: 10px 30px 10px 30px;
    width:fit-content;  
    margin-left: auto;
    margin-right: auto;
}

@media (hover: hover) {
    .btn.boxed:hover {
        transform: translate(5px, 5px);
        box-shadow: 0px 0px 0px black;
        transition: .1s;
    }
}

.social-icon:hover {
    color: red;
    transition: .2s;
}

/* KEYBOARD */
#keyboard-cont {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 10px;
    gap: 5px;
    line-height: 1.5;
    width: 100%;
}
#keyboard-cont div {
    display: flex;
    justify-content: center;
    gap:5px;
    line-height:1.5;
    width: 100%;
    box-sizing: border-box;
}
.keyboard-button {
    flex: 1 1 0;
    min-width: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.fourth-row{
    padding: 0px 0 0px 0;
}

.fifth-row{
    padding: 20px 0 20px 0;
}

.keyboard-button {
    cursor: pointer;
    color: black;
    font-family: 'Roboto Mono', monospace;
    background-color: white;
    line-height: 1.5;
    font-size:12pt;
    touch-action: manipulation;
    flex: 1 1 0px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 3px 3px 0px black;
}

.keyboard-button.clicked {
    transform: translate(2px,2px);
    box-shadow: 0px 0px 0px black;
}

.keyboard-button.pending-accent {
    background-color: hsl(54, 83%, 67%);
    transform: translate(2px,2px);
    box-shadow: 0px 0px 0px black;
}

/* ATTEMPT ENTRY */

#attempt-box {
    width: 75%;
    border: 2px black solid;
    border-radius: 5px;
    background-color: white;
    font-family: 'Roboto Mono', monospace;
    font-size: 16pt;
    color: black;
    padding: 10px 15px;
    line-height: 2;
    text-align: center;
    box-shadow: 3px 3px 0px black;
    transition: all 0.2s ease;
}

#attempt-box:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25), 3px 3px 0px black;
    transform: translate(-1px, -1px);
}

#attempt-box[readonly] {
    caret-color: transparent;
}

/* Input container and submit button */
#input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

#submit-btn {
    padding: 10px 20px;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 14pt;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
}

/* NEXT ROUND BUTTON */
#next-round-btn {
    margin: 0 0 20px 0;
}

/* ATTEMPT BOXES */

#word-prompts {
  display: flex;
  flex-direction: row;
  gap: 10px; 
  margin: 10px 0 10px 0;
}

.prompt {
  flex: 1 1 0px;
  padding: 10px;
  aspect-ratio: 1/1;
  align-items: center;
  margin: 5px 5px 1rem 5px;
  position: relative;
}
.prompt::before { /* Center the play icon */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.prompt.clicked {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px black;
}

/* PRACTICE MODE */
#practice-prompt {
    display: flex;
    flex-direction: row;
    column-gap: 10px;
    margin: 15pt 0 15pt 0;
}

#end-game-btn {
    border-radius: 50px;
}