﻿#row1 span {
    padding: 0px 4px 0px 4px;
    margin-right: -7px;
    display: inline-flex;
    flex-shrink: 0;
    width: fit-content;
    margin: 0px;
    color: #686868;
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
    font-family: Consolas, Lato, monospace;
    font-size: 32px;
    line-height: 54px;
}

#words .highlight {
    padding: 0 4px
}

/* #words .highlight + span{
                        color: #000;
                        animation: loading 0.3s none;
                    }

                    #words .highlight + span + span{
                        color: #000;
                        animation: loading 0.3s none;
                    } */
.wrong {
    color: #ff1818 !important;
    transition: color 0.3s ease;
}

.correct {
    color: #0072ff !important;
    transition: color 0.3s ease;
}

/* Keyframes for loading animation */
@@keyframes loading {
    0% {
        color: #a9a9a9;
    }

    50% {
        color: #3a3939;
    }

    100% {
        color: #0c0c0c;
    }
}

.gads {
    max-height: 280px;
}

.placeholder {
    height: 280px;
    width: 100%;
    background-color: #e1eafb
}


h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.timer-section {
    text-align: center;
    margin-bottom: 30px;
}

#timer {
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.words-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    min-height: 150px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

#words {
    transition: max-height 400ms ease-out;
}

#row1 {
    position: relative;
    transition: top 150ms ease-in-out;
}

    #row1 span {
        transition: all 0.2s ease;
        display: inline-block;
    }

        #row1 span.highlight {
            background: #ffd93d;
            color: #333;
            transform: scale(1.1);
            box-shadow: 0 4px 8px rgba(255, 217, 61, 0.4);
        }

        #row1 span.highlight-wrong {
            background: #ff6b6b;
            color: white;
            animation: shake 0.3s;
        }

        #row1 span.wrong {
            background: #ff6b6b;
            color: white;
            text-decoration: line-through;
        }

@@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

.input-section {
    margin-bottom: 30px;
}

#inputfield {
    width: 100%;
    padding: 15px;
    font-size: 1.3em;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

    #inputfield:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    #inputfield:disabled {
        background: #f5f5f5;
        cursor: not-allowed;
    }

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

button {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#reload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

    #reload-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    }

.mode-selector {
    background: #f0f0f0;
    color: #333;
}

    .mode-selector:hover {
        background: #e0e0e0;
    }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    color: #333;
    font-size: 1.8em;
    font-weight: bold;
}


#ajax-load {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: none;
    z-index: 1000;
}

.hidden-elements {
    display: none;
}
