/* ================= INDEX OF CSS ====================== 
1. Import Google Fonts
2. Css Variables 
3. Reset Css
4. Main Container 
5. Responsive / Media query
=======================================================*/

/* ======= 1. Import Google Fonts ======= */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* ======= 2. Css Variables  ======= */
:root {
  --bg-color: linear-gradient(90deg, #000428, #004e92);
  --txt-color: #fff;
  --font-family: "Poppins", sans-serif;
  --main-color: #004e92;
  --border: 1px solid #888686;
  --success: #267c1c;
  --failure: #d30b11;
}

/* ======= 3. Reset Css  ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  padding: 0 0.625rem;
}
::selection {
  color: var(--txt-color);
  background: var(--main-color);
}

/* ======= 4. Main Container  ======= */
.container {
  width: 48.125rem;
  padding: 2.188rem;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 0.75rem;
  border: 1px solid rgba(209, 213, 219, 0.3);
}
.container h1 {
  text-align: center;
  font-size: 1.875rem;
  line-height: 2.25rem;
  margin-bottom: 1rem;
}
.container i {
  margin-left: 0.5rem;
}
.container .typing_field {
  opacity: 0;
  z-index: -999;
  position: absolute;
}
.container .section {
  padding: 0.813rem 1.25rem 0;
  border-radius: 0.625rem;
  border: var(--border);
}
.container .section .typing_quote {
  overflow: hidden;
  max-height: 16rem;
}
.container .section .typing_quote::-webkit-scrollbar {
  width: 0;
}
.container .section .typing_quote p {
  font-size: 1.125rem;
  text-align: justify;
  letter-spacing: 0.063rem;
  word-break: break-all;
}
.container .section .typing_quote p span {
  position: relative;
}
.container .section .typing_quote p span.correct {
  color: var(--success);
  background-color: rgb(216, 241, 213);
}
.container .section .typing_quote p span.incorrect {
  color: var(--failure);
  background-color: #da8989;
}
.container .section .typing_quote p span.active {
  color: var(--main-color);
}
.container .section .typing_quote p span.active::before {
  position: absolute;
  content: "";
  height: 0.125rem;
  width: 100%;
  bottom: 0;
  left: 0;
  opacity: 0;
  border-radius: 0.313rem;
  background: var(--main-color);
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 1;
  }
}
.container .section .content {
  margin-top: 1.063rem;
  display: flex;
  padding: 0.75rem 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: var(--border);
}
.container .section .content button {
  outline: none;
  border: none;
  width: 6.563rem;
  color: var(--txt-color);
  padding: 0.5rem 0;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0.313rem;
  background: var(--main-color);
  transition: transform 0.3s ease;
}
.container .section .content button:active {
  transform: scale(0.97);
}
.container .section .content .result_container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: calc(100% - 8.75rem);
  justify-content: space-between;
}
.container .section .content .result_container li {
  display: flex;
  height: 1.25rem;
  list-style: none;
  position: relative;
  align-items: center;
}
.container .section .content .result_container li:not(:first-child) {
  padding-left: 1.375rem;
  border-left: var(--border);
}
.container .section .content .result_container li p {
  font-size: 1.125rem;
}
.container .section .content .result_container li span {
  display: block;
  font-size: 1.25rem;
  margin-left: 0.625rem;
}
.container .section .content .result_container li span b {
  font-weight: 500;
}
.container .section .content .result_container li:not(:first-child) span {
  font-weight: 500;
}

/* ======= 5. Media Queries  ======= */
@media (max-width: 745px) {
  .container{
    padding: 20px;
  }
  .section .content{
    padding: 20px 0;
  }
  .section .typing_quote{
    max-height: 100%;
  }
  .typing_quote p{
    text-align: left;
  }
  .content button{
    width: 100%;
    font-size: 15px;
    padding: 10px 0;
    margin-top: 20px;
  }
  .content .result_container{
    width: 100%;
  }
  .result_container li:not(:first-child){
    border-left: 0;
    padding: 0;
  }
  .result_container li p, 
  .result_container li span{
    font-size: 15px;
  }
}
@media (max-width: 518px) {
  .container h1{
    font-size: 1.5rem;
  }
  .container .section{
    padding: 10px 15px 0;
  }
  .result_container li{
    margin-bottom: 10px;
  }
  .content button{
    margin-top: 10px;
  }
}