/* =======================
   HERO (Proteins) – Premium Gradient + Glass Search
======================= */

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #0a2540, #1d3d6c);
    padding: clamp(88px, 10vh, 120px) 20px 64px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}


/* animated gradient canvas (Granim target) */

#heroGradient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}


/* readability overlay (keeps text crisp) */

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(900px 520px at 50% 35%, rgba(118, 192, 255, 0.10), transparent 60%), linear-gradient( to bottom, rgba(10, 37, 64, 0.55), rgba(10, 37, 64, 0.88));
}


/* keep content above overlay */

.hero>* {
    position: relative;
    z-index: 2;
}


/* Title */

.hero h1 {
    font-size: clamp(2.6rem, 4.2vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}


/* Subtitle */

.hero p {
    font-size: 1.08rem;
    font-weight: 400;
    margin: 0 auto 34px;
    max-width: 720px;
    color: rgba(230, 238, 248, 0.92);
}


/* =======================
   Search form (glass pill)
======================= */

.hero form {
    display: flex;
    justify-content: center;
    align-items: stretch;
    max-width: 560px;
    margin: 0 auto;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.hero input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    border-radius: 14px;
    border: none;
    outline: none;
    font-size: 16px;
    background: rgba(10, 37, 64, 0.35);
    color: #fff;
}

.hero input[type="text"]::placeholder {
    color: rgba(230, 238, 248, 0.72);
}

.hero input[type="text"]:focus {
    box-shadow: 0 0 0 4px rgba(118, 192, 255, 0.25);
}


/* Button */

.hero button {
    padding: 12px 18px;
    border: none;
    border-radius: 14px;
    background-color: #76c0ff;
    color: #0a2540;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 28px rgba(118, 192, 255, 0.28);
}

.hero button:hover {
    background-color: #5aa9e6;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(118, 192, 255, 0.33);
}

.hero button:active {
    transform: translateY(-1px);
}


/* Mobile */

@media (max-width: 520px) {
    .hero form {
        flex-direction: column;
    }
    .hero button {
        width: 100%;
    }
}


/* Reduced motion (nice touch) */

@media (prefers-reduced-motion: reduce) {
    .hero button {
        transition: none;
    }
}


/* ===========================
   Protein Table Wrapper
=========================== */

#proteinsList {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.proteinTableContainer {
    width: 95%;
    max-width: 1300px;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}


/* ===========================
   Table Styling
=========================== */

.proteinTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-family: "Poppins", sans-serif;
}

.proteinTable thead {
    background: #0a2540;
    color: #fff;
}

.proteinTable thead th {
    padding: 14px 14px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 5;
}

.proteinTable tbody tr {
    background: #fff;
    transition: background 0.2s ease;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.proteinTable tbody tr:hover {
    background: #eef6ff;
}

.proteinTable td {
    padding: 14px 18px;
    border-bottom: none;
    font-size: 0.92rem;
}


/* ===========================
   Column Widths 
=========================== */

.proteinTable td:nth-child(1),
.proteinTable th:nth-child(1) {
    width: 12%;
}


/* uid */

.proteinTable td:nth-child(2),
.proteinTable th:nth-child(2) {
    width: 18%;
}


/* gene */

.proteinTable td:nth-child(3),
.proteinTable th:nth-child(3) {
    width: 22%;
}


/* accession */

.proteinTable td:nth-child(4),
.proteinTable th:nth-child(4) {
    width: 20%;
}


/* main_category */

.proteinTable td:nth-child(5),
.proteinTable th:nth-child(5) {
    width: 15%;
}


/* ds */

.proteinTable td:nth-child(6),
.proteinTable th:nth-child(6) {
    width: 10%;
    text-align: center;
}

.seqRow td.seqCell {
    background: #f8fbff;
    padding: 18px;
    font-family: monospace;
    white-space: pre-wrap;
    border-radius: 8px;
}

.seqRow td.seqCell pre {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    font-size: 14px;
    line-height: 1.4;
}

.seqToggleBtn {
    padding: 5px 10px;
    font-size: 18px;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.seqToggleBtn:hover {
    background: #ddd;
}


/* ===========================
   Responsive table when checkbox is removed
=========================== */

.proteinTable.no-checkbox thead th:first-child {
    display: none !important;
}

.proteinTable.no-checkbox tbody tr:not(.seqRow) td:first-child {
    display: none !important;
}

.proteinTable.no-checkbox td,
.proteinTable.no-checkbox th {
    width: auto !important;
}

.proteinTable.no-checkbox th {
    padding-left: 16px;
}


/* ===========================
   Checkbox
=========================== */


/*.proteinTable input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


/* =======================
   Buttons
======================= */

button.ppiBtn,
.multiActions .ppiBtn,
.pagination button {
    background-color: #0a2540;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

button.ppiBtn:hover,
.multiActions .ppiBtn:hover,
.pagination button:hover {
    background-color: #76c0ff;
    color: #0a2540;
    transform: translateY(-2px);
}

.proteinResult button.ppiBtn {
    flex: 1 1 auto;
}

#selectedActionsBar .ppiBtn {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: 10px;
    margin: 0 14px;
}


/* =======================
   Search Results Cards
======================= */

.proteins-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
    gap: 25px;
    max-width: 1100px;
    margin: 70px auto;
    padding: 0 20px;
    justify-content: center;
}


/* =======================
   Modals
======================= */

.modal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 40px 0;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1900px;
    min-width: 320px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}


