/* =========================
   GLOBAL LAYOUT
========================= */

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

body {
    padding-top: 150px;
	background: #f4f6f9;
}

/* =========================
   GRID SYSTEM (ONE ONLY)
========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;

    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   CARD BASE (REUSABLE)
========================= */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 12px;
    padding-bottom: 28px;

    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;

    text-align: center;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* =========================
   CARD OVERLAY (CLICKABLE)
========================= */

.card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    cursor: pointer;

    font-size: 0;
    line-height: 0;

}


.card a {
    position: relative;
    z-index: 2;
}

/* =========================
   CARD BADGES (INDEX + ID)
========================= */

.card-index {
    position: absolute;
    top: 8px;
    left: 10px;

    font-size: 12px;
    padding: 3px 7px;
    border-radius: 6px;

    color: #888;
    font-weight: 700;
}

.card-id {
    position: absolute;
    top: 8px;
    right: 10px;

    font-size: 11px;
    padding: 3px 6px;
    border-radius: 6px;

    background: #e7f0ff;
    color: #2c6bed;
    font-weight: 500;
}

/* =========================
   CARD STRUCTURE
========================= */

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
	min-width: 0;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


.card-subtitle {
    font-size: 13px;
    color: #666;
}

.card-footer {
    font-size: 13px;
}

.card-meta {
    font-size: 13px;
    color: #555;
    word-break: break-word;
}


.card-media {
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto;
}

/* =========================
   MEDIA (IMAGES)
========================= */

.card-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Smaller structures (warheads etc.) */
.card-media-small {
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-media-small img {
    max-width: 200%;
    max-height: 150%;
    object-fit: contain;
}

.card-media.is-small {
    width: 170px;
    height: 170px;
}

.card-media.is-medium {
    width: 220px;
    height: 220px;
}

.card-media.is-large {
    width: 280px;
    height: 280px;
}


/* =========================
   CARD Stat
========================= */


.stat-footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}

.stat-footer div {
    display: flex;
    justify-content: space-between;  
    align-items: center;
    padding: 6px 8px;
    background: #f5f5f5;   
    border-radius: 6px;
}

.stat-footer span {
    color: #666;
    font-size: 0.85rem;
}

.stat-footer b {
	font-size: 0.9rem;
    font-weight: 600;
}

/* =========================
   DIVIDER
========================= */

.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    color: #888;
    font-size: 11px;
    font-weight: 600;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.section-divider::before {
    margin-right: 8px;
}

.section-divider::after {
    margin-left: 8px;
}

/* =========================
   COUNTS (GENERIC)
========================= */

.card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}

.card-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: #f5f5f5;
    border-radius: 6px;
}

.card-stats span {
    color: #666;
    font-size: 0.85rem;
}

.card-stats b {
    font-size: 0.9rem;
    font-weight: 600;
}

/* =========================
   MECHANISM EXTRA
========================= */

.mechanism-summary {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mechanism-summary span {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
}

/* =========================
   LINKS
========================= */

.wiki-icon {
    margin-left: 6px;
    font-size: 0.8rem;
    color: #666;
}

/* =========================
   FILTER + PAGINATION
========================= */

.alphabet-filter {
    margin-bottom: 15px;
    text-align: center;
}

.alphabet-filter a {
    margin: 0 5px;
    text-decoration: none;
    color: #002a77;
}

.alphabet-filter a.current_initial {
    font-weight: bold;
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 10px;
}

.pagination a {
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 25px;
    text-decoration: none;
    color: #002a77;
    background: #f0f4ff;
    transition: all 0.25s ease;
}

.pagination a:hover {
    background: #002a77;
    color: white;
    transform: translateY(-2px);
}

.pagination a.active {
    background: linear-gradient(135deg, #002a77, #0055cc);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =========================
   TOP CONTROLS
========================= */

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;

    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.count-number {
    background: #6c757d;
    color: white;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 999px;
}





/* =========================
   VIEW LINK
========================= */

.card-action {
    position: absolute;
    bottom: 8px;
    right: 10px;

    font-size: 12px;
    font-weight: 600;
    color: #007bff;

    background: white;
    padding: 2px 6px;
    border-radius: 6px;

    opacity: 0;
    transform: translateY(3px);
    transition: all 0.2s ease;

    pointer-events: none;
}

/* Show on hover for ALL cards */
.card:hover .card-action {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}



/* =========================
   RESIDUES
========================= */

.residue-dashboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: 0.2s ease;
}

.residue-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* METRICS GRID */
.residue-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.residue-metrics .metric {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    background: #f5f7fb;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
}

/* INSIGHTS */
.residue-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-size: 11px;
    background: #eef3ff;
    color: #2c6bed;
    padding: 3px 8px;
    border-radius: 999px;
}

/******************************************************************/

.protein-page .protein-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;

    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}


