:root {
    --primary-color: #8B6C4E;
    --primary-dark: #70583F;
    --text-color: #3F3F3F;
    --background-color: #F6F4F0;
    --hover-color: #fbf9f5;
    --card-color: #FFFFFF;
    --user-msg-color: #f0eee6;
    --agent-msg-color: #faf9f5;
    --border-color: #E6E2DE;
    --step-color: #F9F5F2;
    --tool-color: #F8F6F2;
    --thinking-color: #F7F4F0;
    --result-color: #F6F2F0;
    --button-hover: #E8E1D9;
    --input-bg: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --header-color: #614C2F;
}
@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather-VariableFont_opsz,wdth,wght.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

input:focus,
textarea:focus,
button:focus {
    outline: none;
}

textarea, button{
    font-family: 'Merriweather', serif;
}

body {
    font-family: 'Merriweather', serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    max-height: 100vh;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    transition: all 0.5s ease;
    position: relative;
}

/* Update responsive header positioning */
.header.compact {
    margin-bottom: 40px;
    flex-direction: column;
    text-align: center;
    margin-top: max(15vh, 80px); /* More responsive approach using max() */
    position: relative;
    z-index: 10;
    height: 100px;
}

.header.compact h1 {
    font-size: clamp(32px, 8vw, 50px); /* Responsive font size */
    margin-bottom: clamp(20px, 5vh, 40px); /* Responsive margin */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
}

/* Remove fixed positioning in CSS and let JS handle it dynamically */
#input-container.centered {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Remove fixed top position: top: calc(25vh + 170px); */
    width: 90%;
    max-width: 600px;
    z-index: 5;
}

/* Improve animation for cleaner transitions */
.animate-header-collapse {
    animation: headerCollapse 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

@keyframes headerCollapse {
    from {
        font-size: 24px;
        text-align: left;
        margin-top: 0;
        position: static;
        left: 0;
        transform: none;
    }
    to {
        font-size: clamp(32px, 8vw, 50px);
        text-align: center;
        margin-top: max(15vh, 80px);
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
}



/* Media queries for better mobile responsiveness */
@media (max-width: 480px) {
    .header.compact h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    #input-container.centered {
        width: 95%;
    }


    #send-button.tall {
        height: 70px;
        width: 70px;
    }
}

/* Fix for very tall screens */
@media (min-height: 900px) {
    .header.compact {
        margin-top: max(15vh, 100px);
    }
}

/* Fix for very short screens */
@media (max-height: 600px) {
    .header.compact {
        margin-top: 60px;
    }

    .header.compact h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }
}


/* Ensure proper stacking context */
#title {
    cursor: pointer;
    transition: font-size 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    position: relative;
    z-index: 10;
}

/* Add a min-height to the body to ensure there's enough space */
body {
    padding-bottom: 50px;
}

h1 {
    color: var(--header-color);
    font-weight: 600;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 24px;
    border-bottom: none;
    transition: all 0.5s ease;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--header-color);
}

#settings-btn {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    position: relative;
    transition: background-color 0.2s ease, opacity 0.3s ease;
    opacity: 0;
}

#settings-btn.visible {
    opacity: 1;
}

#settings-btn:hover {
    background-color: var(--button-hover);
}

#settings-panel {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: none;
    animation: enter 0.5s ease;
}

@keyframes enter {
    0%{
        opacity: 0;
        transform: translateY(-100px);
    }
    100%{
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    align-items: center;
}

.flex-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    transition: all 0.5s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    margin-top: -20px;
}

.flex-container.visible {
    opacity: 1;
    max-height: 1000px;
    overflow: visible;
    visibility: visible;
    margin-top: 0;
    animation: enterContainer 0.5s ease;
}

