html, body {
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #222222;
}

.container {
    width: 1250px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    background-color: rgb(243, 243, 243);
}

#body {
    width: 100%;
    padding-bottom: 10px;
}

.card {
    width: 1064px;
    margin: 65px auto 0 auto;
    border-radius: 8px 8px 2px 2px;
    box-shadow: 0 0px 15px rgba(0, 0, 0, 0.15);
}

.module-card {
    overflow: hidden;
}

.cardTitle {
    border-radius: 8px 8px 0 0;
    background-color: rgb(90,19,92);
    color: #ffffff;
    text-align: center;
    font-weight: bolder;
    font-size: 24px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.cardContext,
.cardContext1 {
    width: 85%;
    margin: 0 auto;
    padding: 18px 0 12px 0;
    background-color: rgb(243, 243, 243);
    box-sizing: border-box;
    max-width: 100%;
}

/* Keep form area aligned with .cardP (100px side padding), not a narrower 70% column. */
#specialcard .cardContext1 {
    width: 100%;
    margin: 0;
    padding: 18px 100px 12px 100px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

#specialcard {
    margin-top: 65px;
}

.result-area {
    margin: 0 auto;
    padding-left: 100px;
    padding-right: 100px;
}

.cardContext.result-area.ora-result-area {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 18px 100px 18px 100px;
    box-sizing: border-box;
}

.cardP {
    font-size: 18px;
    margin-top: 14px;
    margin-bottom: 0px;
    padding-left: 100px;
    padding-right: 100px;
    text-align: justify;
}

.cardP1 {
    font-size: 18px;
    line-height: 1.55;
    padding-top: 5px;
    padding-bottom: 0px;
    text-align: justify;
    margin-bottom: 0;
}

.cardHr {
    border: 0;
    border-top: 1px solid #e5e0ea;
    margin: 4px 0 0 0;
}

.form-table {
    border: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    table-layout: auto;
}

.form-table td {
    padding: 6px 3px;
    vertical-align: middle;
}

.item1 {
    font-size: 16px;
    white-space: nowrap;
    margin: 0;
}

.label-cell {
    width: 1%;
    text-align: left;
    padding-right: 2px;
    white-space: nowrap;
}

.wide-label {
    width: 1%;
}

.pvalue-label {
    width: 1%;
}

.small-input,
.select-input,
.function-input,
.tier-input,
.pvalue-input {
    font-size: 14px;
    height: 23px;
    box-sizing: border-box;
    border: 1px solid #bfb5c8;
    border-radius: 4px;
    padding: 0 6px;
    background: #ffffff;
}

.small-input {
    width: 84px;
}

.select-input {
    width: 96px;
}

.function-input {
    width: 118px;
}

.tier-input {
    width: 108px;
}

.pvalue-input {
    width: 64px;
}

/* Two-row options panel: keeps all controls inside the card content area. */
.options-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #faf8fb 0%, #f3eef6 100%);
    border: 1px solid #ddd0e4;
    border-radius: 10px;
    padding: 16px 18px 14px;
    margin: 0 0 14px 0;
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: nowrap;
}

.options-row + .options-row {
    margin-top: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.option-label {
    font-size: 16px;
    font-weight: 700;
    color: #3d2144;
    white-space: nowrap;
    line-height: 1.2;
}

.option-control {
    font-size: 14px;
    height: 30px;
    box-sizing: border-box;
    border: 1px solid #c4b3cf;
    border-radius: 6px;
    padding: 0 10px;
    background: #ffffff;
    color: #222222;
    white-space: nowrap;
}

.opt-job { width: 130px; min-width: 130px; }
.opt-species { width: 110px; min-width: 110px; }
.opt-function { width: 130px; min-width: 130px; }
.opt-tier { width: 130px; min-width: 130px; }
.opt-pvalue { width: 100px; min-width: 100px; }

.query_button {
    background-color: #cccccc;
    color: #000000;
    width: 100%;
    height: 60px;
    border: 0;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.query_button p {
    margin: 0;
}

.section-cell {
    padding-top: 18px !important;
}

.input-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 17px;
    margin: 8px 0;
}

#input_text {
    width: 100%;
    max-width: 100%;
    min-height: 105px;
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #bfb5c8;
    border-radius: 4px;
    font-size: 14px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.4;
}

.button-row {
    margin-top: 6px;
}

.right-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.tool-button,
.submit-button {
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
}

.tool-button {
    border: 1px solid #9e9e9e;
    background: #e6e6e6;
    color: #000000;
    padding: 3px 10px;
    height: 30px;
}

.submit-button {
    width: 120px;
    height: 38px;
    margin-top: 15px;
    border: 0;
    background: rgb(90,19,92);
    color: #ffffff;
}

.upload-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.file-name {
    font-size: 17px;
    color: #555555;
}

.example-link,
.secondary-link {
    font-size: 17px;
    color: rgb(90,19,92);
    text-decoration: none;
}

.example-link {
    text-decoration: underline;
}

.example-link:hover,
.secondary-link:hover {
    text-decoration: underline;
}

.tip-text {
    font-size: 17px;
    color: #555555;
    margin-top: 8px;
    text-align: justify;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.error-box {
    width: 100%;
    margin: 0 auto 15px auto;
    padding: 10px 14px;
    border: 1px solid #cc7777;
    background-color: #fff1f1;
    color: #9b0000;
    font-size: 16px;
    border-radius: 4px;
}

.result-placeholder {
    text-align: left;
}

.result-message {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ddd2e6;
    background: #faf8fc;
    font-size: 16px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #d8c8e4;
    border-radius: 6px;
    background: #fbf8fd;
}

.prompt-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
    color: #4b3450;
}

