body {
    font-family: sans-serif;
    margin: 0;
    background-color: #111;
    color: white;
}

#page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Optional: Add a subtle shadow to the wrapper */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
}

.header-logo {
    max-height: 50px; /* Adjust size as needed */
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}



#hero {
    height: 100%; /* Keep height for Three.js */
    position: relative;
}

.mouse-prompt {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 12px;
    color: #ccc;
    z-index: 10;
}

#threejs-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#labels-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows mouse events to pass through to the canvas */
}

.text-blurb-container {
    padding: 20px;
    overflow-y: auto; /* Add scroll for content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#large-text-blurb {
    font-size: 4.5em; /* Even bigger */
    font-weight: bold; /* Bolder */
    line-height: 1.2;
    margin-top: 20px;
}

.animated-word {
    display: inline-block;
    animation: mirror-data 4s 2 alternate forwards; /* Spin 4 times and stop */
    font-size: 1.5em; /* Make 'Data' bigger than surrounding text */
    font-weight: 900; /* Make it extra bold/thick */
}

@keyframes mirror-data {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(-1);
    }
}

.sub-blurb {
    font-size: 1.2em;
    margin-top: 10px;
    text-align: left;
    max-width: 80%; /* Limit width for readability */
}

.bottom-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    padding: 20px;
    align-items: stretch; /* Added to make children stretch to same height */
}

#looker-studio, #data-chat-section {
    flex: 1; /* Changed from width: 50% to flex: 1 for equal height and width distribution */
    min-width: 300px; /* Minimum width before wrapping */
    padding: 20px;
}

section {
    margin-bottom: 40px;
}

.placeholder {
    border: 2px dashed #555;
    padding: 20px;
    text-align: center;
}

#contact-about {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    padding: 20px;
}

.column {
    flex: 1;
    min-width: 300px; /* Minimum width before wrapping */
    padding: 0 20px;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
}

input, textarea {
    padding: 10px;
    margin-top: 5px;
    background-color: #333;
    border: 1px solid #555;
    color: white;
}

button {
    margin-top: 20px;
    padding: 10px;
    background-color: #555;
    color: white;
    border: none;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top (higher than cookie consent) */
    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 */
    padding-top: 60px;
}

.modal-content {
    background-color: #222; /* Darker background for content */
    margin: 5% auto; /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more responsive */
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
    color: white; /* Ensure text is visible */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

#modal-body {
    padding: 20px 0;
    max-height: 70vh; /* Limit height and enable scroll */
    overflow-y: auto;
}

#modal-body h1 {
    color: #007bff; /* Highlight headings */
}

/* Cookie Consent Popup */
#cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default, shown by JS */
    z-index: 1000;
}

#cookie-consent p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

#cookie-consent button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

#cookie-consent button:hover {
    background-color: #0056b3;
}

footer {
    background-color: #333;
    color: white;
    padding: 1em 20px; /* Add some horizontal padding */
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Space between logo and links */
    align-items: center; /* Vertically center items */
}

.footer-content {
    display: flex;
    align-items: center;
    width: 100%; /* Take full width to allow space-between to work */
}

.footer-logo {
    max-height: 40px; /* Adjust size as needed */
    margin-right: 20px; /* Space between logo and text */
}

.footer-links {
    display: flex;
    flex-direction: column; /* Stack copyright and links vertically */
    align-items: flex-end; /* Align links to the right */
    flex-grow: 1; /* Allow links section to grow and push logo left */
}

.footer-links p {
    margin: 0; /* Remove default paragraph margins */
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 10px; /* Space between links */
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Styles for the Data Chat Section */
#data-chat-section {
    padding: 10px; /* Reduced padding */
    background-color: #222; /* Slightly darker background for the section */
    border-radius: 8px;
    margin-bottom: 40px;
    /* Removed width, max-width, margin-left, margin-right to allow flex: 1 to work */
    display: flex; /* Added */
    flex-direction: column; /* Added */
}

#chat-container {
    display: flex;
    flex-direction: column; /* Reverted to column */
    width: 80%; /* Make it wider */
    max-width: 800px; /* Limit maximum width */
    margin: 10px auto; /* Reduced margin */
    border: 1px solid #555;
    border-radius: 8px;
    overflow: hidden;
    flex: 1; /* Added to take remaining space */
}

#chat-messages {
    flex: 1; /* Reverted to flex: 1 to fill available space */
    overflow-y: auto;
    padding: 10px;
    background-color: #333;
    border-bottom: 1px solid #555;
    min-height: 200px; /* Added min-height */
}

.chat-message {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.9em; /* Make chat message text smaller */
}

.chat-message .modal-trigger {
    color: #CCCCCC; /* Light gray color for the privacy link */
}

#user-input {
    padding: 5px;
    border: none;
    background-color: #444;
    color: white; /* Ensure text color is white */
    box-sizing: border-box;
    height: 100px; /* Increased height to accommodate more text */
    flex: 1; /* Take available horizontal space within its flex container */
    margin-right: 5px; /* Space between input and button */
    font-size: 1em; /* Increased font size */
    overflow-y: hidden; /* Hide scrollbar */
}

