/* =================================================== */
/* 1. GLOBAL & BASE STYLES                           */
/* =================================================== */
body {
    font-family: Arial, sans-serif;
    background-image: url('background.png');
    background-position: top left;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% auto;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    overflow-y: auto; /* Enable vertical scrolling */
    height: auto; /* Allow dynamic height */
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* =================================================== */
/* 2. MAIN CONTAINER                                  */
/* =================================================== */
.container {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 80%;
    max-width: 1200px;
    max-height: 90vh; /* Slightly reduced to prevent cutoff */

    overflow-y: auto; /* Allows vertical scrolling */
    overflow-x: hidden; /* Prevents horizontal scrolling */

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* =================================================== */
/* 3. HEADER & LOGOS                                  */
/* =================================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.logo-left, .logo-right {
    height:65px;
    width: auto;
    transition: 0.15s ease-in-out;
}

.logo-right {
    height: 75px; 
}

.logo-left {
    height: 75px; 
}

.logo-left:hover,
.logo-right:hover {
    opacity: 1;
    transform: scale(1.05);
    transition: 0.15s ease-in-out;
}

/* =================================================== */
/* 4. LINK STYLES                                     */
/* =================================================== */
p a,
li a {
  color: rgb(241, 196, 15);
  text-decoration: none;
}

p a:hover,
li a:hover {
  color: rgb(241, 196, 15); /* same color */
  text-decoration: underline;
}

/* =================================================== */
/* 5. HEADINGS & HORIZONTAL RULE                      */
/* =================================================== */
h1 {
    color: rgb(255, 141, 128);
    margin-bottom: 10px;
    margin-left: 35px;
    margin-right: 35px;
}

h2 {
    color: rgb(241, 196, 15);
    margin-top: 10px; /* Reduce space above */
    margin-bottom: 20px; /* Reduce space below */
    text-align: left;
}

h2::before {
    content: "◌ ";  /* Small circle decoration */
    font-weight: bold;    /* Use bold to thicken the symbol */
    font-size: 1.5em;     /* Increase size if needed */
    color: rgb(255, 141, 128);
}

h3 {
    color: rgb(241, 196, 15);
    text-align: center;
}

h4 {
    color: rgb(255, 141, 128);
    text-align: left;
}

hr {
    border: 1px solid white;
    margin-bottom: 20px;
    width: 100%;
}

/* =================================================== */
/* 6. CONTENT LAYOUT                                  */
/* =================================================== */
.content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.form-container {
    width: 25%;
}

.results-container {
    width: 70%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0; /* Ensures no extra padding at the bottom */
}

/* =================================================== */
/* 7. FORMS                                           */
/* =================================================== */
form {
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    text-align: left;
}

/* Special background colors for certain fields */
#kd1 {
    background-color: rgb(235, 189, 255); 
  }

#concentration1 {
    background-color: rgb(177, 215, 255); 
  }

#concentration2 {
    background-color: rgb(185, 252, 185); 
  }

#kd2, #concentrationInhibitor {
    background-color: rgb(255, 203, 203);
  }

input, select {
    padding: 8px;
    font-size: 14px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

label {
    font-size: 20px;
    color: white;
}

/* =================================================== */
/* 8. BUTTONS                                         */
/* =================================================== */
.button-container {
    display: flex;
    justify-content: center;
    gap: 25px; /* Adds space between buttons */
    flex-wrap: wrap; 
}

button {
    padding: 10px 15px;
    font-size: 20px;
    background-color: rgb(65, 157, 255);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.reg-btn {
    background-color: rgb(65, 157, 255);
  }
  
.calc-btn {
    background-color: rgb(255, 141, 128);
  }

.log-btn {
    background-color: rgb(168, 168, 168);
  }

button:hover {
    background-color: rgb(241, 196, 15);
}

/* =================================================== */
/* 9. POWERED BY + LOGOS SECTION                         */
/* =================================================== */

.powered-text {
    font-size: 16px;      /* Smaller text */
    opacity: 0.8;
    margin-bottom: 5px;
    text-align: center;
    white-space: nowrap;  /* Forces single line */
}

.institution-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;   /* fallback for very small screens */
}

.institution-logos img {
    height: 28px;       /* adjust size here */
    width: auto;
    opacity: 0.9;
    filter: drop-shadow(0 0 3px black);
}

.institution-logos a img:hover {
    opacity: 1;
    transform: scale(1.05);
    transition: 0.15s ease-in-out;
}

references {
    font-size: 16px;
    color: white; 
}

references a {
    color: rgb(241, 196, 15);
    text-decoration: none; 
}

references a:hover {
    text-decoration: none; 
    color: rgb(65, 157, 255); 
}

.powered-text {
    display: block;
    width: 100%;
    text-align: center !important;
}



/* =================================================== */
/* 10. RESULTS & EXPLANATION                           */
/* =================================================== */
#results {
    margin-bottom: 0px;
    font-size: 16px;
    text-align: left;
    width: 90%;
}

