/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Aligns content at the top */
    height: 120vh;
    overflow-y: auto; /* Enables scrolling */
    margin: 0;
}

/* Main Container */
.container {
    width: 1500px;
    background: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; /* Prevents layout shift */
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header Content: Logo Left, Text Center */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Space between logo and text */
}

/* Logo Styling */
.logo {
    width: 120px; /* Adjust width */
    height: auto;
}

/* Header Text Styling */
.header-text {
    text-align: left;
    max-width: 900px;
}
.header-text h1 {
    font-size: 18px;
    color: #333;
    margin: 0;
}
.header-text p {
    font-size: 14px;
    color: #555;
    margin: 5px 0 0;
}

/* Content Layout - Chat & Visualization Side by Side */
.content {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    overflow-y: auto; /* Enables scrolling inside content */
    max-height: 100vh; /* Prevents layout shift */
}

/* Chat Box */
#chat-container {
    width: 40%;
    height: 722px;
    overflow-y: auto; /* Enables scrolling inside chat */
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.1);
}

/* Chat Messages */
#chat-box {
    text-align: left;
    padding: 10px;
    max-height: 600px;
    overflow-y: auto; /* Enables scrolling inside chat messages */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Adds space between messages */
}

/* User Messages - Align Right */
.message.user {
    background-color: #4facfe;
    color: white;
    text-align: right;
    align-self: flex-end; /* Pushes messages to the right */
    padding: 10px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    border-top-right-radius: 2px;  /* Rounded on all but top-right */
}

/* Bot Messages - Align Left */
.message.bot {
    background-color: #e0e0e0;
    color: black;
    text-align: left;
    align-self: flex-start; /* Pushes messages to the left */
    padding: 10px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    border-top-left-radius: 2px; /* Rounded on all but top-left */
}

/* Input & Buttons */
.chat-input-container {
    display: flex;
    margin-top: 10px;
}
#chat-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #4facfe;
    border-radius: 5px;
    max-width: 80%;
}
#send-btn {
    background-color: #4facfe;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
}
#send-btn:hover {
    background-color: #00c6ff;
}

/* Reset Button */
.reset-container {
    margin-top: 10px;
}
#reset-btn {
    background-color: #ff4747;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}
#reset-btn:hover {
    background-color: #e84141;
}

/* Visualization Box */
#visualization-container {
    width: 55%;
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 600px;
}

/* Scrollable Plot Boxes */
#plot3d-box, #plot2d-box {
    width: 100%;
    min-height: 300px;
    background: #f4f4f4;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 500px;
}

/* Theta Selection */
#theta-selection {
    margin-top: 10px;
    text-align: center;
}
#theta-selection h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}
#theta-input {
    width: 80px;
    padding: 5px;
    border: 2px solid #4facfe;
    border-radius: 5px;
    text-align: center;
}
#theta-btn, #save-btn {
    background-color: #4facfe;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 5px;
}
#theta-btn:hover, #save-btn:hover {
    background-color: #00c6ff;
}