@keyframes enterContainer {
    0% {
        opacity: 0;
        transform: translateX(-50%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#input-container.force-normal {
    position: static !important;
    left: auto !important;
    transform: none !important;
    width: 90% !important;
    max-width: 600px !important;
}

#chat-container {
    flex: 1.7;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    background-color: var(--card-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

#progress-container {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    background-color: var(--card-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.progress-entry {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
    border-left: 3px solid var(--primary-color);
}

.progress-step {
    background-color: var(--step-color);
    border-left-color: #8B6C4E;
}

.progress-thinking {
    background-color: var(--thinking-color);
    border-left-color: #A68C72;
}

.progress-tool {
    background-color: var(--tool-color);
    border-left-color: #B59C80;
}

.progress-tool-result {
    background-color: var(--result-color);
    border-left-color: #C4AB8F;
}

.progress-error {
    background-color: #FDF0F0;
    border-left-color: #E57373;
}

.progress-time {
    font-size: 12px;
    color: #8C8C8C;
    margin-bottom: 4px;
}

.user-message {
    background-color: var(--user-msg-color);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    max-width: 80%;
    margin-left: auto;
    text-align: left;
    box-shadow: 0 1px 2px var(--shadow-color);
}

.agent-message {
    background-color: var(--agent-msg-color);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    max-width: 80%;
    box-shadow: 0 1px 2px var(--shadow-color);
}

#input-container {
    display: flex;
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
    transition: all 0.5s ease;
    width: 90%;
    max-width: 600px;
    align-items: center;
}

#user-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 16px;
    background-color: var(--input-bg);
    box-shadow: 0 1px 4px var(--shadow-color);
    transition: all 0.5s ease;
    resize: none;
    height: 22px;
}

#user-input:hover, #user-input:focus{
    background-color: var(--background-color);
}

#user-input.tall {
    font-size: 18px;
    height: 60px;
}

#send-button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    height: 44px;
    width: 85px;
}

#send-button.tall {
    height: 85px;
    width: 85px;
}

#send-button:hover {
    background-color: var(--primary-dark);
}

#status-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    transition: all 0.5s ease;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
}

#status-bar.visible {
    opacity: 1;
    visibility: visible;
    max-height: 50px;
    overflow: visible;
}

#status {
    font-style: italic;
    color: #8C8C8C;
    font-size: 14px;
}

.buttons-container {
    display: flex;
    gap: 12px;
}

#clear-chat, #clear-progress, #clear-files {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

#clear-chat:hover, #clear-progress:hover, #clear-files:hover {
    background-color: var(--button-hover);
}

.typing-indicator {
    display: flex;
    padding: 12px 16px;
    background-color: var(--agent-msg-color);
    border-radius: 12px;
    margin-bottom: 16px;
    width: fit-content;
    box-shadow: 0 1px 2px var(--shadow-color);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #8C8C8C;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.5s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

pre {
    background-color: #F9F7F5;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

code {
    font-family: 'SF Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
}

input[type="text"], input[type="number"] {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
}

button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--background-color);
    transition: background-color 0.2s ease;
}

