   
        /* .container { */
            /* margin: 0 auto; */
            /* padding: 20px; */
        /* } */

       
        .stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-top: 20px;
        }

        .stat {
            text-align: center;
            background: #4299e1;
            color: #40ffb6;
            padding: 15px 25px;
            border-radius: 10px;
            min-width: 120px;
        }

        .stat-value {
            font-size: 2em;
            font-weight: bold;
            display: block;
        }
        .lesson-number {
            background: #4299e1;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-bottom: 15px;
        }

        .lesson-title {
            font-size: 1.5em;
            font-weight: bold;
            color: #c4ff40;
            margin-bottom: 10px;
        }

        .lesson-description {
            color: white;
            line-height: 1.5;
            margin-bottom: 15px;
        }

        .difficulty {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85em;
            font-weight: bold;
        }

        .difficulty.beginner { background: #c6f6d5; color: #22543d; }
        .difficulty.intermediate { background: #fed7aa; color: #9c4221; }
        .difficulty.advanced { background: #feb2b2; color: #742a2a; }

        .practice-area {
            display: none;
            border-radius: 15px;
            padding: 30px;
            margin: 20px 0;
            box-shadow: 0 10px 30px rgba(3, 0, 0, 0.2);
        }

        .practice-area.active {
            display: block;
        }


.text-to-type {
    font-size: 1.7em;
    line-height: 1.2em;  
    margin-bottom: 15px;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-weight: bold;
/*      */
    max-height:15.4em; 
    overflow-y: auto;
    white-space: pre-wrap;
   /*  */
}

        .char.correct {
            background: #c6f6d5;
            color: #22543d;
        }

        .char.incorrect {
            background: #fed7d7;
            color: #742a2a;
        }

        .char.current {
            background: #4299e1;
            color: white;
            animation: blink 1s infinite;
        }

        @keyframes blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0.3; }
        }
        .controls {
            display: flex;
            gap: 15px;
            margin: 20px 0;
            flex-wrap: wrap;         
 
 
        }
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 50%;
            font-size: 1em;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-primary {
            background: #4299e1;
            color: white;
        }

        .btn-primary:hover {
    
             
           transform: scale(1.3);
           transition: 2s;

            background: #e2e8f0;
            color: #4a5568;
        }

        .btn-secondary:hover {
            background: #cbd5e0;
            transform: scale(1.3);
            transition: 2s;
        }

        .progress-bar {
            width: 100%;
            height: 10px;
            background: #e2e8f0;
            border-radius: 5px;
            overflow: hidden;
            margin: 10px 0;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4299e1, #38a169);
            transition: width 0.3s ease;
        }

        .results {
    display: none;
    background: url('../../result.jpg') no-repeat center center/cover; /* 🔹 Your image */
    border: 4px solid #555;
    border-radius: 15px;
    padding: 30px 25px;
    margin: 20px auto;
    max-width: 500px;
    color: white;
    text-align: center;
    box-shadow: 0 0 25px rgba(0,0,0,0.9);
    font-family: Arial, sans-serif;
    color: white;
}

.results.show {
    display: flex; /* keep flex for centering */
}

.results h3 {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    background: white;
}

.date-time {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ccc;
}

.trophy {
    font-size: 55px;
    margin: 15px 0;
}

.result-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.result-item {
    background: transparent;
    border: none;
    text-align: center;
    padding: 0;
}

.result-value {
    font-size: 32px;
    font-weight: bold;
}

.accuracy { color: #c6ff00; }
.speed { color: #00e5ff; }
.time { color: #ffa726; }
.errors { color: #ff5252; }

.congrats {
    margin-top: 25px;
    background: #b71c1c;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 12px;
    border-radius: 12px;
}

/* 🔹 Buttons */
.result-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.result-buttons a,
.result-buttons button {
    background: #1976d2;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.result-buttons a:hover,
.result-buttons button:hover {
    background: #1565c0;
}

/* 🔹 Back Button */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(66, 153, 225, 0.9);
    color: white;
    border: none;
    padding: 10px 15px;
    color: #ccc;
}

.trophy {
    font-size: 55px;
    margin: 15px 0;
}

.result-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.result-item {
    background: transparent;
    border: none;
    text-align: center;
    padding: 0;
}

.result-value {
    font-size: 32px;
    font-weight: bold;
}

.accuracy { color: #c6ff00; }
.speed { color: #00e5ff; }
.time { color: #ffa726; }
.errors { color: #ff5252; }

.congrats {
    margin-top: 25px;
    background: #b71c1c;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 12px;
    border-radius: 12px;
}

/* 🔹 Buttons */
.result-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.result-buttons a,
.result-buttons button {
    background: #1976d2;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.result-buttons a:hover,
.result-buttons button:hover {
    background: #1565c0;
}

/* 🔹 Back Button */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(66, 153, 225, 0.9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    z-index: 1000;
}



        .timer {
             position: absolute;
 bottom: 20px;
 left: 50px;
 width: 80px;
 height: 80px;
 background: #e53e3e;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 1em;


        }
         .timer:hover{
            transform: translateX(1000px);
            transition: 5s;
         }
        .disappearing-text {
            background: #fed7aa;
            padding: 20px;
            border-radius: 10px;
            font-size: 1.3em;
            text-align: center;
            animation: fade-out 5s linear forwards;
        }

        @keyframes fade-out {
            0% { opacity: 1; }
            80% { opacity: 1; }
            100% { opacity: 0; }
        }

/* PDF Modal Styles */
        .pdf-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
        }

        .pdf-modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 30px;
            border-radius: 15px;
            max-width: 500px;
            width: 90%;
        }

        .pdf-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .pdf-input {
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 1em;
        }

        .pdf-checkbox {
            margin: 10px 0;
        }

        .close-modal {
            position: absolute;
            top: 10px;
            right: 15px;
            background: none;
            border: none;
            font-size: 1.5em;
            cursor: pointer;
        }

        @media (max-width: 768px) {
            .lessons-grid {
                grid-template-columns: 1fr;
            }
            
            .stats {
                flex-direction: column;
                align-items: center;
            }
            
            .keyboard {
                grid-template-columns: repeat(7, 1fr);
                font-size: 0.8em;
            }
            
            h1 {
                font-size: 2em;
            }

            .game-arena {
                height: 300px;
            }

            .word-match-container {
                grid-template-columns: 1fr;
            }

            .memory-cards {
                grid-template-columns: repeat(3, 1fr);
            }

            .maze-container {
                grid-template-columns: repeat(6, 1fr);
            }
        }
/* ======================
   General Mobile Fixes
====================== */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6em;
        text-align: center;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .stat {
        min-width: unset;
        width: 80%;
    }

    .lesson-title {
        font-size: 1.2em;
        text-align: center;
    }

    .lesson-description {
        font-size: 0.9em;
        text-align: center;
    }

    .practice-area {
        padding: 20px;
        margin: 10px 0;
    }

    .text-to-type {
        font-size: 1.2em;
        line-height: 1.4em;
        max-height: 10em;
    }

    .controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        border-radius: 8px; /* instead of circle for better fit */
        width: 80%;
        padding: 10px;
    }

    .progress-bar {
        height: 8px;
    }

    .results {
        padding: 20px;
        margin: 15px;
        max-width: 95%;
    }

    .results h3 {
        font-size: 22px;
    }

    .result-value {
        font-size: 24px;
    }

    .congrats {
        font-size: 18px;
        padding: 10px;
    }

    .result-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .result-buttons a,
    .result-buttons button {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    .back-btn {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .timer {
        width: 60px;
        height: 60px;
        font-size: 0.9em;
        bottom: 15px;
        left: 15px;
    }

    .pdf-modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Grids collapse */
    .lessons-grid,
    .word-match-container,
    .memory-cards,
    .maze-container {
        grid-template-columns: 1fr !important;
    }

    .keyboard {
        grid-template-columns: repeat(5, 1fr);
        font-size: 0.7em;
    }
}

/* Even smaller screens (phones <480px) */
@media (max-width: 480px) {
    .text-to-type {
        font-size: 1em;
        line-height: 1.3em;
    }

    .stat-value {
        font-size: 1.5em;
    }

    .lesson-number {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }#hii{
        margin:2px;   padding:   
 15px;color:#f1ecec;
 width: 60px;
  display: flex;
  text-align: center;
    }

}