.residue-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 14px 14px 12px;
    border-radius: 12px;

    background: #ffffff;
    border: 1px solid #e6e8ee;

    transition: all 0.2s ease;
    position: relative;
}

.residue-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}



.residue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-bottom: 4px;
}

.residue-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2a44;
    text-align: center;
    width: 100%;
}


.card-index {
    position: absolute;
    top: 6px;
    left: 8px;

    font-size: 11px;
    color: #888;
    font-weight: 700;
}

.card-id {
    position: absolute;
    top: 6px;
    right: 8px;

    font-size: 11px;
    color: #2c6bed;
    background: #eef4ff;
    padding: 2px 6px;
    border-radius: 6px;
}



.residue-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.residue-metrics .metric {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 6px 8px;
    border-radius: 8px;

    background: #f6f8fc;
    text-decoration: none;
    color: inherit;

    transition: 0.2s ease;
}

.residue-metrics .metric:hover {
    background: #eaf2ff;
}

.residue-metrics span {
    font-size: 11px;
    color: #666;
}

.residue-metrics b {
    font-size: 13px;
    color: #1f2a44;
}

.residue-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;

    background: #eef3ff;
    color: #2c6bed;
    font-weight: 500;
}


.section-divider {
    height: 1px;
    background: #eef0f4;
    margin: 4px 0;
}



/* =========================
   SORT CONTAINER (CARD STYLE)
   ========================= */
.sort-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    padding: 8px 12px;
    border-radius: 10px;

    background: #ffffff;
    border: 1px solid #e6e6e6;

    box-shadow: 0 2px 6px rgba(0,0,0,0.04);

    font-family: Arial, sans-serif;
}

/* =========================
   LABEL
   ========================= */
.sort-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

/* =========================
   DROPDOWN
   ========================= */
.sort-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 7px 28px 7px 10px;

    font-size: 0.9rem;
    font-weight: 500;
    color: #002a77;

    border-radius: 8px;
    border: 1px solid #d9d9d9;

    background: #f8faff;
    cursor: pointer;

    transition: all 0.2s ease;
}

/* Hover */
.sort-dropdown:hover {
    border-color: #7aa7ff;
    background: #f0f6ff;
}

/* Focus */
.sort-dropdown:focus {
    outline: none;
    border-color: #2c6bed;
    box-shadow: 0 0 0 3px rgba(44, 107, 237, 0.15);
}

/* Optional: add a subtle dropdown arrow */
.sort-container {
    position: relative;
}

.sort-container::after {
    content: "▾";
    position: absolute;
    right: 14px;
    pointer-events: none;
    color: #2c6bed;
    font-size: 12px;
}



.bar {
    width: 100px;
    height: 6px;
    background: #e5e7eb;   /* light gray */
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4); /* blue → cyan */
    border-radius: 4px;
    transition: width 0.3s ease;
}


/* Container for the residue insights */
.residue-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Chip styles (for labels like "Highly reactive", "Ligand-rich") */
.chip {
    background-color: #f0f0f0;
    color: #333;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    margin-right: 8px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.chip.high {
    background-color: #ffcc00;
    color: #fff;
}

.chip.ligands {
    background-color: #4caf50;
    color: #fff;
}

.chip.complexes {
    background-color: #2196f3;
    color: #fff;
}

