body {
    font-family: 'Roboto', 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #e0f2f7; /* Light blue background */
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    text-align: center;
    color: #263238; /* Darker text for headings */
    margin-bottom: 25px;
    font-weight: 600;
}

#query-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    gap: 15px; /* Space between form elements */
}

/* Form input styling */
#query-form label {
    font-weight: 600;
    color: #37474f;
}

#query-form input[type="text"],
#query-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #b0bec5;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

#query-form input[type="text"]:focus,
#query-form textarea:focus {
    border-color: #4fc3f7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.sequence-name-input {
    margin-bottom: 10px; /* Add some space after the name inputs */
}

button {
    padding: 12px 25px;
    border: none;
    background-color: #039be5; /* Blue primary button */
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    /* align-self: flex-end; */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #0288d1; /* Darker blue on hover */
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    background-color: #039be5; /* Blue primary button */
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button:hover {
    background-color: #0288d1; /* Darker blue on hover */
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#queries-table {
    width: 100%;
    border-collapse: separate; /* Use separate for rounded corners */
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 8px;
    /* overflow: hidden; Ensures rounded corners are visible */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#queries-table th, #queries-table td {
    border: 1px solid #e0e0e0; /* Lighter border */
    padding: 12px 15px;
    text-align: left;
}

#queries-table th {
    background-color: #f5f5f5; /* Light grey header */
    color: #455a64; /* Darker text for header */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

#queries-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#queries-table tbody tr:hover {
    background-color: #e3f2fd; /* Light blue on row hover */
}

.view-button {
    padding: 8px 15px;
    border: none;
    background-color: #43a047; /* Green for view */
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.view-button:hover {
    background-color: #388e3c;
    transform: translateY(-1px);
}

.download-table-button {
    margin-left: 8px;
    background-color: #78909c; /* Grey for download */
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.download-table-button:hover {
    background-color: #607d8b;
    transform: translateY(-1px);
}

.delete-button {
    margin-left: 8px;
    background-color: #f44336; /* Red for delete */
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: white;
    border: none;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between modal buttons */
    margin-top: 30px;
}

.modal-actions .button {
    margin: 0; /* Reset margin from general .button */
}

.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.5); /* Darker overlay */
    backdrop-filter: blur(5px); /* Frosted glass effect */
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: none; /* Remove border */
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.close-button {
    color: #78909c;
    float: right;
    font-size: 32px;
    font-weight: normal; /* Lighter weight */
    position: absolute;
    top: 15px;
    right: 25px;
    transition: color 0.3s ease;
}

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

#result-display {
    white-space: pre-wrap;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; /* Monospaced font for code */
    background: #eceff1; /* Lighter background for code block */
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #cfd8dc;
}

#result-display table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

#result-display th, #result-display td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}

#result-display th {
    background-color: #f0f4f7;
    color: #546e7a;
}

/* Pagination styles */
#pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 15px; /* Space between pagination elements */
}

#pagination-container button {
    margin: 0; /* Reset margin */
    padding: 10px 20px;
    font-size: 0.95rem;
}

#page-info {
    font-weight: 500;
    color: #455a64;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    display: block; /* Ensure max-width applies */
    top: calc(100% + 8px); /* Position below the element with some space */
    left: 50%;
    transform: translateX(-50%);
    background-color: #37474f; /* Darker background for tooltip */
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    width: 350px; /* Set specific width */
    max-width: 100%; /* Ensure it doesn't exceed parent width */
    white-space: pre-wrap;
    word-break: break-all; /* Added for long sequences */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px); /* Slight lift on hover */
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        margin: 20px auto;
        padding: 20px;
        border-radius: 8px;
    }

    h1, h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    #query-form {
        gap: 10px;
    }

    #sequence-input,
    button,
    .button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    #queries-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap; /* Prevent text wrapping in cells */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        box-shadow: none;;
    }

    #queries-table thead,
    #queries-table tbody,
    #queries-table th,
    #queries-table td,
    #queries-table tr {
        display: block; /* Make table elements behave like block elements */
    }

    #queries-table th,
    #queries-table td {
        width: auto !important; /* Override fixed widths */
        box-sizing: border-box; /* Include padding and border in the element's total width */
    }

    #queries-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px; /* Hide table headers visually */
    }

    #queries-table tbody tr {
        margin-bottom: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
    }

    #queries-table td {
        border: none;
        border-bottom: 1px solid #e0e0e0;
        position: relative;
        padding-left: 50%; /* Space for the pseudo-element label */
        text-align: right;
    }

    #queries-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #546e7a;
    }

    /* Specific labels for each column */
    #queries-table td:nth-of-type(1)::before { content: "Sequence:"; }
    #queries-table td:nth-of-type(2)::before { content: "Timestamp:"; }
    #queries-table td:nth-of-type(3)::before { content: "Action:"; }

    .modal-content {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }

    .close-button {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    #result-display {
        padding: 15px;
        font-size: 0.9rem;
    }

    #result-display th, #result-display td {
        padding: 8px 10px;
    }

    #pagination-container {
        flex-direction: column;
        gap: 10px;
    }

    #pagination-container button {
        width: 100%;
    }

    [data-tooltip]::after {
        display: none;;
    }
}/* New styles for modal sequence display */
#modal-heavy-chain,
#modal-light-chain {
    display: block; /* Make them block-level to allow wrapping */
    word-wrap: break-word; /* Break long words */
    white-space: pre-wrap; /* Preserve whitespace and allow wrapping */
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Added for spacing */
    gap: 10px; /* Space between label and button */
    margin-bottom: 5px; /* Adjust as needed */
}

/* Header and Navigation styles */
header {
    background-color: #039be5; /* Blue header */
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    background: none; /* Override container background */
    box-shadow: none; /* Override container shadow */
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #e0f2f7; /* Lighter blue on hover */
}

/* Result content table spacing */
#result-content-block1,
#result-content-block2,
#result-content-block3 {
    margin-bottom: 20px; /* Space between tables */
    background: #eceff1; /* Lighter background for code block */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #cfd8dc;
}

#result-content-block1 table,
#result-content-block2 table,
#result-content-block3 table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#result-content-block1 th,
#result-content-block2 th,
#result-content-block3 th,
#result-content-block1 td,
#result-content-block2 td,
#result-content-block3 td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}

#result-content-block1 th,
#result-content-block2 th,
#result-content-block3 th {
    background-color: #f0f4f7;
    color: #546e7a;
}

.sequence-content {
    background-color: #f0f4f7; /* Light grey background */
    padding: 5px 10px;
    border-radius: 5px;
    display: block; /* Ensure wrapping */
    word-wrap: break-word; /* Break long words */
    white-space: pre-wrap; /* Preserve whitespace and allow wrapping */
}

.copy-button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px; /* Space from the text */
    vertical-align: middle; /* Align with text */
}

.copy-button:hover {
    background-color: #45a049;
}

.copy-success-message {
    color: #4CAF50; /* Green text */
    font-size: 0.8em;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.load-example-button {
    /* Inherit from .button and override */
    background-color: #607d8b; /* Greyish blue */
    color: white;
    padding: 8px 15px; /* Smaller padding than main button */
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.load-example-button:hover {
    background-color: #546e7a;
    transform: translateY(-1px);
}

#result-content-block1 th,
#result-content-block2 th,
#result-content-block3 th,
#result-content-block1 td,
#result-content-block2 td,
#result-content-block3 td {
    width: 50%;
}