* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    font-family: 'Roboto', sans-serif;
    background: #1f2933;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    margin-top: 15px;
    margin-bottom: 15px;
    width: 90%;
    max-width: 1400px;
    background: #1f2933;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    transition: transform 0.3s ease-in-out;
}

.container:hover {
    transform: translateY(-5px);
}

.main-heading {
    text-align: center;
    width: 100%;
    font-size: 2rem;
    letter-spacing: 2px;
    text-shadow: 0 3px 10px rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.left-section {
    width: 22%;
    background: #2d3b45;
    border-radius: 15px;
    padding: 20px;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
}

.right-section {
    width: 75%;
}

#target-text {
    font-size: 1.25rem;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    margin-top: 15px;
    white-space: pre-wrap;
    transition: background 0.3s ease-in-out;
}

#input-text {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    outline: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
}

#input-text:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.6);
}

#difficulty {
    text-align: center;
    font-size: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #1f2933;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

#difficulty:hover {
    background: linear-gradient(135deg, #fa709a, #fee140);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

button {
    cursor: pointer;
    padding: 12px 20px;
    margin: 10px 5px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #06beb6, #48b1bf);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}


button.active {
    color: rgb(8, 7, 7);
}

button:hover {
    box-shadow: 0 5px 20px rgba(0, 255, 200, 0.6);
    transform: translateY(-3px);
}

#start-btn {
    background: linear-gradient(135deg, #43cea2, #185a9d);
}

#reset-btn {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

#stop-btn {
    background: linear-gradient(135deg, #fc466b, #3f5efb);
}

#progress-bar {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    margin: 15px 0;
    transition: width 0.5s ease-in-out;
}

#results,
#leaderboard {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

#results:hover,
#leaderboard:hover {
    transform: scale(1.05);
}

#leaderboard-list li {
    list-style: none;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

#leaderboard-list li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

#timer {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 10px;
    color: #ffdd59;
    text-shadow: 0 3px 10px rgba(255, 255, 0, 0.6);
}

@media (max-width: 1024px) {
    .left-section {
        width: 25%;
    }

    .right-section {
        width: 72%;
    }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .left-section,
    .right-section {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-heading {
        font-size: 1.5rem;
    }

    #input-text,
    #difficulty,
    button {
        font-size: 0.9rem;
        padding: 10px;
    }

    #target-text {
        font-size: 1rem;
    }

    #timer {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .main-heading {
        font-size: 1.2rem;
    }

    #input-text,
    #difficulty,
    button {
        font-size: 0.85rem;
        padding: 8px;
    }

    #target-text {
        font-size: 0.9rem;
    }

    #timer {
        font-size: 1rem;
    }
}

body::after {
    content: "";
    display: block;
    height: 50px;
}