/* Progress bar styles */
.bar {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb; /* light gray */
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.fill {
    height: 100%;
    background-color: #3b82f6; /* blue color */
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Percentage text */
.pct {
    font-size: 12px;
    color: #555;
    margin-top: 2px;
}



.residue-insights {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    color: #444;
}

.value {
    font-weight: 600;
}

.bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* intensity levels */
.fill.high {
    background: green;  /* red */
}

.fill.medium {
    background: orange;  /* orange */
}

.fill.low {
    background: red;  /* gray */
}



######


/* ---------------------------
   PROTEIN CARD
---------------------------- */




.protein-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    margin-bottom: 18px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}


/* Header */

.protein-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Meta info */

.meta {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}


/* Tag */

.tag {
    display: inline-block;
    background: #e8f0ff;
    color: #1f4fb8;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}


/* ---------------------------
   TABLE
---------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background: #f5f6f8;
    text-align: left;
    font-size: 13px;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

td {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

tr:hover {
    background: #fafafa;
}


/* ---------------------------
   EMPTY STATE
---------------------------- */

.empty-state {
    color: #888;
    font-style: italic;
    margin-top: 20px;
}


/* ---------------------------
   ACCORDION (PROTEIN CARD)
---------------------------- */

.protein-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.protein-card.collapsed table {
    display: none;
}

.protein-card.collapsed .meta {
    display: none;
}

.toggle-icon {
    font-size: 14px;
    color: #888;
}


/* ---------------------------
   HIGHLIGHTING
---------------------------- */

mark {
    background: #fff3a0;
    padding: 0 2px;
    border-radius: 3px;
}


/* ---------------------------
   FILTER TAGS (clickable)
---------------------------- */

.clickable-tag {
    display: inline-block;
    background: #eef;
    color: #1f4fb8;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 6px;
}

.clickable-tag:hover {
    background: #dbe7ff;
}


.clickable-filter {
    cursor: pointer;
}

.clickable-filter:hover {
    background: #f2f6ff;
}

/**************************************/
/* 		   LIGAND CARD                */         

/*************************************/

:root{
    --primary:#1e3a5f;
    --secondary:#3b82f6;
    --bg:#f4f7fb;
    --card:#ffffff;
    --border:#e5e7eb;
    --text:#111827;
    --muted:#6b7280;
}

body{
    background:var(--bg);
}

/* PAGE */

.ligand-page{
    max-width:1500px;
    margin:auto;
    padding:2rem;
}

/* HERO */

.hero-card{
    background:linear-gradient(135deg,#1e3a5f,#2b5a8c);
    color:white;
    border-radius:24px;
    padding:2rem;
    margin-bottom:2rem;
}

.hero-layout{
    display:grid;
    grid-template-columns:300px 1fr;
    gap:2rem;
    align-items:center;
}


.hero-card .ligand-title{
    color: #ffffff !important;
}


.ligand-image-wrapper{
    background:white;
    border-radius:18px;
    padding:1rem;
    text-align:center;
}

.ligand-image{
    width:100%;
    max-width:250px;
    transition:.3s;
}

.ligand-image:hover{
    transform:scale(1.05);
}

.ligand-title{
    font-size:2.2rem;
    font-weight:700;
}

.ligand-subtitle{
    opacity:.8;
    margin-bottom:1rem;
}

/* BADGES */

.badge-row{
    margin-top:1rem;
}

.badge-modern{
    display:inline-block;
    padding:.5rem .9rem;
    border-radius:999px;
    background:rgba(255,255,255,.15);
    color:white;
    margin-right:.5rem;
    margin-bottom:.5rem;
    text-decoration:none;
}

.badge-modern:hover{
    background:white;
    color:var(--primary);
}

/* MAIN GRID */

.main-grid{
    display:grid;
    grid-template-columns:320px 1fr;
    gap:2rem;
}

/* SIDEBAR */

.sidebar{
    position:sticky;
    top:20px;
    align-self:start;
}

/* CARD */

.card-modern{
    background:var(--card);
    border-radius:20px;
    padding:1.5rem;
    margin-bottom:1.5rem;
    box-shadow:0 2px 14px rgba(0,0,0,.05);
    border:1px solid var(--border);
}


/* STATS */

.stats-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:1rem;
}

.stat-box{
    background:#f8fafc;
    border-radius:14px;
    padding:1rem;
    text-align:center;
}

.stat-value{
    font-size:1.4rem;
    font-weight:700;
    color:var(--primary);
}

.stat-label{
    margin-top:.25rem;
    font-size:.85rem;
    color:var(--muted);
}

/* INFO GRID */

.info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:1rem;
}

.info-item{
    background:#f9fafb;
    border-radius:14px;
    padding:1rem;
}

.info-item label{
    display:block;
    color:var(--muted);
    font-size:.82rem;
    margin-bottom:.4rem;
}

.info-item span{
    font-weight:600;
}

/* STRUCTURE */

.structure-section{
    margin-bottom:2rem;
}

.structure-section label{
    display:block;
    margin-bottom:.75rem;
    font-weight:600;
}

.structure-box{
    background:#0f172a;
    color:#f8fafc;
    border-radius:12px;
    padding:1rem;
    overflow:auto;
    font-family:monospace;
    font-size:.9rem;
    line-height:1.5;
}

.copy-btn{
    margin-top:.75rem;
    border:none;
    background:var(--secondary);
    color:white;
    border-radius:10px;
    padding:.5rem .9rem;
    cursor:pointer;
}

.copy-btn:hover{
    opacity:.9;
}

/* TABLE */

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:1rem;
}

.section-count{
    color:var(--muted);
}

.table-wrapper{
    overflow-x:auto;
}

.table-modern{
    width:100%;
    border-collapse:collapse;
}