/* Header sticky position */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 50;
    padding: 25px 40px;
    border-bottom: 2px solid #eee;
}


/* Scroll area */

.modal-body {
    overflow: auto;
    padding: 30px 40px;
}


/* Close button */

.modal-header .close {
    font-size: 36px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 20px;
    color: #999;
    transition: color 0.2s;
}

.modal-header .close:hover {
    color: #0a2540;
}


/* Tables */

.ppiTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ppiTable thead {
    background-color: #0a2540;
    color: white;
}

.ppiTable th,
.ppiTable td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.ppiTable tr:nth-child(even) {
    background-color: #f7f8fa;
}

.ppiTable tr:hover {
    background-color: #eef4ff;
}

.sequenceBox {
    display: block;
    background-color: #f7faff;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

#multiPPIModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 40px 0;
}

#proceedPanel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1200;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-family: Poppins, sans-serif;
    display: none;
}

.dsLink {
    color: #003366;
    cursor: pointer;
    text-decoration: underline;
}

.dsLink:hover {
    color: #005599;
}


/* =======================
   Link Button
======================= */

.protein-cell {
    white-space: nowrap;
}

.uniprot-mini-btn {
    margin-left: 6px;
    font-size: 0.8em;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.6;
}

.uniprot-mini-btn:hover {
    opacity: 1;
}


/* =======================
   Back Button
======================= */

#backToPpiBtn {
    background: none;
    border: none;
    color: #76c0ff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    transition: color 0.3s ease, transform 0.2s ease;
}

#backToPpiBtn:hover {
    color: #0a2540;
    transform: translateX(-3px);
}


/* =======================
   Pagination (Centered)
======================= */

.pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px auto 60px auto;
    flex-wrap: wrap;
    text-align: center;
}


/* ===========================
   Entries Count
=========================== */

#entriesCount {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 15px;
}


/* =======================
    Gradient Checkbox
======================= */

.proteinTable input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    border: 1.5px solid rgba(118, 192, 255, 0.55);
    background: linear-gradient( 180deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 255, 0.85));
    display: inline-grid;
    place-content: center;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .08s ease;
}

.proteinTable input[type="checkbox"]:hover {
    border-color: rgba(118, 192, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(118, 192, 255, 0.14);
}

.proteinTable input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(118, 192, 255, 0.30);
}

.proteinTable input[type="checkbox"]:checked {
    background: linear-gradient( 135deg, #76c0ff, #5aa9e6);
    border-color: #76c0ff;
    box-shadow: 0 8px 18px rgba(118, 192, 255, 0.35);
}

.proteinTable input[type="checkbox"]::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2.4px solid #0a2540;
    border-bottom: 2.4px solid #0a2540;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
    transition: transform .14s ease;
}

.proteinTable input[type="checkbox"]:checked::after {
    transform: rotate(-45deg) scale(1);
}

.proteinTable input[type="checkbox"]:active {
    transform: scale(0.94);
}
