/* =====================================
   THEME VARIABLES
===================================== */
:root {
  --hope-green: #6ead8b;
  --bioinformatics-blue: #0d1661;
  --gradient: linear-gradient(135deg, #6ead8b, #0d1661);

  --high-light: #6ead8b42;
  --background: #030f2b;
  --gray-40: #666f82;
  --gray-15: #c0c3ca;

  --danger: #ec6354;

  --card-bg: #ffffff;
}

/* =====================================
   BASE LAYOUT
===================================== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  margin: 0;
  padding: 0;
}

header {
  max-width:90%;
  margin:40px auto;
  padding:30px;
  background: var(--card-bg);
  border-radius:18px;
  box-shadow: 0 20px 50px rgba(52,152,219,0.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
}

footer {
  width: 90%;
  margin: 40px auto;
  padding: 30px;
  border-radius: 18px;
  color: white;
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
  border-top: #214055 2px solid;
  border-bottom: #214055 2px solid;
}

.container {
  max-width: 90%;
  margin: 40px auto;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(52, 152, 219, 0.08);
}

h1 {
  font-size: 36px;
  margin-bottom: 5px;
  margin-top: 0;
  color: var(--bioinformatics-blue);
}

h2 {
  margin-top: 30px;
  color: var(--bioinformatics-blue);
}

h3 {
  font-size: 16px;
  color: var(--gray-40);
}

h4 {
  font-size: 20px;
  color: var(--gray-40);
  text-transform: uppercase;
  border-bottom: 2px solid var(--gray-40);
  margin-top: 0;
}

p {
  color: var(--gray-40);
  font-size: medium;
  margin: 0 !important
}

iframe {
  width: 100%; 
  height: 450px; 
  border: 1px solid #cbd5e1; 
  border-radius: 6px; 
  background: white; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* =====================================
   BUTTONS
===================================== */
button {
  background: var(--bioinformatics-blue);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

button:hover {
  filter: brightness(1.08);
  transform: scale(1.03);
}

.prediction-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease;
}

.prediction-content.open {
    max-height: 1000px; /* suficientemente grande */
    opacity: 1;
    padding: 15px;
}

/* =====================================
   CARDS
===================================== */
.query-options {
  display: grid;
  column-gap: 60px;
  margin: 20px;
  grid-template-columns: repeat(2, 1fr);
}

.query-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.protein {
  background-image: url(/static/images/protein_target_bg.png);
}

.compound {
  background-image: url(/static/images/compound_identifier_bg.png)
}

.query-card h2 {
  align-self: flex-start;
  padding: 20px;
  margin: 0;
  box-sizing: border-box;
}

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

.query-card p {
  color: var(--card-bg);
  margin: 10px !important;
  display: flex;
  text-align: center;
}

.grid {
  margin-bottom: 5px;
  padding: 10px;
  display: grid;
  gap: 16px;
  color: var(--gray-15);
}

.grid-protein {
  margin: 45px;
  grid-template-columns: 1fr 1fr;
  border-top: solid 1px var(--gray-15);
  border-bottom: solid 1px var(--gray-15);
  border-radius: 18px;
}

.grid-compound {
  margin: 20px;
  grid-template-columns: 1fr 3fr;
  border-top: solid 1px var(--gray-15);
  border-bottom: solid 1px var(--gray-15);
  border-radius: 18px;
}

.protein .grid {
  grid-template-rows: repeat(3, auto); /* 3 filas */
}

.compound .grid {
  grid-template-rows: repeat(5, auto); /* 3 filas */
}

.query-card button {
  margin-bottom: 10px;
}

/* =====================================
   TABLE
===================================== */
table { 
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px; 
  font-size: 0.92em; 
  min-width: 800px;
}
        
th, td { 
  padding: 10px 14px; 
  text-align: left; 
  border-bottom: 1px solid var(--gray-15); 
  vertical-align: middle; 
}
        
th { 
  background-color: var(--bioinformatics-blue); 
  color: #ffffff; 
  letter-spacing: 0.5px; 
  text-transform: uppercase;
}
        
tr:hover { 
  background-color: #f1f5f9; 
}

/* =====================================
   BADGE
===================================== */
.badge { 
  display: inline-block; 
  padding: 3px 8px; 
  border-radius: 18px; 
  font-size: 0.85em; 
  font-weight: 500; 
}
        
.badge-id { 
  background-color: #f1f5f9; 
  color: #475569; 
  border: 1px solid var(--gray-15); 
}
        
.badge-success { 
  background-color: var(--high-light); 
  color: #166534; 
}
        
.badge-danger { 
  background-color: #fee2e2; 
  color: #991b1b; 
}
        
.status-pos { 
  color: #dc2626; 
  font-weight: 600; 
}
        
.status-neg { 
  color: #16a34a; 
  font-weight: 600; 
}
        
.tooltip { 
  position: relative; 
  cursor: help; 
  border-bottom: 1px dotted #94a3b8; 
}
        
.structure-thumb { 
  max-width: 100px; 
  max-height: 100px; 
  background: #ffffff; 
  border-radius: 18px; 
  border: 1px solid #cbd5e1; 
  padding: 4px; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}

/* =====================================
   INTERACTIVE FEATURES UI EXTENSIONS
===================================== */
th.sortable { 
  cursor: pointer; 
  position: relative; 
  user-select: none; 
  transition: background-color 0.15s ease; 
}
        
th.sortable:hover { 
  background-color: #334155; 
}
        
.search-container { 
  margin-bottom: 15px; 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; 
}
        
.search-input { 
  padding: 8px 14px; 
  width: 380px; 
  border: 1px solid #cbd5e1; 
  border-radius: 18px; 
  font-size: 0.9em; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
  outline: none; 
  transition: all 0.2s ease; 
}
        
.search-input:focus { 
  border-color: #3b82f6; 
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); 
}

/* =====================================
   FOOTER
===================================== */
.footer-top,
.footer-bottom{
  display: flex;
  /* justify-content:space-between; */
  gap: 20px;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  /* gap:clamp(12px, 3vw, 40px); */
}

.footer-bottom {
  gap: 10px;
}

footer p {
  display:flex;
  align-items:center;
  justify-content:center;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* =====================================
   RESPONSIVE
===================================== */
@media (max-width: 768px) {
    footer {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px 16px !important;
        box-sizing: border-box;
        align-items: center;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
    }
    footer p {
        margin-top: 5px;
        margin-bottom: 0;
        text-align: center;
    }
    .query-options {
        grid-template-columns: 1fr;
        margin: 0;
        margin-top: 20px;
    }
}