.table-modern thead{
    background:#eff6ff;
}

.table-modern th{
    padding:1rem;
    text-align:left;
    color:var(--primary);
    font-size:.85rem;
}

.table-modern td{
    padding:1rem;
    border-top:1px solid #f1f5f9;
    vertical-align:middle;
}

.table-modern tbody tr:hover{
    background:#f8fafc;
}

.subtext{
    color:var(--muted);
    font-size:.82rem;
    margin-top:.2rem;
}

/* BUTTON */

.btn-view{
    background:var(--primary);
    color:white;
    text-decoration:none;
    border-radius:10px;
    padding:.45rem .85rem;
}

.btn-view:hover{
    color:white;
    opacity:.9;
}


/* RESPONSIVE */

@media(max-width:1100px){

    .hero-layout{
        grid-template-columns:1fr;
    }

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

    .sidebar{
        position:relative;
        top:0;
    }
}


/* SYNONYMS */

.collapse-btn{
    width:100%;
    border:none;
    background:#f8fafc;
    border-radius:12px;
    padding:.9rem;
    text-align:left;
    font-weight:600;
    cursor:pointer;
}

.collapse-content{
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.25s ease;
}

.collapse-content.active{
    max-height: 260px;
    opacity: 1;
}

.collapse-btn{
    cursor:pointer;
    user-select:none;
}

.collapse-btn::after{
    content:" ▼";
    float:right;
    transition: transform 0.2s;
}

.collapse-btn.opened::after{
    transform: rotate(180deg);
}

.synonym-list{
    list-style:none;
    padding:0;
    margin:0;
}

.synonym-list li{
    padding:.45rem 0;
    border-bottom:1px solid #f1f5f9;
}


.full-synonyms{
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
    border-top: 1px solid #eee;
}

.collapse-content.active .full-synonyms{
    display: block;
}

.collapse-content.active .syn-more{
    display: none;
}

.syn-more{
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.synonym-scroll{
    max-height: 220px;
    overflow-y: auto;
}

.synonym-list li.copied{
    background: #d1fae5;
    border-radius: 6px;
}

/* toolbar */
.syn-toolbar{
    display:flex;
    gap:10px;
    margin-bottom:10px;
}

.syn-search{
    flex:1;
    padding:6px 10px;
    border:1px solid #e5e7eb;
    border-radius:8px;
    font-size:0.9rem;
}

.copy-all-btn{
    padding:6px 10px;
    border:none;
    border-radius:8px;
    background:#2563eb;
    color:white;
    cursor:pointer;
    font-size:0.85rem;
}

.copy-all-btn:hover{
    background:#1d4ed8;
}

/* scroll box */
.synonym-scroll{
    max-height:240px;
    overflow-y:auto;
    border:1px solid #e5e7eb;
    border-radius:10px;
    background:#f9fafb;
    padding:6px;
}

/* list */
.synonym-list{
    list-style:none;
    margin:0;
    padding:0;
}

.syn-item{
    padding:6px 8px;
    border-bottom:1px solid #eef2f7;
    cursor:pointer;
}

.syn-item:hover{
    background:#eef2ff;
}

/* copied feedback */
.syn-item.copied{
    background:#d1fae5;
}

/* collapse */
.collapse-content{
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition:all .25s ease;
}

.collapse-content.active{
    max-height:350px;
    opacity:1;
}

/************************************/
/*     PROTEIN CARD					*/
/************************************/




.protein-title {
    color: #fff !important;
    white-space: nowrap !important;

}


.ligand-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* space between image and ID */
}

.ligand-thumb {
    width: 40px;          /* thumbnail size */
    height: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.ligand-thumb:hover {
    transform: scale(1.05);  /* zoom */
    position: relative;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Floating ligand preview */
#ligand-preview {
    position: absolute;
    display: none;
    pointer-events: none;
    z-index: 1000;

    width: 250px;         /* larger width */
    height: auto;         

    border-radius: 12px;   /* rounded corners */
    border: 2px solid #4CAF50; /* fancy border color */
    box-shadow: 0 8px 20px rgba(0,0,0,0.3); /* soft shadow */
    background: #fff;
    overflow: hidden;

    transition: transform 0.25s ease, opacity 0.25s ease;
    transform: scale(0.5);  /* start smaller */
    opacity: 0;
}

#ligand-preview.show {
    transform: scale(1);
    opacity: 1;
}

#ligand-preview img {
    width: 100%;
    height: auto;
    display: block;
}


/* Ligand Modal */
/* Ligand Modal */
.ligand-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    transition: opacity 0.25s ease;
}

