body {
    font-family: Arial, sans-serif;
    background-color: #b3f5ca;
    margin: 0;
    padding: 0;
}

/* Main search page layout */
body.search-home {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Results page layout */
body.search-results {
    background-color: #f9f9f9;
    min-height: 100vh;
}

/* About section footer */
.about-section {
    text-align: center;
    margin: 30px 0 20px 0;
    padding: 15px;
}

.about-section p {
    color: #666;
    margin: 0;
    font-size: 13px;
}

/* Homepage about attribution */
.about-attribution {
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
}

#container {
    text-align: center;
    max-width: 90%; /* Limit the width on larger screens */
}

.logo {
    max-width: 250px;
    border: 2px solid lightseagreen;
    border-radius: 140px;
}

#search-form {
    margin-top: 20px;
    width: 400px;
}

#search-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.search-input {
    width: 100%; /* Full width on small screens */
    max-width: 300px; /* Limit max width on larger screens */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 16px;
    width: 100%; /* Full width on small screens */
    max-width: 320px; /* Match the input field width */
}

.search-button:hover {
    background-color: #45a049;
}

/* Results page styles */
#results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 2px solid lightseagreen;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: #f9f9f9;
    z-index: 100;
}

.results-logo {
    max-width: 80px;
    height: auto;
    cursor: pointer;
    border: 2px solid lightseagreen;
    border-radius: 40px;
}

.search-again {
    display: flex;
    gap: 10px;
}

.search-input-small {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.search-button-small {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-button-small:hover {
    background-color: #45a049;
}

.results-info {
    margin-bottom: 20px;
    color: #333;
    font-size: 14px;
    padding: 10px;
    background-color: #f0f8ff;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
}

.sources {
    font-style: italic;
    margin-left: 10px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 3px solid transparent;
}

.result-item[data-type="featured"] {
    border-left-color: #2196F3;
    background: #f8f9ff;
}

.result-item[data-type="answer"] {
    border-left-color: #4CAF50;
    background: #f8fff8;
}

.result-item h3 {
    margin: 0 0 5px 0;
}

.result-item h3 a {
    color: #1a0dab;
    text-decoration: none;
    font-size: 18px;
}

.result-item h3 a:hover {
    text-decoration: underline;
}

.result-url {
    color: #006621;
    font-size: 14px;
    margin: 5px 0;
    word-break: break-all;
}

.result-description {
    color: #545454;
    margin: 10px 0;
    line-height: 1.4;
}

.result-source {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.no-results {
    text-align: center;
    color: #666;
    font-size: 16px;
    padding: 40px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .search-label, .search-input, .search-button {
        font-size: 14px;
    }
    .logo {
        max-width: 200px; /* Smaller logo on small screens */
        border-radius: 100px;
    }
    #search-form {
        margin-top: 15px;
    }

    #results-container {
        padding: 10px;
        margin: 0;
        max-width: 100%;
    }

    .results-header {
        flex-direction: column;
        gap: 10px;
        position: static;
    }

    .search-input-small {
        width: 150px;
    }

    .result-item h3 a {
        font-size: 16px;
        word-wrap: break-word;
    }

    .result-description {
        word-wrap: break-word;
    }
}
