body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.divider {                  
    border-bottom: 2px solid #ccc; /* line color */
    margin: 15px 0;               /* spacing above/below */
}

.navbar {
    background-color: #0078D7;
    padding:                                                                                                                                            5px 0;
    text-align: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #005fa3;
}

.nav-link.active {
    background-color: #005fa3;
    font-weight: bold;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 50px auto;
    text-align: center;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 20px;
}

h2, h3 {
    color: #333;
}

.static-text {
    margin-top: -30px;   /* move down */
    margin-bottom: 10px;/* add spacing below */
}

.search-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

input[type="text"] {
    padding: 12px;
    width: 60%;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

input[type="number"] {
    height: 30px;   /* force the box height */
    width: 5%;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    top: 10px;   /* move down */
}

.search-form .row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.max_return_discription {
    font-size: 18px;
    white-space: nowrap;
    height: 10px;
    text-align: center;
    font-weight: bold;
}
.max_return_append {
    font-size: 14px;
    white-space: nowrap;
    height: 10px;
    display: flex;
    padding-top: 7px; /* Try different values here */
    align-items: start; /* Align content to the bottom */
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #0078D7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #005fa3;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.results-layout {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    margin-top: 20px;
}

.results-text {
    flex: 2;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.results-figures {
    flex: 1;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.figures-container {
    max-height: 2000px; /* Increased to accommodate both figures */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap for better spacing */
    padding: 10px; /* Added padding for better appearance */
}

.figure-item {
    text-align: center;
}

.figure-item p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #333;
}

.result-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #0078D7;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
}

.main-sentence {
    font-size: 1.1em;
    color: #333;
    margin: 0 0 10px;
}

.match-score {
    color: #d32f2f;
    font-weight: bold;
    margin-left: 10px;
}

.examples-section {
    margin-top: 10px;
    /* text-align: left; /* Ensures text content aligns left */
}
.examples-section summary {
    cursor: pointer;
    color: #0078D7;
    font-weight: bold;
    padding: 5px 0;
}

.details-section {
    margin-top: 10px;
}

.details-section summary {
    cursor: pointer;
    color: #0078D7;
    font-weight: bold;
    padding: 5px 0;
}

.details-content {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 3px;
    margin-top: 5px;
}

.details-content h3 {
    font-size: 1em;
    color: #333;
    margin: 10px 0 5px;
}

.details-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 5px 0;
}

.details-content p {
    margin: 5px 0;
}

.no-results {
    color: #666;
    font-style: italic;
}

.logo {
    width: 80px;
    margin-bottom: 20px;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.figure-img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

.help-content {
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.note {
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

.keyword-figures-container {
    max-width: 1200px;
}

.keyword-figures-layout {
    display: flex;
    gap: 40px;
    justify-content: space-between;
}

.keyword-selection {
    flex: 1;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.figures-display {
    flex: 2;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.keyword-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.suggestions-list li {
    padding: 10px;
    cursor: pointer;
}

.suggestions-list li:hover {
    background-color: #f0f0f0;
}

.category-selection {
    margin-top: 20px;
}

.category-item {
    margin: 10px 0;
}

.category-item label {
    margin-left: 5px;
}

body.processing {
    overflow: hidden;
}

#processing-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 8px;
    z-index: 10000;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

body.processing::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #0078D7;
    text-decoration: none;
    cursor: pointer;
}

.modal-img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0078D7;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #005fa3;
}