.ligand-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 15px;
    border-radius: 12px;
    width: fit-content;
    max-width: 95%;           /* prevent overflow horizontally */
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: zoomIn 0.25s ease;
}

.ligand-modal-close {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.ligand-modal-close:hover {
    color: #f44336;
}

#ligand-modal-img {
    width: auto;
    max-width: 90vw;          /* responsive max width */
    max-height: 70vh;         /* responsive max height */
    display: block;
    margin: auto;
}

/* Animation */
@keyframes zoomIn {
    from {transform: scale(0.5); opacity:0;}
    to {transform: scale(1); opacity:1;}
}

/**************************************/
/*  COMPLEX CARD                     */
/**************************************/


.card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px auto;
  max-width: 1000px;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h3 {
  margin-top: 0;
  color: #007BFF;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.info-row > div {
  flex: 1 1 200px;
}



.ligand-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.ligand-image, .warhead-image {
  max-width: 150px;
  height: auto;
}

.mechanism-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mechanism-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.mechanism-row > div {
  flex: 1 1 150px;
}

.binding-db h4 {
  margin-bottom: 5px;
  color: #d10934;
}


.binding-filters{
    display:flex;
    align-items:center;
    gap:18px;
    font-size:14px;
}

.binding-filters input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.binding-filters label{
    display:flex;
    align-items:center;
    gap:6px;
    cursor:pointer;
    white-space:nowrap;
}


/* ===========================
   Text Divider (center label)
=========================== */

.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* left line */
.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

/* spacing around text */
.section-divider:not(:empty)::before {
    margin-right: 0.75rem;
}

.section-divider:not(:empty)::after {
    margin-left: 0.75rem;
}

/* optional text background (prevents line cutting through text visually) */
.section-divider span {
    background: #fff;
    padding: 0 0.5rem;
}


/* =========================
   MECHANISM CARDS (CLEAN UI)
========================= */

.mechanism-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.mechanism-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;

    transition: 0.2s ease;
}

.mechanism-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.mechanism-header {
    margin-bottom: 10px;
    font-weight: 700;
}

.reaction-link {
    color: #002a77;
    text-decoration: none;
}

.reaction-link:hover {
    text-decoration: underline;
}

.mechanism-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mech-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.mech-row .label {
    color: #666;
}

.mech-row .value {
    font-weight: 600;
    color: #1f2a44;
}

.warhead-box {
    margin-top: 10px;
    text-align: center;
}

.warhead-box img {
    max-width: 120px;
    height: auto;
    transition: transform 0.2s ease;
}

.warhead-box img:hover {
    transform: scale(1.1);
}



/********************************************/  
/*  Binding affinity on complex card ******/
/*******************************************/
.binding-bar {
    width: 100%;
    height: 5px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.binding-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Optional improvement: make cards feel more structured */
.binding-card {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    padding: 12px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    transition: all 0.2s ease;
}

.binding-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}



/********************************************/  
/*  Covalent Mechanism on complex card ******/
/*******************************************/
.mechanism-grid-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reaction-card-full {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    background: #fafafa;
}

.reaction-header-full a {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
    text-decoration: none;
}

.residues-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 12px;
}

.residue-card-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.residue-card-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.residue-info {
    margin-bottom: 8px;
}

.residue-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.residue-chain {
    font-size: 0.85rem;
    color: #6b7280;
}

.residue-meta span {
    display: block;
    font-size: 0.8rem;
    color: #374151;
    margin-top: 2px;
}

.warhead-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 6px;
}

.warhead-full img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.warhead-name {
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}


