body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center vertically */
    min-height: 100vh; /* Ensure it takes the full height of the viewport */
    margin: 0;
    padding: 0;
}

.search-container {
    text-align: center;
    width: 100%;
    max-width: 600px; /* Optional: Limit the max width of the search container */
}

.search-bar {
    width: 95%;
    padding: 10px;
    border: 2px solid #333;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
    height: 100px;
}

.search-button {
    padding: 10px 20px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.search-button:hover {
    background-color: #cc5200;
}

.results-container {
    margin-top: 20px;
    width: 95%;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.results-table th {
    background-color: #f2f2f2;
}

.result-item a {
    color: #ff6600;
    text-decoration: none;
}

.result-item a:hover {
    text-decoration: underline;
}

.note {
    margin-top: 10px;
    font-size: 14px;
    color: #777;
}

.error {
    color: red;
    font-size: 14px;
}

.word-count {
    margin-top: 5px;
    font-size: 14px;
    color: #333;
}

.loader-container {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    position: fixed; /* Fixed position to cover the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    z-index: 9999; /* Ensure it is on top of other content */
}

.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
