/* ==========================================================================
   Typing Test Container
   ========================================================================== */
.typing-test {
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    top: unset;
    left: unset;
    overflow: visible;
    z-index: 1;
}

/* ==========================================================================
   Content Area
   ========================================================================== */
.typing-test .content {
    width: 80vw;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.typing-test .paragraph-display {
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.5;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.typing-test .paragraph-display .current-word {
    background: #444;
    padding: 2px 4px;
    border-radius: 4px;
}

.typing-test .paragraph-display .correct {
    color: #00ff00;
}

.typing-test .paragraph-display .incorrect {
    color: #ff0000;
    text-decoration: underline;
}

.typing-test #typing-input {
    width: 100%;
    padding: 10px;
    background: #333;
    color: #e0e0e0;
    border: 2px solid #444;
    border-radius: 5px;
    font-size: 1rem;
}

.typing-test #typing-input:focus {
    outline: none;
    border-color: #555;
    background: #444;
}

.typing-test .results-display {
    font-size: 0.9rem;
    color: #e0e0e0;
    background: rgba(30, 30, 30, 0.95);
    padding: 6px 12px;
    border-radius: 5px;
    display: flex;
    gap: 15px;
}

.typing-test .results-display span {
    font-weight: bold;
    color: #00ff00;
}

/* ==========================================================================
   Menu
   ========================================================================== */
.typing-test .menu {
    position: absolute;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.95);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.typing-test .menu-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.typing-test .menu select,
.typing-test .menu button {
    padding: 8px 12px;
    background: #333;
    color: #e0e0e0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.typing-test .menu select:hover,
.typing-test .menu button:hover {
    background: #555;
}

.typing-test .difficulty-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.typing-test .difficulty-control label {
    font-size: 0.9rem;
    color: #e0e0e0;
}

.typing-test .difficulty-control select {
    padding: 6px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

.typing-test .difficulty-control select:focus {
    outline: none;
    background: #555;
}

/* ==========================================================================
   Stats Display
   ========================================================================== */
.typing-test .stats-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #e0e0e0;
}

.typing-test .stats-display h3 {
    font-size: 1rem;
    margin: 0 0 5px 0;
    color: #ffffff;
}

.typing-test .stats-display p {
    margin: 0;
    font-size: 0.9rem;
}

.typing-test .stats-display span {
    font-weight: bold;
    color: #00ff00;
}

.typing-test .stats-display button {
    margin-top: 5px;
}