.residue-card {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sasa-box, .pka-box {
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.warhead-img-wrap img {
  width: 50px;
  height: 50px;
  transition: transform 0.2s;
}

.warhead-img-wrap img:hover {
  transform: scale(1.5);
}

.reaction-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.residue-card {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sasa-box, .pka-box {
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
  font-weight: 500;
}

.warhead-img-wrap img {
  width: 50px;
  height: 50px;
  transition: transform 0.2s;
}

.warhead-img-wrap img:hover {
  transform: scale(1.5);
}

.reaction-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   PROTEIN SECTION MODERN
========================= */

.protein-section-modern{
    display:flex;
    flex-direction:column;
    gap:20px;
}

/* HEADER */

.protein-header-modern{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
}

.protein-subtitle{
    color:#64748b;
    font-size:.92rem;
    margin-top:4px;
}

.protein-class-badge{
    background:linear-gradient(135deg,#dbeafe,#eff6ff);
    color:#1d4ed8;

    padding:8px 14px;
    border-radius:999px;

    font-size:.82rem;
    font-weight:700;

    white-space:nowrap;
}

/* MAIN CARD */

.protein-main-card{
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:22px;

    background:#fff;

    box-shadow:0 2px 12px rgba(0,0,0,0.04);
}

.protein-main-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;

    margin-bottom:24px;
}

.protein-label{
    font-size:.8rem;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:#64748b;
    margin-bottom:8px;
}

.protein-name-modern{
    font-size:1.4rem;
    font-weight:700;
    line-height:1.3;
}

.protein-name-modern a{
    color:#0f172a;
    text-decoration:none;
}

.protein-name-modern a:hover{
    color:#2563eb;
}

/* UNIPROT */

.uniprot-btn{
    display:flex;
    flex-direction:column;
    align-items:flex-end;

    background:#eff6ff;
    border:1px solid #bfdbfe;

    padding:10px 14px;
    border-radius:14px;

    text-decoration:none;
    color:#1d4ed8;

    min-width:140px;
}

.uniprot-btn:hover{
    background:#dbeafe;
}

.uniprot-btn span{
    font-size:.78rem;
    color:#64748b;
    margin-top:2px;
}

/* GRID */

.protein-info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.protein-info-item{
    background:#f8fafc;
    border-radius:14px;
    padding:16px;
}

.protein-info-item label{
    display:block;
    font-size:.78rem;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#64748b;

    margin-bottom:8px;
}

.protein-info-item div{
    font-size:.95rem;
    font-weight:600;
    color:#111827;

    word-break:break-word;
}

.protein-info-item a{
    color:#2563eb;
    text-decoration:none;
}

.protein-info-item a:hover{
    text-decoration:underline;
}

/* FUNCTION */

.protein-function-card{
    border-radius:18px;
    padding:20px;

    background:linear-gradient(135deg,#f8fafc,#ffffff);
    border:1px solid #e5e7eb;
}

.function-title{
    font-size:.9rem;
    font-weight:700;
    color:#0f172a;

    margin-bottom:12px;
}

.function-text{
    color:#374151;
    line-height:1.7;
    font-size:.95rem;
}

/* SYNONYMS */

.protein-synonyms-card{
    border:1px solid #e5e7eb;
    border-radius:18px;
    overflow:hidden;
    background:#fff;
}

/* RESPONSIVE */

@media(max-width:900px){

    .protein-main-top{
        flex-direction:column;
    }

    .uniprot-btn{
        align-items:flex-start;
    }

    .protein-header-modern{
        flex-direction:column;
    }
}

/* =========================
   PROTEIN HEADER
========================= */

.protein-header-modern{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    margin-bottom:20px;
}

.protein-heading-left{
    flex:1;
}

.protein-name-modern{
    margin-top:8px;
    font-size:1.5rem;
    font-weight:700;
    line-height:1.3;
}

.protein-name-modern a{
    color:#0f172a;
    text-decoration:none;
}

.protein-name-modern a:hover{
    color:#2563eb;
}

.protein-organism-modern{
    margin-top:8px;
    color:#64748b;
    font-size:.95rem;
}

/* RIGHT SIDE */

.protein-header-right{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:10px;
}

/* UNIPROT CHIP */

.uniprot-chip{
    display:flex;
    flex-direction:column;

    padding:10px 14px;

    background:#eff6ff;
    border:1px solid #bfdbfe;

    border-radius:14px;

    text-decoration:none;

    min-width:180px;
}

.uniprot-chip:hover{
    background:#dbeafe;
}

.chip-label{
    font-size:.72rem;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#64748b;
    margin-bottom:4px;
}

.chip-main{
    font-size:1rem;
    font-weight:700;
    color:#1d4ed8;
}

.chip-sub{
    margin-top:3px;
    font-size:.78rem;
    color:#64748b;
}

/* CLASS */

.protein-class-badge{
    background:linear-gradient(135deg,#dbeafe,#eff6ff);
    color:#1d4ed8;

    padding:8px 14px;
    border-radius:999px;

    font-size:.8rem;
    font-weight:700;
}

/* RESPONSIVE */

@media(max-width:900px){

    .protein-header-modern{
        flex-direction:column;
    }

    .protein-header-right{
        width:100%;
        align-items:flex-start;
    }

    .uniprot-chip{
        width:100%;
    }
}


.ligand-section-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ligand-hero-layout {
    align-items: center;
}

.modern-stats-grid {
    margin-top: 10px;
}

.structure-section {
    margin-bottom: 24px;
}

.structure-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}




/*******************************/
/*     KEYWORD SEARCH          */
/*******************************/


.bound-type {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;  /* center horizontally */
    gap: 6px;
    margin-top: 8px;
}

.bound-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;   /* full pill */
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 1px solid transparent;
}


/* Covalent */
.badge-green {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}


/* Docked */
.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

/* Non-covalent */
.badge-orange {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}





/* KEYWORD SEARCH  */



/* ---------------------------
   SEARCH BOX
---------------------------- */

.main-container {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    padding: 120px 20px 20px 20px;
}

.container {
    max-width: 1500px;
}


.search-box{
    display:flex;
    align-items:center;
    margin-bottom: 20px;
    gap:10px;
}

.search-box select{
    padding:10px 12px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:15px;
}


.search-box input {
    padding: 8px 10px;
    width: 380px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.search-box button {
    padding: 8px 14px;
    border: none;
    background: #2c6bed;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.search-box button:hover {
    background: #1f4fb8;
}


mark {
    background-color: #ffe066;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}


.match-sources {
    font-size: 12px;
    opacity: 0.8;
}

.match-badge {
    display: inline-block;
    background: #e8f0ff;
    border: 1px solid #b3d1ff;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 4px;
    font-size: 11px;
}



.search-page {
    max-width: 1400px;
    margin: auto;
    padding: 30px;
}

.search-header {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.search-box button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
}

.results-count {
    margin-top: 12px;
    color: #666;
    font-size: 14px;
}

.protein-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.protein-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.protein-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.protein-title-group h2 {
    margin: 0;
    font-size: 22px;
}

.meta-row {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.tag {
    background: #eef2ff;
    color: #3730a3;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.entry-count {
    color: #777;
    font-size: 13px;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    text-align: left;
    padding: 14px;
    background: #f8fafc;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
}

.results-table td {
    padding: 16px 14px;
    border-top: 1px solid #eee;
    vertical-align: top;
}

.results-table tr:hover {
    background: #fafafa;
}

.ligand-pill,
.pdb-pill,
.reaction-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 14px;
}

.chemistry-group,
.match-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chem-badge {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.residue {
    background: #dcfce7;
    color: #166534;
}

.warhead {
    background: #fee2e2;
    color: #991b1b;
}

.match-badge {
    background: #ede9fe;
    color: #5b21b6;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 60px 0;
}


/* ===========================
   Match Section
=========================== */

.match-section{
    margin-top:1rem;
    text-align:center;
}

.match-title{
    position:relative;
    margin-bottom:0.8rem;
}

.match-title::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:1px;
    background:#e5e7eb;
}

.match-title span{
    position:relative;
    background:#fff;
    padding:0 .75rem;
    color:#6b7280;
    font-size:.82rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.match-group{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:.45rem;
}

.match-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:.35rem .8rem;

    border-radius:999px;

    background:#f3f6fb;
    border:1px solid #dbe7ff;

    color:#2563eb;
    font-size:.82rem;
    font-weight:600;

    transition:.2s;
}

.match-badge:hover{
    background:#2563eb;
    color:#fff;
    transform:translateY(-1px);
}

/****************************************/
/* 			STRUCTURE SEARCH            */  
/****************************************/


.search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.search-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h1 {
    margin-bottom: 8px;
    color: #1f2937;
}

.card-header p {
    color: #6b7280;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-group input[type=text],
.form-group input[type=number] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.editor-wrapper {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #d1d5db;
}

.editor-wrapper iframe {
    width: 100%;
    height: 700px;
    border: none;
}

.options-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.search-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}



.score-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;

    background: #e0f2fe;
    color: #0369a1;

    font-size: 0.85rem;
    font-weight: 600;
}


/*********************************/
/*     Statistics                */
/********************************/
.stats-page {
max-width: 1500px;
margin: 0 auto;
padding: 30px;
}

.hero-section {
text-align: center;
margin-bottom: 50px;
}

.hero-image {
width: 70%;
max-width: 900px;
height: auto;
}

.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
gap: 20px;
margin-bottom: 40px;
}

.stat-card {
padding: 25px;
border-radius: 12px;
color: white;
text-align: center;
box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.stat-card h2 {
margin: 0;
font-size: 2rem;
}

.orange { background:#ff9800; }
.purple { background:#d4b0d2; }
.cyan   { background:#9bd0d5; }
.blue   { background:#29aad5; }
.red    { background:#d5264a; }
.green  { background:#9cc03e; }

.chart-card,
.image-card {
background: white;
border-radius: 12px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.chart-card h3,
.image-card h3 {
margin-bottom: 20px;
}

.chart-card {
height: 900px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);

    /* IMPORTANT: remove fixed stretching */
    display: flex;
    flex-direction: column;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 500px;   /* default */
}

.donut-card {
height: 600px;
}

.image-card img {
width: 100%;
height: auto;
}

@media (max-width: 992px) {


.chart-card {
    height: 600px;
}

.hero-image {
    width: 100%;
}


}



/* Sequence search */

.sequence-search-box textarea {
    width: 100%;
    max-width: 700px;
    font-family: monospace;
    resize: vertical;
}
.blast-table-wrap { overflow-x: auto; }
.blast-table { border-collapse: collapse; width: 100%; }
.blast-table th, .blast-table td { padding: 6px 10px; border-bottom: 1px solid #ddd; text-align: left; }
.blast-alignments {
    font-family: monospace;
    background: #f7f7f7;
    padding: 1em;
    overflow-x: auto;
}



/* reactivity-level */

.reactivity-level {
    display: inline-block;
    padding: 3px 9px;
    margin-left: 5px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9em;
}

.reactivity-level.high {
    background-color: #d4edda;
    color: #155724;
}

.reactivity-level.intermediate {
    background-color: #ffe5b4;
    color: #8a4b00;
}

.reactivity-level.low {
    background-color: #f8d7da;
    color: #721c24;
}

/* ---- Mechanism cards ---- */
.rx-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.rx-header {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 500;
}
.rx-header a { color: #1d4ed8; text-decoration: none; }
.rx-header a:hover { text-decoration: underline; }

.rx-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.rx-row:last-child { border-bottom: none; }

/* Warhead */
.rx-warhead {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.rx-warhead-img {
    width: 64px;
    height: 64px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rx-warhead-img img { width: 52px; height: 52px; }
.rx-warhead span { font-size: 12px; color: #64748b; }

/* Residue title */
.rx-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rx-title b { font-size: 16px; font-weight: 500; }
.rx-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #64748b;
}

/* Stats */
.rx-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}
.rx-stats div   { background: #f8fafc; border-radius: 8px; padding: 6px 10px; }
.rx-stats small { display: block; font-size: 11px; color: #94a3b8; }
.rx-stats span  { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Predictions */
.rx-preds {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 16px;
    font-size: 13px;
}
.rx-pred-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    color: #475569;
}

.rx-pill {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 500;
}
.rx-pill.high         { background: #eaf3de; color: #27500a; }
.rx-pill.intermediate { background: #ffedd5; color: #7c2d12; }
.rx-pill.low          { background: #fcebeb; color: #791f1f; }

.rx-bar {
    height: 6px;
    border-radius: 3px;
    background: #f1f5f9;
    overflow: hidden;
}
.rx-bar > i { display: block; height: 100%; font-style: normal; }
.rx-bar.high > i         { background: #639922; }
.rx-bar.intermediate > i { background: #f97316; }
.rx-bar.low > i          { background: #e24b4a; }

/* ABPP Derived Evidence */
.abpp-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 8px 12px;
  border: 1px solid #e3e6ea;
  border-left: 4px solid #999;
  border-radius: 6px;
  background: #fafbfc;
  font-size: 0.9em;
}
.abpp-panel.is-high { border-left-color: #28a745; }
.abpp-panel.is-low  { border-left-color: #dc3545; }

.abpp-title {
  font-weight: 600;
  color: #333;
}

.abpp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  color: #fff;
}
.abpp-pill.is-high { background-color: #28a745; }
.abpp-pill.is-low  { background-color: #dc3545; }

.abpp-stats {
  display: inline;          /* overrides the old flex */
  margin-left: auto;
  color: #555;
  font-size: 0.9em;
  white-space: nowrap;
}
.abpp-stats b { color: #222; }


.abpp-stat small {
  font-size: 0.85em;
}

.abpp-stats {
  margin-left: auto;
  color: #555;
  font-size: 0.9em;
  white-space: nowrap;
}
.abpp-stats b { color: #222; }


.abpp-panel.is-na { border-left-color: #adb5bd; }
.abpp-na { margin-left: auto; color: #777; font-style: italic; font-size: 0.9em; }



.abpp-panel.level-ligandable   { background: #e6f4ea; border-left: 4px solid #2e7d32; }
.abpp-panel.level-unligandable { background: #fdecea; border-left: 4px solid #c62828; }
.abpp-panel.level-ambiguous    { background: #fff3e0; border-left: 4px solid #ef6c00; }
.abpp-panel.level-unavailable  { background: #f1f1f1; border-left: 4px solid #757575; }

.abpp-pill.level-ligandable   { background: #2e7d32; color: #fff; }
.abpp-pill.level-unligandable { background: #c62828; color: #fff; }
.abpp-pill.level-ambiguous    { background: #ef6c00; color: #fff; }
.abpp-pill.level-unavailable  { background: #757575; color: #fff; }
