/* Base Styles and Variables */
:root {
    /* Main Colors */
    --arctic-white: #F8FCFF;
    --crystal-blue: #E7F6FF;
    --soft-mint: #E9FDF5;
    --holographic-pearl: #F5F9FF;
    
    /* Accent Colors */
    --sky-mist: #CFE8FF;
    --aqua-glow: #D9FFFC;
    --lavender-breeze: #EDEBFF;
    --pale-silver: #E5ECF4;
    
    /* Text & Borders */
    --cloud-gray: #D3DCE6;
    --glacier-blue: #BFD7EA;
    --icy-silver: #E0E5EC;
    
    /* Additional Colors for Functionality */
    --text-dark: #333;
    --text-light: #666;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--arctic-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--holographic-pearl);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.center-rbc {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: auto;
}

.orbit-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.orbit-item {
    position: absolute;
    width: 50px;
    height: auto;
    animation: orbit 10s linear infinite;
}

.virus1 { animation-delay: 0s; }
.virus2 { animation-delay: -2.5s; }
.bacteria2 { animation-delay: -5s; }
.fungi { animation-delay: -7.5s; }

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(120px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(120px) rotate(-360deg);
    }
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-image {
    position: absolute;
    opacity: 0.1;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* Header Styles */
header {
    background: linear-gradient(to right, var(--crystal-blue), var(--soft-mint));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
    overflow: hidden;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    height: auto;
    margin-right: 10px;
}

.floating-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    animation: float-text 3s ease-in-out infinite;
}

@keyframes float-text {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    background-color: var(--sky-mist);
    color: var(--text-dark);
}

.header-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-cell {
    position: absolute;
    animation: float-left-right 15s linear infinite;
}

@keyframes float-left-right {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(calc(100vw + 100px));
    }
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-size: 2.5rem;
}

h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.curved-box {
    background: var(--holographic-pearl);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curved-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

/* Welcome Box */
.welcome-box {
    background: linear-gradient(135deg, var(--crystal-blue), var(--soft-mint));
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Search Box */
.search-box {
    background: linear-gradient(135deg, var(--holographic-pearl), var(--lavender-breeze));
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--cloud-gray);
    border-radius: 10px;
    background-color: white;
    font-size: 1rem;
}

.search-btn {
    background: linear-gradient(to right, var(--sky-mist), var(--aqua-glow));
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(to right, var(--aqua-glow), var(--sky-mist));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Featured Pathogens */
.featured-box {
    background: linear-gradient(135deg, var(--soft-mint), var(--crystal-blue));
}

.slider-container {
    position: relative;
    margin: 20px 0;
}

.slide {
    display: none;
    animation: fade 0.5s ease;
}

@keyframes fade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.pathogen-card {
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pathogen-image {
    flex: 0 0 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.pathogen-image img {
    max-width: 100%;
    max-height: 120px;
}

.pathogen-info {
    flex: 1;
    padding: 15px;
}

.pathogen-type {
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #2196F3;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.prev-btn, .next-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-dots {
    text-align: center;
    margin-top: 15px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #2196F3;
}

.pathogen-card {
    display: flex;
    flex-direction: column;
}

.pathogen-card h3 {
    margin-bottom: 0.5rem;
}

.pathogen-info {
    margin-bottom: 0.5rem;
}

.pathogen-info span {
    font-weight: bold;
}

/* Updates Box */
.updates-box {
    background: linear-gradient(135deg, var(--lavender-breeze), var(--crystal-blue));
}

.updates-list {
    list-style: none;
}

.updates-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--cloud-gray);
}

.updates-list li:last-child {
    border-bottom: none;
}

.update-date {
    font-weight: bold;
    color: var(--text-dark);
}

/* Chatbot */
#chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-closed {
    width: 60px;
    height: 60px;
}

.chatbot-open {
    width: 350px;
    height: 500px;
}

.chatbot-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sky-mist);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.chatbot-icon img {
    width: 40px;
    height: 40px;
}

.chatbot-container {
    display: none;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-color);
}

.chatbot-open .chatbot-container {
    display: flex;
    flex-direction: column;
}

.chatbot-open .chatbot-icon {
    display: none;
}

.chatbot-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(to right, var(--crystal-blue), var(--soft-mint));
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chatbot-header h3 {
    flex-grow: 1;
    margin: 0;
}

.close-chatbot {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.chatbot-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    background: var(--arctic-white);
}

