/* Universal Box-Sizing */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

/* General Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* ADDED: Prevents horizontal overflow */
}

main {
    flex: 1 0 auto;
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #005f73;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
nav ul li {
    margin-left: 2rem;
}
nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    font-size: 1.1rem;
}
nav ul li a:hover {
    color: #0077b6;
}

/* NEW: Hamburger Menu Button Styles */
.nav-toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.8rem;
    color: #005f73;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Homepage Section */
.home-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.home-header {
    padding: 3rem 2.5rem;
    text-align: center;
    background: linear-gradient(to right, #005f73, #0a9396);
    color: white;
}
.home-header h1 {
    margin: 0;
    font-size: 2.8rem;
}
.home-header p {
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0.5rem auto 0;
    max-width: 700px;
}
.cta-container {
    margin-top: 2rem;
}

/* Info Grid and Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 2.5rem;
}
.info-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #0a9396;
    transition: box-shadow 0.3s ease;
}
.info-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.info-card h2 {
    color: #005f73;
    margin-top: 0;
}
.info-card p {
    color: #555;
}

/* Prediction Tool Section */
.prediction-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.prediction-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.prediction-header {
    padding: 2rem 2.5rem;
    background-color: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}
.prediction-header h1 {
    margin: 0;
    font-size: 2rem;
    color: #005f73;
}
.prediction-header p {
    margin: 0.5rem 0 0;
    color: #555;
    font-size: 1.1rem;
}
.prediction-form {
    padding: 2.5rem;
    text-align: center;
}
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    text-align: left;
}
.input-grid.single-column {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.input-column {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #0a9396;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}
.input-column:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.input-column h2 {
    margin-top: 0;
    color: #005f73;
    font-size: 1.5rem;
}
.input-column p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}
.input-column textarea {
    width: 100%;
    height: 200px;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Other Styles */
.invalid-input {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}
.button-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.file-input {
    display: none;
}
.file-upload-label, .example-button {
    flex: 1;
    text-align: center;
    padding: 0.8rem 1.2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.file-upload-label {
    background-color: #e9ecef;
    color: #333;
}
.file-upload-label:hover {
    background-color: #dee2e6;
}
.example-button {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
    font-size: 1em;
    font-family: inherit;
}
.example-button:hover {
    background-color: #5a6268;
}
.model-selector {
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: left;
}
.model-selector strong {
    font-size: 1rem;
    color: #333;
    font-weight: 700;
    display: block;
    margin-bottom: 0.75rem;
}
.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.radio-group:last-child {
    margin-bottom: 0;
}
.radio-group input[type="radio"] {
    transform: scale(1.2);
}
.radio-group label {
    font-size: 0.95rem;
    color: #555;
}
.threshold-selector {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: #333;
}
.threshold-selector label {
    font-weight: 700;
}
.threshold-selector select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff;
}
.predict-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(45deg, #ee9b00, #ca6702);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.predict-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 155, 0, 0.4);
}

/* Dataset Page Styles */
.dataset-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.dataset-content {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.dataset-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}
.dataset-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.dataset-card h2 {
    margin-top: 0;
    color: #005f73;
    border-bottom: 2px solid #0a9396;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.dataset-card p {
    color: #555;
    margin-bottom: 1.5rem;
}
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.file-item:last-child {
    border-bottom: none;
}
.file-item span {
    font-weight: 500;
    color: #333;
}
.download-button-small {
    background-color: #0077b6;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}
.download-button-small:hover {
    background-color: #005f73;
}

/* Standalone Page Styles */
.standalone-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.standalone-content {
    padding: 2.5rem;
    text-align: center;
}
.main-download-area {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e0e0e0;
}
.main-download-area h2 {
    color: #005f73;
    font-size: 1.8rem;
    margin-top: 0;
}
.main-download-area p {
    max-width: 600px;
    margin: 1rem auto 1.5rem auto;
    color: #555;
}
.repo-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
    align-items: start;
}
.repo-card {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.repo-card h3 {
    margin-top: 0;
    color: #005f73;
}
.repo-card p {
    color: #555;
    margin-bottom: 1rem;
}
.command-block {
    background-color: #2b2b2b;
    color: #f2f2f2;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
    text-align: left;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.repo-button {
    background-color: #6c757d;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
}
.repo-button:hover {
    background-color: #5a6268;
}

/* Developer Page Styles */
.developer-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.author-grid {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.author-card {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.author-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    border: 4px solid #f0f0f0;
}
.author-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #005f73;
}
.author-designation {
    margin: 0 0 1.5rem 0;
    color: #555;
    font-size: 1rem;
    font-style: italic;
}
.author-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.author-socials a img {
    height: 24px;
    width: 24px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.author-socials a:hover img {
    opacity: 1;
}

/* Contact Page Styles */
.contact-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.contact-grid {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: center;
}
.contact-image-container img {
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 0 auto;
}
.contact-details h2 {
    margin-top: 0;
    font-size: 2rem;
    color: #005f73;
}
.contact-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}
.contact-address {
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.contact-item {
    margin-bottom: 1rem;
    font-size: 1rem;
}
.contact-item strong {
    color: #005f73;
    margin-right: 0.5rem;
}
.contact-item a {
    color: #0077b6;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-item a:hover {
    color: #005f73;
}

/* Help Page Styles */
.help-section {
    padding: 3rem 5%;
    background-color: #f4f7f6;
}
.help-content {
    padding: 2.5rem;
}
.help-step {
    margin-bottom: 3rem;
}
.help-step:last-child {
    margin-bottom: 0;
}
.help-step h2 {
    color: #005f73;
    font-size: 1.8rem;
    border-bottom: 2px solid #0a9396;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.help-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.help-description ul {
    list-style-type: disc;
    padding-left: 20px;
}
.help-screenshot img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
footer {
    background-color: #333;
    color: #fff;
    padding: 1.5rem 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    padding: 0 1.5rem;
    width: 100%;
}
.footer-left {
    flex-basis: 50%;
}
.footer-lab-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}
.footer-lab-link:hover {
    color: #0a9396;
}
.social-icons {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}
.social-icons a {
    color: #ccc;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.social-icons a:hover {
    color: #fff;
    transform: scale(1.1);
}
.footer-right {
    flex-basis: 50%;
    text-align: left;
}
.footer-right h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-links li {
    margin-bottom: 0;
}
.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: #fff;
}

/* Responsive Design */
/* Responsive Design */
@media (max-width: 992px) {
    /* For tablets */
    .author-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    /* For mobile phones */
    .home-header h1 {
        font-size: 2.2rem;
    }
    .input-grid {
        grid-template-columns: 1fr;
    }

    /* UPDATED: Mobile Navigation Styles */
    .nav-toggle {
        display: block; /* Show the hamburger button */
    }

    nav {
        flex-direction: row; /* Keep logo and button side-by-side */
        flex-wrap: wrap; /* Allow menu to drop below */
    }

    nav ul {
        display: none; /* Hide the menu by default */
        flex-direction: column;
        width: 100%; /* Make the menu full-width */
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem; /* Space between button and menu */
    }
    
    /* NEW: This class will be toggled by JavaScript */
    nav ul.nav-menu-visible {
        display: flex;
    }

    nav ul li {
        margin-left: 0;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-left, .footer-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-right {
        margin-top: 2rem;
    }
    .footer-links {
        justify-content: center;
    }
    .repo-links {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-details {
        margin-top: 2rem;
    }
}
