body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0F084B, #243B6B, #A558C5);
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100%;
    color: white;
}

.container {
    margin-left: 20px;
    max-width: 800px;
    padding-top: 120px; /* Prevent overlap with top-left logo and divider */
}

.top-right-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px; /* Space between buttons */
}

.top-right-button, .green-button, .dropdown {
    height: 42px;  /* Unified height for all elements */
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.top-right-button, .green-button {
    background-color: #4CAF50;
}

.green-button:hover, .top-right-button:hover {
    background-color: #45a049;
}

/* Legacy dropdown (kept for compatibility), not used in new UI */
.dropdown {
    background-color: #4BA3C7;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
}

/* Professional select styles */

.select-primary,
.select-secondary {
    height: 42px;
    padding: 8px 12px;
    background: #4CAF50; /* green, matches Annotate DB */
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    outline: none;
    appearance: none;
}

.select-primary:focus,
.select-secondary:focus,
.select-primary:hover,
.select-secondary:hover {
    background: #45a049; /* darker green on focus/hover */
    border-color: rgba(255,255,255,0.45);
}

/* Collapsibles */
.collapsible {
    margin-top: 14px;
}

.collapsible > summary {
    list-style: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
}

.collapsible > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transform: translateY(-1px);
}

details[open] > summary::before {
    content: '▾';
}

.field-label {
    color: #fff;
    font-size: 12px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    background-color: #4CAF50;
    color: #fff;
    border-radius: 9999px;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.kg-label-text {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 4px;
    color: #FFC857; /* yellowish-orange */
    font-weight: 700;
}

.stack-42 {
    height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* center the two lines within 42px */
}

.stack-42 .field-label {
    margin-bottom: 0; /* remove extra gap */
    line-height: 14px;
}

.stack-42 .kg-label-text {
    height: auto; /* let text define height */
    line-height: 18px;
}

.ask-button {
    padding: 10px 60px; /* Wider: roughly double horizontal size */
    background-color: #4BA3C7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    margin-left: 0; /* align left with input */
    display: inline-block;
    vertical-align: middle;
}

.ask-button:hover {
    background-color: #3A92B6;
}

.processing-label {
    margin-left: 10px;
    color: #FFDD57; /* A contrasting color to indicate processing */
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}

.input-box {
    width: 70%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #F0E8B0;
    color: #3D2B56;
    display: inline-block;
    vertical-align: top;
}

.textarea-box {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #F0E8B0;
    color: #3D2B56;
    margin-top: 2px;
}

h1, h2 {
    color: white;
    margin-left: 0;
    margin-top: 30px;
    margin-bottom: 2px;
}

textarea {
    color: #3D2B56;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #F0E8B0;
}

.checkbox-container {
    display: inline-block;
    vertical-align: top;
    margin-left: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: inline-block;
    color: white;
    margin-right: 15px;
}

/* Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    padding-top: 20px;
}

/* Modal Content */
.modal-content {
    background-color: #282c34;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-height: 80vh; /* Restrict modal height */
    overflow-y: auto; /* Enable scrolling */
    color: #fff; /* Set default text color */
    display: flex;
    flex-direction: column;
}

/* Flexbox container for side-by-side comparison using Grid */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create two equal-width columns */
    gap: 10px; /* Space between columns */
}

.comparison-column {
    background-color: lightgray; /* Test background color */
    padding: 10px;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    border: 1px solid black; /* Test border */
    word-wrap: break-word; /* Ensure long text wraps */
}

.highlight-diff {
    background-color: #ffcccb; /* Light red background for differences */
    color: #000; /* Dark text color */
    padding: 2px;
    border-radius: 3px;
}


/* Pre block styling */
pre {
    background-color: #001F3F;
    color: #FFF;
    padding: 10px;
    white-space: pre-wrap; /* Wrap text */
    overflow-x: auto; /* Ensure long content scrolls horizontally */
}

/* Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

/* Logo */
.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: auto;
}

/* Full-width divider under the logo */
.top-divider {
    position: absolute;
    top: 110px; /* ~20px top + ~80px logo + 10px spacing */
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

/* Centered page title above the divider */
.page-title {
    position: absolute;
    top: 80px; /* place above the divider at 110px */
    left: 50%;
    transform: translateX(-50%);
    color: #FFDD57; /* yellow */
    margin: 0;
    padding: 0;
    z-index: 2; /* ensure it appears above background elements */
    text-align: center;
}

/* Input styling */
input[type="submit"] {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

.prompt-label {
    margin-top: 10px;
    font-weight: bold;
    display: block;
}

.prompt-textarea {
    margin-bottom: 20px;
    height: 100px;
}
