/* === Global Layout === */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa; /* subtle neutral gradient removed for simplicity */
    color: #1e293b;
    line-height: 1.6;
}

/* === Header Styling === */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: #ffffff;
    border-bottom: 2px solid #0d9488; /* teal accent */
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-header .branding {
    text-align: left;
}

.site-logo {
    width: 180px;
    height: auto;
    margin-left: 25px;
}

/* === Navigation === */
.site-nav {
    margin-top: 10px;
}

.site-nav .nav-link {
    display: inline-block;
    margin: 0 8px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 1px solid #0d9488;
    color: #0f172a;
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-nav .nav-link:hover {
    background: #0d9488;
    color: #ffffff;
}


.branding {
    display: flex;
    align-items: center;
    gap: 12px; /* space between logo and text */
}
.site-text {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 7px; /* spacing between title and tagline */
    white-space: nowrap;
}

.site-title {
    margin: 0;
    font-size: 2.2em;
    font-weight: 800;
    color: #0f172a;
}

.site-tagline {
    margin: 0;
    font-size: 1.2em;
    color: #475569;
    font-style: italic;
}
@media (max-width: 900px) {
    .site-text {
        flex-wrap: wrap;
        gap: 6px;
    }
}


/* === Container: vertical stacking === */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    margin: 0 auto 60px;
    padding: 0 0 40px;
}

/* === Main Content Card === */
.main-content {
    width: 90%;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all 0.3s ease;
}

.main-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.main-content h1 {
    font-size: 2.2em;
    color: #0f172a;
    margin-bottom: 20px;
    font-weight: 800;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 10px;
}

/* === Lab Info Panel === */
.lab-info {
    width: 90%;
    background: #f9fafb;
    padding: 32px 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: all 0.3s ease;
}

.lab-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* === Lab Info: Two-column layout for Cite + Contact === */
.lab-sections {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap; /* responsive on small screens */
}

/* Left column: citations */
.lab-cite {
    flex: 2;
    text-align: left;
}

/* Right column: contact info */
.lab-contact {
    flex: 1;
    text-align: left;
}

/* Section headers */
.lab-cite h4, .lab-contact h4 {
    color: #0f172a;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Paragraph styling */
.lab-cite p, .lab-contact p {
    margin: 6px 0;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Links */
.lab-info a {
    color: #0d9488;
    text-decoration: none;
}

.lab-info a:hover {
    text-decoration: underline;
    color: #0f766e;
}

/* Responsive adjustment */
@media (max-width: 800px) {
    .lab-sections {
        flex-direction: column;
        gap: 20px;
    }
}

/* Links */
a {
    color: #0d9488;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
    color: #0f766e;
}

/* === Buttons === */
button, .download-button, .back-home-button {
    padding: 10px 26px;
    background: #0d9488; /* solid teal */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.download-button:hover, .back-home-button:hover {
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(13, 148, 136, 0.3);
    transform: translateY(-1px);
}

button:hover, .download-button:hover, .back-home-button:hover {
    background: #0f766e;
    box-shadow: 0 3px 8px rgba(13, 148, 136, 0.3);
    transform: translateY(-1px);
}


/* === Form Elements === */
label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #0f172a;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: border-color 0.3s ease;
    font-size: 0.95em;
}

input:focus, textarea:focus, select:focus {
    border-color: #0d9488;
    outline: none;
}

/* === Tabs === */
.tab-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.tab-button {
    padding: 8px 18px;
    border-radius: 6px;
    border: 1px solid #0d9488;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    background: #e0f2fe;
}

.tab-button.active {
    background: #0d9488;
    color: #ffffff;
    border-color: #0d9488;
}

/* Tab content panels */
.tab-content {
    display: none;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

/* === Tables === */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95em;
}

.results-table th {
    background: #0d9488;
    color: #ffffff;
    text-align: left;
    font-weight: 700;
    padding: 10px 14px;
}

.results-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.results-table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* === Error Messages === */
.error {
    color: #dc2626;
    font-weight: 600;
    margin-top: 10px;
}

/* === Responsive === */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .main-content, .lab-info {
        width: 95%;
    }
}

/* === Help Page === */
.help-section {
    margin-bottom: 40px;
}

.help-section h2 {
    font-size: 1.5em;
    color: #0f172a;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.help-section p {
    margin-bottom: 12px;
}

.help-section code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
    color: #0f172a;
}


/* === Protein Sequence Display (UniProt-style) === */
.sequence-section {
    margin-top: 30px;
    background: #ffffff;
    padding: 25px 35px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.amino-acids-container {
    font-family: "Courier New", monospace; /* fixed-width for equal spacing */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    line-height: 1.7;
}

/* Wrapper for all residues */
.sequence-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px; /* vertical / horizontal spacing between residue groups */
    justify-content: flex-start;
    align-items: flex-start;
}

/* Each group of 10 amino acids */
.residue-group {
    display: inline-block;
    text-align: left;
    position: relative;
    min-width: 14ch; /* enough space for 10 residues */
}

/* Index number above each group */
.residue-index {
    font-size: 0.8em;
    color: #64748b;
    text-align: right;
    display: block;
    margin-bottom: 2px;
}

/* Each amino acid letter */
.amino-acid {
    font-family: "Courier New", monospace;
    font-size: 1em;
    color: #1e293b;
    display: inline-block;
    width: 1ch;
    text-align: center;
    transition: color 0.2s ease;
}

/* Hover or highlighted amino acids */
.amino-acid.highlighted {
    color: #ef4444;
    font-weight: bold;
}

/* === Prediction Plot Section === */
.plot-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    margin-top: 40px;
}

/* === Sequence Highlighting Colors === */
.amino-acid {
    color: #1e293b;
    transition: all 0.2s ease;
}

.amino-acid.hovered {
    color: #2563eb; /* vivid blue when hovering in plot */
    background: rgba(219, 234, 254, 0.5);
    border-radius: 3px;
    font-weight: 700;
}

.amino-acid.highlighted {
    color: #e85d04; /* coral orange for predicted linker */
    font-weight: 600;
}

/* === Threshold slider styling === */
.threshold-adjustment {
    margin-top: 25px;
    text-align: center;
}

#threshold-slider {
    width: 60%;
    margin: 10px auto;
    display: block;
    accent-color: #10b981;
}

#threshold-value {
    font-weight: 700;
    color: #0d9488;
}

