.spellchecker-container {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #fdfdfd;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Space between sections */
}

.input-area label,
.output-area-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

#textInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
}

.controls {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 1rem; /* Space between button and word count */
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.info-display {
    font-size: 0.9em;
    color: #555;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
}

.status-display {
    font-size: 0.9em;
    color: #0056b3;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}
.status-display.error {
    color: #dc3545;
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.output-area-container {
    margin-top: 1rem;
}

#outputArea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #f9f9f9;
    line-height: 1.6;
    margin-bottom: 0.5rem; /* Space before copy button */
    white-space: pre-wrap; /* Preserve whitespace and wrap text */
    word-wrap: break-word; /* Break long words */
}

/* Style for highlighted misspelled words */
.misspelled {
    background-color: #ffdddd; /* Light red background */
    text-decoration: underline wavy red; /* Wavy red underline */
    /* Or just a simple underline: */
    /* text-decoration: underline; */
    /* color: red; */
    cursor: help; /* Indicate it's interactive (though no suggestions here) */
    border-radius: 2px;
    padding: 0 1px; /* Small padding */
}

/* Tool Buttons */
.btn-tool {
    background-color: #28a745; /* Green */
    color: white;
    padding: 10px 20px;
}
.btn-tool:hover, .btn-tool:focus {
    background-color: #218838;
    color: white;
}

.btn-tool-secondary {
    background-color: #6c757d; /* Gray */
    color: white;
    padding: 8px 15px; /* Slightly smaller */
    font-size: 0.9rem;
    margin-left: 0; /* Align left */
}

.btn-tool-secondary:hover, .btn-tool-secondary:focus {
    background-color: #5a6268;
    color: white;
}

.btn-tool-secondary:disabled {
    background-color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive Adjustments for Tool */
@media (max-width: 480px) {
    .controls {
        flex-direction: column; /* Stack button and word count */
        align-items: flex-start;
    }
    #textInput, #outputArea {
        font-size: 0.9rem;
        min-height: 120px;
    }
}