/* —————————————— Base Styles (unchanged) —————————————— */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to right, #1e1e2f, #292943);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.landing-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 50%;
    max-width: 1000px;
    padding: 40px;
    border-radius: 20px;
    gap: 30px;
}

.text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.text-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #00e0ff;
}

.text-content p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #cccccc;
}

.start-btn,
.retake-btn {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #00e0ff;
    border: none;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    transition: background 0.3s ease;
}

.start-btn:hover,
.retake-btn:hover {
    background-color: #00b3cc;
}

/* —————————————— Test & Result Containers —————————————— */
.container {
    padding: 30px;
    width: 100%;
    height: 60vh;
    max-width: 600px;
    display: none;
}

.words::-webkit-scrollbar {
    display: none;
}

.result-container {
    text-align: center;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    display: none;
}

/* —————————————— Results Card —————————————— */
.result-card {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.result-item {
    background-color: #292943;
    padding: 20px;
    border-radius: 12px;
    width: 100px;
    margin: 10px;
}

.result-item h2 {
    margin: 0;
    font-size: 18px;
    color: #cccccc;
}

.result-item p {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0 0;
    color: #00ff88;
}

/* —————————————— Typing Test Words & Input —————————————— */
.words {
    padding: 15px;
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.5;
    max-height: 40vh;
    overflow-y: auto;
}

/* each word is a span so we can highlight it */
.words span {
    padding-right: 5px;
}

/* highlight the active word */
.words span.current-word {
    background-color: rgba(0, 224, 255, 0.2);
    border-radius: 4px;
}

/* optional: style correct/incorrect if you extend the script later */


.words span.incorrect {
    color: #ff4c4c;
}

.words span.correct {
    color: #00ff88 !important;
}

input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    margin-bottom: 15px;
    outline: none;
    background: linear-gradient(to right, #1e1e2f, #292943);
    color: white;
    display: none;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

#timer,
#wpm {
    font-weight: bold;
}