/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body covers full viewport height */
}

/* Container styles */
.container {
    background: #ffffff;
    border-radius: 10px;
    max-width: 1200px;
    padding: 20px 40px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    width: 98%;
    align-items: center;
    margin: 10px auto; /* Center the container */
}

/* Heading styles */
h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Options styles */
.experiment-options,
.compare-groups-options,
.species-options {
    display: flex;
    align-items: center;
    gap: 30px;        /* Gap between the options */
    margin-top: 10px; /* Space between the label and the options */
    font-weight: bold;
    flex-wrap: wrap;  /* Helps on smaller screens */
}

.experiment-options label,
.species-options label {
    display: flex;
    align-items: center;
    font-size: 16px;
    margin-right: 20px;
}

.experiment-options input[type="radio"],
.species-options input[type="radio"] {
    margin-right: 10px; /* Space between radio button and label text */
    vertical-align: middle;
    margin-top: 3px;
}

/* Progress bar styles */
.progress-container {
    display: none;
    width: 100%;
    background: #f3f3f3;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    width: 0%;
    background: #4caf50;
    text-align: center;
    color: white;
    line-height: 20px; /* Center text vertically */
    transition: width 0.2s ease;
}

/* Button styles */
.submit-bttn,
.modal-button,
.copy-btn {
    background: #007bff;
    color: #fff;
    margin-top: 15px;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s, box-shadow 0.3s;
}

.submit-bttn:hover,
.modal-button:hover,
.copy-btn:hover {
    background: #0056b3;
}

.submit-bttn:active {
    background: #004494; /* Darker blue for active state */
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.2); /* Inset shadow effect for active state */
}

/* Navigation bar styles */
.navbar {
    display: flex;
    width: 98%;
    align-items: center;
    background-color: #ffffff; /* White background for the navigation bar */
    padding: 20px 40px; /* Padding for navigation bar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow for a prominent look */
    border-radius: 15px; /* Rounded corners for the navigation bar */
    margin: 20px auto; /* Center the navigation bar */
}

.navbar .logo {
    font-size: clamp(2rem, 3vw + 1rem, 4rem); /* Responsive logo size */
    font-weight: bold;
    color: #003366; /* Dark blue color for the logo text */
    margin-right: 40px;
    white-space: nowrap; /* Prevent the text from breaking into two lines on wide screens */
}

.navbar .nav-links {
    display: flex;
    gap: 30px; /* Gap between the links */
    flex: 1;   /* Allow the nav-links to take up remaining space */
    justify-content: flex-end; /* Align links to the right */
}

.navbar .nav-links a {
    text-decoration: none;
    color: #003366; /* Dark blue color for the links */
    padding: 12px 22px; /* Clickable area */
    border-radius: 25px; /* Rounded corners for the links */
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    background-color: transparent; /* Default background color is transparent */
    font-size: 0.95rem;
}

.navbar .nav-links a:hover,
.navbar .nav-links a:focus {
    background-color: #007bff; /* Blue background color on hover */
    color: #ffffff; /* White text color on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Shadow effect on hover */
}

.navbar .nav-links a:active {
    background-color: #0056b3; /* Darker blue for active state */
    color: #ffffff; /* White text color when active */
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.2); /* Inset shadow effect for active state */
}

/* Submit button style in navigation */
.navbar .nav-links a.submit-btn {
    background-color: #28a745; /* Green background color */
    color: #ffffff; /* White text color */
    font-weight: bold; /* Bold text */
}

.navbar .nav-links a.submit-btn:hover,
.navbar .nav-links a.submit-btn:focus {
    background-color: #218838; /* Darker green on hover */
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* Optional blur effect */
}

.modal-content {
    background-color: #fff;
    margin: 15% auto; /* Center the modal */
    padding: 20px;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Soft shadow */
    width: 90%; /* Responsive width */
    max-width: 500px; /* Maximum width */
    text-align: center; /* Center text */
}

.close {
    color: red;
    float: right;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
}

.close:hover,
.close:focus {
    color: darkred;
    text-decoration: none;
}

/* Canvas container styles */
.canvas-container {
    width: 100%;
    display: flex;
    justify-content: center;  /* Center horizontally */
    align-items: center;      /* Center vertically */
    background-color: #ffffff;
    padding: 20px;
    box-sizing: border-box;
    flex-wrap: wrap;          /* Allow wrapping for responsiveness */
    gap: 20px;                /* Space between items */
}

/* Individual canvases */
#canvas1,
#canvas2,
#canvas3 {
    padding: 10px; /* Padding inside the canvas */
    background: none;
    display: block;
}

/* Make canvases responsive */
.canvas-container canvas {
    max-width: 100%;
    height: auto;
}