.explanation-container {
    width: 100%;
    margin-top: 20px;
    box-sizing: border-box;
}

.explanation {
    margin-bottom: 10px;
    font-size: 14px;
    color: white;
}

.explanation-container ul {
    text-align: left;
}

.explanation-container p {
    text-align: justify;
  }

.equation {
    margin-bottom: 10px;
    font-size: 14px;
    color: white;
}

/* =================================================== */
/* 11. COLOR CLASSES                                  */
/* =================================================== */
.protein-a {
    color: rgb(65, 157, 255);
}

.protein-b {
    color: rgb(93, 248, 93);
}

.complex-a-b {
    color: rgb(221, 136, 255);
}

.complex-a-i {
    color: rgb(173, 106, 106);
}

.inhibitor {
    color: rgb(255, 141, 128);
}

.remaining {
    color: rgb(241, 196, 15);
}

/* =================================================== */
/* 12. INTRO SECTION                                  */
/* =================================================== */
#introSection {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: justify;
}

/* =================================================== */
/* 13. IMAGE CAPTION & DISCLAIMER                     */
/* =================================================== */
.image-caption {
    font-size: 14px;
    color: rgb(241, 196, 15);
    margin-top: 5px;
    text-align: center;
}

.disclaimer {
    color: rgb(241, 196, 15);
    font-size: 18px;
    text-align: left;
    margin: 10px auto; 
    margin-top: 0px;
    margin-bottom: 0px;
    display: flex; 
    align-items: center;
    justify-content: center;
    padding: 0px;
}

/* =================================================== */
/* 14. EXAMPLE IMAGE                                  */
/* =================================================== */
.example-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; 
    text-align: center;
    margin-top: 10px;
}

.example-image img {
    width: 95%; 
    max-width: 700px;
    height: auto;
    display: block;
    margin: 0 auto; 
    border-radius: 25px;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.6);
}

figure {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

/* =================================================== */
/* 15. TOP ROW & CHART CONTENT                        */
/* =================================================== */
/* Flex container for the top row (left image and right content) */
.top-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  
/* Left side: vertical image */
.complex {
    flex: 0 0 auto;  /* fixed size */
    width: 200px;    /* adjust as needed */
  }

.complex img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; 
    border-radius: 25px;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.6);
  }
  
/* Right side: container for pie charts and inhibitor analysis */
.chart-content {
    flex: 1 1 auto;
  }
  
/* =================================================== */
/* 16. PIE CHARTS                                 */
/* =================================================== */
.chart-row {
    display: flex;
    flex-direction: row;
    gap: 0px;
    margin: 0 0;
  }

  .chart-row canvas {
    max-width: 200px; /* shrinks the actual chart canvas */
    margin: 0 auto;   /* centers the canvas within the container */
    display: block;
  }

#proteinAChartNoLigandContainer,
#proteinAChartContainer {
    min-width: 220px;
    width: 100%;
    height: 250px;
    transition: width 0.3s ease;  /* Animates width changes smoothly */   
}
  
/* Titles and captions */
.results-title {
    margin: 0 0 5px 0;
    font-size: 22px;
    text-align: left;
  }
  
/* =================================================== */
/* 17. HISTOGRAM & CURVE                              */
/* =================================================== */

.charts-container .hist-row {
    margin-top: 10px;
  }

  .hist-row canvas{
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }
  
#complexRemainingChartContainer {
  /* Allows container to shrink or grow, but never beyond 400px */
  width: 100%;
  max-width: 400px;
  height: 300px; 
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: width 0.3s ease;   /* Animates width changes smoothly */
}

/* CURVE */
#complexVsInhibitorChartContainer {
    width: 100%;
    height: 500px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =================================================== */
/* 18. OVERRIDES                         */
/* =================================================== */

.image-caption {
    font-size: 16px;
    font-style: italic;
    color: white;
    margin-top: 5px;
    text-align: center;
}

/* =================================================== */
/* 19. SCROLL BAR STYLING                             */
/* =================================================== */
.container::-webkit-scrollbar {
    width: 10px; 
}
.container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}
.container::-webkit-scrollbar-thumb {
    background-color: rgb(241, 196, 15); 
    border-radius: 5px;
    border: 1px solid transparent;
}
.container::-webkit-scrollbar-thumb:hover {
    background-color: rgb(255, 141, 128); 
}

.container {
    scrollbar-color: rgb(241, 196, 15) rgba(255,255,255,0.1);
    scrollbar-width: thin;
}

/* =================================================== */
/* 21. STATS                         */
/* =================================================== */
#statsWrapper {
    width: 80%;
    margin: auto;
    display: none;
    height: 500px; /* sets the container height */
  }
  
  /* If you want to set it on the canvas itself */
  #statsChart {
    height: 100%;  /* Make canvas take the full height of its container */
  }
