*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins',sans-serif;
}

body{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
    
  background: linear-gradient(135deg, #17a2b8, #0077b6);


}
.hero-header {
  margin-top: 70px;     /* space from top */
  margin-bottom: 0px;  /* space above game */
  pointer-events: none;
  text-align: center;
}


/* Animated big heading */
.animated-title{
  font-family: 'Poppins', sans-serif;
  font-size: 38px;           /* change size as needed */
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display:inline-block;
  white-space: nowrap;
}

/* Typed caret underline (optional) */
.animated-title::after{
  content: "";
  display:inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 6px;
  background: #ffffff;        /* caret color */
  vertical-align: middle;
  animation: blink-caret 1s steps(1) infinite;
  opacity: 0.9;
}

@keyframes blink-caret {
  50% { opacity: 0; }
}



/* Default timer color */
/* Default */
.time span b {
  color: #000;
  transition: color 0.3s ease;
  display: inline-block;
}

/* Warning (orange) */
.time span b.warning {
  color: orange;
  transform: scale(1.1);
}

/* Danger (heartbeat) */
.time span b.danger {
  color: red;
  animation: heartbeat 1.5s infinite ease-in-out;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.3); }
  40%  { transform: scale(1.1); }
  60%  { transform: scale(1.4); }
  80%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}


/* Success popup */
.success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: #17a2b8;
  font-size: 2rem;
  font-weight: bold;
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1000;
}

/* When visible */
.success-message.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.success-message strong {
  color: #28a745; /* Green for good score */
}

.success-message .mistakes {
  color: #dc3545; /* Red for mistakes */
}

.success-message.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}


.wrapper{
    margin-top: auto;
    margin-bottom: auto;
    width: 770px;
    padding: 35px;
    background: #fff;
    border-radius: 10px;
}
.wrapper .input-field{
    z-index: -999;
    opacity: 0;
    position: absolute;

}

.wrapper .content-box{
    padding: 13px 20px 0;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.content-box .typing-text{
    max-height: 255px;
    overflow-y: auto;
}

.typing-text ::-webkit-scrollbar{
    width: 0;
}

.typing-text p{
    font-size: 21px;
    text-align: justify;
    letter-spacing: 1px;
    word-wrap: break-all;
    line-height: 1.6;
}
.typing-text p span{
    position: relative;

}
.typing-text p span.correct{
    color: #56964f;
}

.typing-text p span.incorrect{
    color: #cb3439;
    background: #ffc0cb;
    outline: 1px solid #fff;
    border-radius: 4px;
}

.typing-text p span.active{
    color: #17a2b8;
}

.typing-text p span.active::before{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: #17a2b8;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
    
}

.content-box .content{
    display: flex;
    margin-top: 17px;
    padding: 12px 0;
    border-top: 1px solid #ccc;
    justify-content: space-between;
}
.content button{
    border: none;
    outline: none;
    width: 105px;
    padding: 8px 0;
    color:#fff;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    background: #17a2b8;
    transition: transform 0.3s ease;
}

.content button:active{
    transform: scale(0.97);
}
.content .result-details{
    display: flex;
    width: calc(100% - 140px);
    justify-content: space-between;
}

.result-details li{
    height: 22px;
    display: flex;
    list-style: none;
    align-items: center;
}

.result-details li:not(:first-child){
    padding-left: 22px;
    border-left: 1px solid #ccc;
}

.result-details li p{
    font-size: 19px;
}

.result-details li span{
    display: block;
    font-size: 20px;
    margin-left: 10px;
}

.result-details li:not(:first-child) span{
    font-weight: 500;
}
.result-details li b{
    font-weight: 500;

}