.message {
    margin-bottom: 1rem;
    max-width: 80%;
}

.message p {
    padding: 0.8rem;
    border-radius: 15px;
}

.bot {
    align-self: flex-start;
}

.bot p {
    background: var(--crystal-blue);
}

.user {
    align-self: flex-end;
    margin-left: auto;
}

.user p {
    background: var(--soft-mint);
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--cloud-gray);
}

.chatbot-input input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--cloud-gray);
    border-radius: 20px;
    margin-right: 0.5rem;
}

.send-btn {
    background: var(--sky-mist);
    border: none;
    border-radius: 20px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: var(--aqua-glow);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--sky-mist);
    color: var(--text-dark);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top:hover {
    background: var(--aqua-glow);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background: linear-gradient(to right, var(--crystal-blue), var(--soft-mint));
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px var(--shadow-color);
}

footer p {
    color: var(--text-dark);
}

footer a {
    color: var(--text-dark);
    font-weight: bold;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .curved-box {
        padding: 1.5rem;
    }
    
    .chatbot-open {
        width: 300px;
        height: 450px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .chatbot-open {
        width: 280px;
        height: 400px;
    }
}

/* Contact Page Styles */
.intro-text {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-form-box {
    background: linear-gradient(135deg, var(--crystal-blue), var(--soft-mint));
}

.contact-info-box {
    background: linear-gradient(135deg, var(--soft-mint), var(--lavender-breeze));
}

.submit-btn {
    background: linear-gradient(to right, var(--sky-mist), var(--aqua-glow));
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: linear-gradient(to right, var(--aqua-glow), var(--sky-mist));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.contact-info {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.info-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 40px;
    text-align: center;
}

.info-text h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.info-text p {
    color: var(--text-light);
}

.info-text a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-text a:hover {
    text-decoration: underline;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Responsive Contact Page */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .map-container iframe {
        height: 250px;
    }
}

/* Team Members Styling */
.team-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    width: 300px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--sky-mist);
}

.team-member h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.team-member p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.social-link {
    display: inline-block;
    background: var(--sky-mist);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--aqua-glow);
    transform: translateY(-2px);
}

/* Back Home Button */
.back-home {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 998;
}

/* FAQ Styles */
.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.faq-question {
    background: linear-gradient(to right, var(--crystal-blue), var(--soft-mint));
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
}

.toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

.faq-answer {
    background: white;
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    margin: 1rem 0;
}

.faq-answer ul, .faq-answer ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Tutorial Styles */
.tutorial-container {
    margin-top: 1.5rem;
}

.tutorial-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.tutorial-item h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--cloud-gray);
    padding-bottom: 0.5rem;
}

.tutorial-item p {
    margin-bottom: 1rem;
}

.tutorial-item ul, .tutorial-item ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tutorial-item li {
    margin-bottom: 0.5rem;
}

/* Search Results Page */
.search-results {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-bottom: 2rem;
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cloud-gray);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--cloud-gray);
}

.results-table th {
    background-color: var(--sky-mist);
    color: var(--text-dark);
    font-weight: 500;
}

.results-table tr:hover {
    background-color: var(--holographic-pearl);
}

.view-btn {
    background: var(--sky-mist);
    color: var(--text-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: var(--aqua-glow);
    transform: translateY(-2px);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination button {
    background: var(--sky-mist);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover, .pagination button.active {
    background: var(--aqua-glow);
}

/* Cluster Page Styles */
.cluster-container {
    width: 100%;
    height: 600px;
    background: var(--holographic-pearl);
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.cluster-title {
    text-align: center;
    padding: 1rem 0;
}

.cluster-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0.5rem 1rem;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.pathogen-color { background-color: orange; }
.metabolite-color { background-color: red; }
.disease-color { background-color: blue; }
.tissue-color { background-color: green; }
.gene-color { background-color: yellow; }

.line-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.line-item {
    display: flex;
    align-items: center;
    margin: 0.5rem 1rem;
}

.line-color {
    width: 30px;
    height: 3px;
    margin-right: 0.5rem;
}

.high-significance { background-color: violet; }
.moderate-significance { background-color: grey; }
.low-significance { background-color: brown; }

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-button {
    background: linear-gradient(to right, var(--sky-mist), var(--aqua-glow));
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-button:hover {
    background: linear-gradient(to right, var(--aqua-glow), var(--sky-mist));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}