.save-btn {
    margin-top: 15px;
    padding: 10px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.save-btn:hover {
    background-color: var(--primary-dark);
}

/* Dark mode toggle */
.theme-switch {
    display: flex;
    align-items: center;
}

.theme-switch-checkbox {
    display: none;
}

.theme-switch-label {
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #E0D8D0;
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.theme-switch-label::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.theme-switch-checkbox:checked + .theme-switch-label {
    background-color: #A68C72;
}

.theme-switch-checkbox:checked + .theme-switch-label::after {
    left: 22px;
}

/* Dark mode colors */
body.dark-mode {
    --primary-color: #A68C72;
    --primary-dark: #8F7862;
    --text-color: #E6E1DC;
    --background-color: #2A2A2A;
    --card-color: #323232;
    --user-msg-color: #3F372E;
    --agent-msg-color: #383838;
    --border-color: #4A4A4A;
    --step-color: #332F2A;
    --tool-color: #36322C;
    --thinking-color: #39322C;
    --result-color: #3C332D;
    --button-hover: #4A4030;
    --input-bg: #3A3A3A;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode pre {
    background-color: #3D3D3D;
    border-color: #4A4A4A;
    color: #E6E1DC;
}

body.dark-mode code {
    color: #E6E1DC;
}

/* Responsive design */
@media (max-width: 768px) {
    .flex-container {
        flex-direction: column;
    }

    #chat-container, #progress-container {
        height: 400px;
    }
}


/* Styles for the files section */
.files-section {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background-color: var(--card-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    display: none; /* Hidden by default, shown when files are available */
}

.files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-item {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    min-width: 200px;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: var(--hover-color);
}

.file-icon {
    margin-right: 10px;
    font-size: 20px;
}

.file-info {
    flex-grow: 1;
}

.file-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 12px;
    color: #777;
}

.file-download {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
    margin-right: 10px;
}

.file-download:hover {
    background-color: var(--primary-dark);
}

.no-files {
    color: #777;
    font-style: italic;
}

/* Dark mode compatibility */
body.dark-mode .file-meta {
    color: #aaa;
}

body.dark-mode .no-files {
    color: #aaa;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .files-list {
        flex-direction: column;
    }

    .file-item {
        width: 100%;
    }
}

/* Clean, simplified animations */
.header, .flex-container, #status-bar, #settings-btn, #input-container,
#user-input, #send-button {
  transition: all 0.4s ease-out;
}

/* Keyframe animations */
@keyframes headerExpand {
  from {
    font-size: 50px;
    text-align: center;
    margin-top: calc(25vh - 115px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }
  to {
    font-size: 24px;
    text-align: left;
    margin-top: 0;
    position: static;
    left: 0;
    transform: none;
    width: auto;
  }
}

@keyframes headerCollapse {
  from {
    font-size: 24px;
    text-align: left;
    margin-top: 0;
    position: static;
    left: 0;
    transform: none;
  }
  to {
    font-size: 50px;
    text-align: center;
    margin-top: calc(25vh - 115px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}

/* Applied animations */
.animate-header-expand {
  animation: headerExpand 0.4s ease-out forwards;
}

.animate-header-collapse {
  animation: headerCollapse 0.4s ease-out forwards;
}

/* Header states */
.header.compact #title {
  font-size: 50px;
  margin-bottom: 20px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  margin-top: calc(25vh - 115px);
  z-index: 5;
}

.message-new {
  animation: messageAppear 0.4s ease-out forwards;
}

/* Typing indicator animation */
.typing-indicator span {
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Add this to index.css */
.cancel-btn {
    padding: 12px 20px;
    background-color: #E57373;  /* Light red color */
    color: white;
    border: none;
    border-radius: 24px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background-color: #D32F2F;  /* Darker red on hover */
}

/* Add a pulsing animation for the cancel button during processing */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#cancel-button {
    animation: pulse 2s infinite ease-in-out;
}
/* Add these new keyframes for exit animations */
@keyframes exitContainer {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Update the existing transitions with better easing */
.flex-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, visibility 0.5s, margin-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    margin-top: -20px;
}

.flex-container.visible {
    opacity: 1;
    max-height: 1000px;
    overflow: visible;
    visibility: visible;
    margin-top: 0;
    animation: enterContainer 0.5s ease-out;
}

.flex-container.exiting {
    animation: exitContainer 0.5s ease-in forwards;
}

#status-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), visibility 0.5s, max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
}

#status-bar.exiting {
    animation: fadeOut 0.5s ease-in forwards;
}

/* Improve the header transitions */
@keyframes headerExit {
    0% {
        font-size: 24px;
        text-align: left;
        margin-top: 0;
    }
    100% {
        font-size: 50px;
        text-align: center;
        margin-top: calc(25vh - 115px);
    }
}