.prompt-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #4b3450;
}

.result-error-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #f0c8cf;
    border-radius: 6px;
    background: #fff5f7;
    color: #9b0000;
}

.result-error-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
    color: #9b0000;
}

.result-error-text {
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-message-success {
    border-color: #cfe6d2;
    background: #f4fbf5;
    color: #1b7f2a;
}

.result-message-failed {
    border-color: #f0c8cf;
    background: #fff5f7;
    color: #9b0000;
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ddd2e6;
    background: #faf8fc;
    flex-wrap: wrap;
}

.status-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgb(90,19,92);
}

.status-text {
    font-size: 17px;
    line-height: 1.4;
}

.status-success {
    border-color: #cfe6d2;
    background: #f4fbf5;
}

.status-success .status-chip {
    background: #1b7f2a;
}

.status-failed {
    border-color: #f0c8cf;
    background: #fff5f7;
}

.status-failed .status-chip {
    background: #b00020;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 16px;
}

.meta-table th,
.meta-table td {
    border: 1px solid #ddd6e4;
    padding: 8px 12px;
    text-align: left;
}

.meta-table th {
    width: 180px;
    background: #f6f2f8;
    color: #4b3450;
    font-weight: bold;
}

.section-heading {
    margin: 16px 0 10px 0;
    color: rgb(90,19,92);
    font-size: 19px;
    font-weight: bold;
}

.notice-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.notice-item {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.notice-info {
    background: #f8f6fb;
    border-color: #e5dcee;
    color: #4b3450;
}

.notice-warning {
    background: #fff9ef;
    border-color: #f0dfb9;
    color: #7a5a19;
}

.notice-error {
    background: #fff1f1;
    border-color: #e4b8bd;
    color: #9b0000;
}

.notice-success {
    background: #f1fbf3;
    border-color: #cfe6d2;
    color: #1b7f2a;
}

.empty-note {
    margin: 8px 0 0 0;
    color: #666666;
    font-size: 15px;
}

.log-details {
    margin-top: 14px;
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    background: #fbfafc;
    padding: 10px 12px;
}

.log-details summary,
.table-details summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #4b3450;
}

.log-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.log-panel {
    min-width: 0;
}

.log-label {
    margin-bottom: 6px;
    font-weight: bold;
    color: #4b3450;
}

.log-box {
    width: 100%;
    max-height: 350px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    background-color: #f7f7f7;
    border: 1px solid #cccccc;
    border-radius: 4px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 13px;
    box-sizing: border-box;
}

.error-log {
    background-color: #fff5f5;
    border-color: #e0aaaa;
}

.result-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.archive-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 4px;
    background: rgb(90,19,92);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
}

.archive-button:hover {
    background: #7a1a7c;
}

.pdf-card {
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f6fb;
    border-bottom: 1px solid #ddd6e4;
}

.file-name-line {
    font-size: 16px;
    font-weight: bold;
    color: #4b3450;
    word-break: break-all;
}

.pdf-viewer {
    width: 100%;
    height: 540px;
    border: 0;
    display: block;
    background: #ffffff;
}

.table-details {
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    margin: 0;
    padding: 10px 12px 12px 12px;
    background: #ffffff;
}

.table-details[open] {
    box-shadow: inset 0 0 0 1px rgba(90, 19, 92, 0.03);
}

.table-summary-name {
    font-weight: normal;
    color: #6e6275;
    font-size: 15px;
}

.table-scroll {
    max-height: 340px;
    overflow: auto;
    margin-top: 10px;
    border: 1px solid #ddd6e4;
    border-radius: 4px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

.result-table th,
.result-table td {
    border: 1px solid #ddd6e4;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.result-table th {
    background-color: #f6f2f8;
    color: #4b3450;
    font-weight: bold;
}

.sticky-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.file-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e5ddee;
    border-radius: 4px;
    background: #faf8fc;
}

.file-item span {
    word-break: break-all;
}

.footer {
    background-color: rgb(90,19,92);
    min-height: 60px;
    line-height: 20px;
    text-align: center;
    color: white;
    padding-top: 12px;
    box-sizing: border-box;
    margin-top: 18px;
}

.footer-line {
    height: 20px;
    line-height: 20px;
}

@media (max-width: 1100px) {
    .card {
        width: 95%;
    }

    .cardContext,
    .cardContext1,
    .result-area {
        width: 100%;
    }

    #specialcard .cardContext1 {
        padding-left: 24px;
        padding-right: 24px;
    }

    .options-row {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px 18px;
    }

    .form-table,
    .result-table,
    .table-scroll,
    .log-box {
        width: 100%;
    }

    .form-table tr,
    .form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .log-grid {
        grid-template-columns: 1fr;
    }

    .pdf-viewer {
        height: 540px;
    }

    .small-input,
    .select-input,
    .function-input,
    .tier-input,
    .pvalue-input {
        width: 220px;
    }

    .cardContext.result-area.ora-result-area,
    #specialcard .cardContext1 {
        padding-left: 24px;
        padding-right: 24px;
    }
}

.ora-venn-card {
    overflow: visible;
    background: #ffffff;
}

.ora-venn-wrap {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px 20px 20px;
    background: #ffffff;
    text-align: center;
    overflow: visible;
}

.ora-venn-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: #ffffff;
}

.ora-table-scroll {
    max-height: 420px;
    overflow: auto;
    width: 100%;
    box-sizing: border-box;
}

.ora-result-area .result-table {
    min-width: 100%;
}

.ora-result-area .result-table th,
.ora-result-area .result-table td {
    white-space: nowrap;
}