#user-input::placeholder {
    color: white;
}

#send-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px; /* Rounded corners for all sides */
}

#send-button:hover {
    background-color: #0056b3;
}

.chat-input-area {
    display: flex;
    align-items: center;
    padding: 5px; /* Small padding around input and button */
    border-top: 1px solid #555; /* Separator from chat messages */
}

/* Styles for the Site Chat Section */
#site-chat-container {
    display: flex;
    flex-direction: column; /* Reverted to column */
    width: 100%; /* Make it wider */
    max-width: 800px; /* Limit maximum width */
    margin: 10px auto; /* Reduced margin */
    border: 1px solid #555;
    border-radius: 8px;
    overflow: hidden;
    flex: 1; /* Added to take remaining space */
}

.site-chat-messages {
    flex: 1; /* Reverted to flex: 1 to fill available space */
    overflow-y: auto;
    padding: 10px;
    background-color: #333;
    border-bottom: 1px solid #555;
    min-height: 200px; /* Added min-height */
}

#site-user-input {
    padding: 5px;
    border: none;
    background-color: #444;
    color: white; /* Ensure text color is white */
    box-sizing: border-box;
    height: 100px; /* Increased height to accommodate more text */
    flex: 1; /* Take available horizontal space within its flex container */
    margin-right: 5px; /* Space between input and button */
    font-size: 1em; /* Increased font size */
    overflow-y: hidden; /* Hide scrollbar */
}

#site-user-input::placeholder {
    color: white;
}

#site-send-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px; /* Rounded corners for all sides */
}

#site-send-button:hover {
    background-color: #0056b3;
}

#leave-message-button {
    margin-top: 10px;
    background-color: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

#leave-message-button:hover {
    background-color: #555;
}


/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .bottom-container,
    #contact-about,
    .info-section { /* Added .info-section here */
        flex-direction: column; /* Stack items vertically */
    }

    #hero,
    .text-blurb-container,
    #looker-studio,
    #data-chat-section,
    .column {
        width: 100%; /* Take full width */
        min-width: unset; /* Remove min-width constraint */
    }

    .text-blurb-container {
        height: auto; /* Adjust height for stacked content */
    }

    #large-text-blurb {
        font-size: 3em; /* Adjust font size for smaller screens */
    }

    .sub-blurb {
        max-width: 90%; /* Adjust max-width for readability */
    }

    #chat-container, #site-chat-container {
        width: 95%; /* Adjust chat container width for smaller screens */
    }

    .footer-content {
        flex-direction: column; /* Stack footer content */
        text-align: center;
    }

    .footer-logo {
        margin-right: 0; /* Remove margin */
        margin-bottom: 10px; /* Add bottom margin */
    }

    .footer-links {
        align-items: center; /* Center footer links */
    }
}
#preview-data-button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#preview-data-button:hover {
    background-color: #0056b3;
}

#data-preview-area {
    width: 80%;
    margin: 20px auto;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px;
    display: none; /* Initially hidden */
    overflow-x: auto; /* Enable horizontal scrolling */
}

#data-preview-area table {
    border-collapse: collapse;
}

#data-preview-area th,
#data-preview-area td {
    border: 1px solid #555;
    padding: 8px;
    text-align: left;
    white-space: nowrap;
}

#data-preview-area th {
    background-color: #444;
}

/* FAIC Dashboard Section */
.info-section {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    align-items: flex-start;
}

.info-section .column {
    flex: 1;
    min-width: 300px;
    padding: 0 20px;
}

.info-section .column img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}


.modal-content button.close-button {
    display: block;
    margin: 15px auto 0;
    padding: 10px 25px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content button.close-button:hover {
    background-color: #777;
}

#loading-indicator, #site-loading-indicator {
    text-align: center;
    padding: 10px;
    color: #888;
}

#data-preview-content {
    overflow-x: auto;
}

#data-preview-content table {
    width: 100%;
}

#data-preview-content td, #data-preview-content th {
    font-size: 12px;
}

#user-input, #site-user-input {
    height: 30px; /* Single line height */
}

/* Styles for the Hero Info Section */
#hero-info-section {
    min-height: 40vh; /* Ensure it has a minimum height */
    /* height: 40vh; */ /* Preferred height */
    align-items: stretch; /* Ensure columns stretch to fill height */
}

/* Styles for the Twitter Feed Section */
#twitter-feed-section {
    padding: 20px;
    background-color: #222;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
}

#tweets-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    max-height: 500px; /* Limit height and enable scrolling */
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

.tweet {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tweet-text {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #eee;
    font-size: 0.85em;
}

.tweet-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #bbb;
}

.tweet-link {
    color: #007bff;
    text-decoration: none;
}

.tweet-link:hover {
    text-decoration: underline;
}