/* Update the header collapse animation with improved easing */
@keyframes headerCollapse {
    from {
        font-size: 24px;
        text-align: left;
        margin-top: 0;
        position: static;
        left: 0;
        transform: none;
    }
    to {
        font-size: 50px;
        text-align: center;
        margin-top: calc(25vh - 115px);
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
}

.animate-header-collapse {
    animation: headerCollapse 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Update the global transitions for all animated elements */
.header, #settings-btn, #input-container,
#user-input, #send-button {
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Add specific exit class that can be applied via JavaScript */
.exiting {
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

.agent-message h1 {
  font-size: 1.8em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3em;
}

.agent-message h2 {
  font-size: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.agent-message h3 {
  font-size: 1.3em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.agent-message ul, .agent-message ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.agent-message li {
  margin-bottom: 0.3em;
}

.agent-message p {
  margin-bottom: 1em;
}

.agent-message blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1em;
  color: #777;
  margin: 1em 0;
}

.agent-message code {
  padding: 0.2em 0.4em;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  font-family: monospace;
}

.agent-message pre {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1em 0;
}

.agent-message pre code {
  background-color: transparent;
  padding: 0;
}

.agent-message img {
  max-width: 100%;
  margin: 1em 0;
}

.agent-message table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.agent-message th, .agent-message td {
  padding: 8px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.agent-message th {
  background-color: rgba(0, 0, 0, 0.05);
}
/* Chat History Cards Styling */

.chat-history-container {
  width: 100%;
  max-width: 600px;
  margin-top: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s ease all;
}

.chat-history-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-history-header {
  font-size: 16px;
  color: var(--header-color);
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
}

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.chat-session-card {
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 2px 8px var(--shadow-color);
  position: relative;
}

.chat-session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
  background-color: var(--hover-color);
}

.chat-session-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px var(--shadow-color);
}

.chat-session-time {
  font-size: 12px;
  color: #777;
  margin-bottom: 5px;
}

.chat-session-title {
  font-weight: 600;
  margin-bottom: 8px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.chat-session-preview {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

/* Delete button for individual sessions */
.chat-session-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--background-color);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chat-session-card:hover .chat-session-delete {
  opacity: 1;
}

.chat-session-delete:hover {
  background-color: #ffebee;
  color: #e57373;
}

/* Clear all button */
.chat-history-clear {
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}

.chat-history-clear:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Empty state */
.chat-history-empty {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
  font-size: 14px;
}

/* Dark mode adjustments */
body.dark-mode .chat-session-time {
  color: #aaa;
}

body.dark-mode .chat-session-preview {
  color: #bbb;
}

body.dark-mode .chat-session-delete:hover {
  background-color: #4a342f;
  color: #ef9a9a;
}

body.dark-mode .chat-history-clear {
  color: #aaa;
}

body.dark-mode .chat-history-empty {
  color: #aaa;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-session-card {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Staggered animation for multiple cards */
.chat-session-card:nth-child(1) { animation-delay: 0.05s; }
.chat-session-card:nth-child(2) { animation-delay: 0.1s; }
.chat-session-card:nth-child(3) { animation-delay: 0.15s; }
.chat-session-card:nth-child(4) { animation-delay: 0.2s; }
.chat-session-card:nth-child(5) { animation-delay: 0.25s; }

/* Mobile responsiveness */
@media (max-width: 600px) {
  .chat-history-container {
    width: 95%;
  }

  .chat-session-title {
    font-size: 14px;
  }

  .chat-session-preview {
    font-size: 12px;
  }
}

/* Scrollbar styling */
.chat-history-list::-webkit-scrollbar {
  width: 6px;
}

.chat-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 6px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-color);
}

.footer {
    background-color: #f5f5f5;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    width: 50px;
    height: auto;
}

.footer-credit {
    display: flex;
    flex-direction: column;
    font-style: italic;
}

.footer-info {
    text-align: right;
    font-style: italic;
    display: flex;
    flex-direction: column;
}

.footer-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #004080;
    text-decoration: underline;
}

.copyright {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-info {
        text-align: center;
    }
}