/* Footer styles */
.footer {
    background-color: #ffffff;
    color: #003366;
    padding: 20px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto; /* Push footer to bottom when content is short */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.footer-section {
    flex: 1;
    margin: 20px;
    min-width: 200px;
}

.footer-section h3 {
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Footer bottom */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 16px;
    border-top: 1px solid #003366;
}

/* Abstract styles */
.abstract {
    font-family: Arial, sans-serif;
    font-weight: bold;
    line-height: 1.5;
    padding: 20px 60px;
    background-color: #ffffff;
    font-size: 16px;
}

figcaption {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 20px;
    color: black;
}

.abstract-container h2 {
    text-align: left;
    font-size: 24px;
    padding-left: 60px;
    padding-top: 20px;
    margin: 0;
    color: black;
}

/* Image styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Form styles */
.form-viewsub {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px; /* Increased bottom margin for more spacing */
    flex-wrap: wrap; /* Add responsiveness */
}

.form-viewsub label {
    display: block;
    font-weight: bold;
    margin-bottom: 2px; /* Adjust bottom margin for spacing */
    font-size: 16px;
    color: #555;
}

.form-viewsub input[type="text"],
.form-viewsub input[type="email"],
.form-viewsub input[type="file"] {
    width: 100%;
    padding: 10px;
     margin-top: 2px;
    border-radius: 5px;
    font-size: 16px;
    background: #f9f9f9;
    border: 1px solid #ddd; /* Consistent border */
}

.form-viewsub input[type="text"]:focus,
.form-viewsub input[type="email"]:focus,
.form-viewsub input[type="file"]:focus {
    border-color: #007bff; /* Change border color on focus */
    outline: none; /* Remove default outline */
}

.form-viewsub input[type="file"] {
    margin-top: 10px; /* Add space above file input */
}

.form-container {
    width: 50%;
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-container h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.form-submit {
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
}

.form-submit label {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
}

.form-submit input[type="email"] {
    width: 70%;
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 15px;
}

.form-submit input[type="file"] {
    margin-top: 15px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 15px;
}

.form-submit2 input[type="file"] {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 15px;
    margin-bottom: 30px;
}

/* Abstract button styles */
.btn {
    margin-top: 10px; /* Space above the button */
    padding: 10px 20px; /* Button padding */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded button corners */
    cursor: pointer; /* Pointer on hover */
    transition: background-color 0.3s; /* Smooth background transition */
}

.btn-secondary {
    background-color: #007bff; /* Primary color */
    color: white; /* Text color */
}

.btn-secondary:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

.result-button {
    display: inline-block;
    padding: 8px 12px;
    background-color: lightblue;
    color: black;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}

/* ID type options */
.id-type-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    margin: 15px 0;
    flex-wrap: wrap; /* For responsiveness */
}

.id-type-options label {
    display: flex;
    align-items: center;
    gap: 20px;   /* Space between radio and label text */
    margin: 0;
    font-size: 16px;
    white-space: nowrap; /* Keep label text in one line */
}

.id-type-options input[type="radio"] {
    margin: 0;
}

/* ========================= */
/* RESPONSIVE BREAKPOINTS   */
/* ========================= */

/* Tablets / small laptops */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 20px;
        width: 100%;
        border-radius: 0;
    }

    .container {
        max-width: 100%;
        padding: 20px;
    }

    .abstract {
        padding: 20px 30px;
    }

    .abstract-container h2 {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Phones */
@media (max-width: 768px) {
    /* Navbar becomes stacked & narrower */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 16px;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        border-radius: 0;
    }

    .navbar .logo {
        font-size: 2rem;       /* Smaller logo on phones */
        margin-right: 0;
        margin-bottom: 10px;
        white-space: normal;   /* Allow wrapping if needed */
    }

    .navbar .nav-links {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .navbar .nav-links a {
        width: 100%;
        text-align: left;
        padding: 10px 14px;
    }

    /* Stack image + canvases vertically */
    .canvas-container {
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }

    .canvas-container img,
    .canvas-container canvas {
        width: 90vw;
        max-width: 100%;
    }

    /* Softer paddings for text */
    .abstract {
        padding: 15px 16px;
        font-size: 14px;
    }

    .abstract-container h2 {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 15px;
        font-size: 20px;
    }

    .container {
        padding: 15px 16px;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-container {
        margin: 20px 10px;
        width: calc(100% - 20px);
    }
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
  text-decoration: none;
}


/* ============================= */
/* TITLE + METRICS SINGLE LINE  */
/* ============================= */

.title-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding :0;
    margin:0;
    margin-bottom: 8px;
    gap: 24px;
}

.title-line h2 {
    margin: 0;
    text-align: left;
}

/* ============================= */
/* METRICS LINE                  */
/* ============================= */

.metrics-line {
    white-space: nowrap;
    font-size: 1rem;
    gap: 8px;
    font-weight : 600;
    color: #000000;
    margin-right: 60px;
}

.abstract {
    margin-top: 10px;
}

.metrics-line span {
    margin-left: 6px;
}

.metrics-line strong {
    font-weight: 700; 
    color: #28a745;      /* VALUES bold */
}

.status {
    font-weight: 600;
}

/* Base dot */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}

/* Bigger + stronger when healthy */
.dot.green {
    width: 18px;
    height: 18px;
    background-color: #1E7E34;
}

/* Slightly smaller for non-healthy */
.dot.red {
    width: 15px;
    height: 15px;
    background-color: #dc3545;
}
/* ============================= */
/* ABSTRACT TEXT                 */
/* ============================= */

.abstract {
    padding-left: 60px;
    padding-right: 60px;
    margin-top: 12px;
    line-height: 1.6;
    color: #222;
}

/* ============================= */
/* RESPONSIVE (MOBILE)           */
/* ============================= */

@media (max-width: 768px) {
    .title-line {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 16px;
        padding-right: 16px;
    }

    .metrics-line {
        margin-top: 6px;
        white-space: normal;
        font-size: 0.85rem;
    }

    .abstract {
        padding-left: 16px;
        padding-right: 16px;
    }
}

