*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}
body{
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Arial' , sans-serif;
    min-height: 100vh;

}
.container{
    max-width: 900px;
    width: 100%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0,0, 0.1);
}
.header{
    text-align: center;
    margin-bottom: 30px;
}
.header h1 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 10px;
    font-weight: bold;
}
.header p {
 color: #e0e7ff;
 font-size: 1.1em;
}
.stats-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit , minmax(150px ,1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card{
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.stat-value{
    font-size: 2em;
    font-weight: bold;
    color: white;
    margin-bottom:5px;
}
.stat-label{
    color: #cbd5e1;
    font-size: 0.9em;
}
.text-display{
    background:rgb(238, 255, 0) ;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    min-height: 120px;
    overflow: hidden;
    color: #53eb25;
    border: 1px solid rgba(28, 255, 202, 0.2);
}
.text-content{
    font-size: 1.2em;
    line-height: 1.6;
    font-family: 'Courier New' ,monospace;
    color: rgb(247, 247, 243);
    white-space: normal;
    word-wrap: break-word;
}
.typed-correct{
    background-color: #10b981;
    color: white;
    border-radius: 3px;
    padding: 1px 2px;
}
.typed-incorrect{
    background-color: #ef4444;
    color: white;
    border-radius: 3px;
    padding: 1px 2px;
}
.current-char{
    background-color: #3b82f6;
    color: white;
    border-radius: 3px;
    padding: 1px 2px;
    animation: blink 1s infinite;
}
.remaining-char{
    color: #9ca3af;
}
@keyframes blink {
    0%,50%{
        opacity: 1;
    }
    51%,100%{
        opacity: 0.4;
    }
}
.input-area{
    margin-bottom: 25px;
}
.typing-input{
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    font-size: 1.2em;
    font-family:'Courier New' monospace ;
    color:rgb(164, 7, 7);
    outline: none;
    resize: none;
    overflow: hidden;
    height: 120px;
}
.typing-input:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);  
}
.controls{
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.btn{
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease
}
.btn:hover:not(:disabled){
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0,0, 0.2);
}
.btn:disabled{
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-start {
   background: linear-gradient(45deg, #10b981, #059669);
}      
.btn-reset {
background: linear-gradient(45deg, #6b7280, #4b5563);
}     
.btn-blue {
background: linear-gradient(45deg, #3b82f6, #2563eb);
}
.time-select {
    background: rgba(41, 10, 115, 0.556);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 20px;
    color: rgb(240, 240, 240);
    font-size: 1em;
    outline: none;
     cursor: pointer;
}
.time-select option{
    color: white;
    background: #4b5563;
}
.modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0,0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal.hidden{
    display: none;
}
 .modal-content {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 40px;
            max-width: 400px;
            width: 100%;
            text-align: center;
            border: 1px solid rgba(202, 14, 14, 0.3);
}
.modal h2 {
            font-size: 2em;
            color: white;
            margin-bottom: 30px;
}
.results-grid{
display: grid;
gap: 15px;
margin-bottom: 30px;
}
.result-value{
    font-size: 2em;
    font-weight: bold;
    color: rgb(19, 234, 87);
    margin-bottom: 5px;
}
.result-label{
    color: #89c3bd;
    font-size: 0.9em;
}
.result-wpm{
    color: #152f7c;
}
.small-results{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#final-accuracy{
    color: #e0f93f;
}
#final-incorrect{
    color: #9e050a;
}
@media (max-width: 768px) {
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
            
.controls {
flex-direction: column;
}
            
.btn, .time-select {
    width: 100%;
    max-width: 200px;
}
}

