body {
    background-color: #121212;
    background-image: radial-gradient(at top left, rgba(40, 60, 150, 0.35), transparent 45%),
                      radial-gradient(at bottom right, rgba(20, 100, 120, 0.35), transparent 45%);
    color: #E0E0E0;
    font-family: 'Playfair Display', serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.sidebar-toggle {
    display: none; /* Hidden on desktop */
}


.dismissal-forecast-active .background-blurs .blur-sphere1 {
    background: radial-gradient(circle, #FFD700, #FFA500); /* Gold to Orange */
}

.dismissal-forecast-active .background-blurs .blur-sphere2 {
    background: radial-gradient(circle, #FF4500, #FF6347); /* OrangeRed to Tomato */
}

.dismissal-forecast-active .background-blurs .blur-sphere3 {
    background: radial-gradient(circle, #FF0000, #DC143C); /* Red to Crimson */
}

.dismissal-forecast-active .welcome-screen .initial-text h1 {
    color: #E0E0E0; /* White/grayish for the main title */
}

.dismissal-forecast-active .welcome-screen .initial-text p {
    color: #BBB; /* White/grayish for the sub-text */
}

.main-container {
    display: flex;
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    background-color: #2C2C2C;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    margin: 20px;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background-color: #333333;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #444;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.sidebar-header h2 {
    margin: 0 0 0 10px;
    font-size: 1.5em;
}

.sidebar-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative; /* Needed for the pseudo-element */
    overflow: hidden; /* Hide overflowing gradient */
}

.sidebar-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, #333333 20%, transparent);
    pointer-events: none;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav ul li a {
    color: #E0E0E0;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.sidebar-nav ul li a:hover {
    background-color: #444;
}

.sidebar-nav ul li a svg {
    margin-right: 10px;
}

.sidebar-nav hr {
    border: none;
    border-top: 1px solid #555;
    margin: 20px 0;
}

.chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.chat-history::-webkit-scrollbar {
    width: 8px;
}

.chat-history::-webkit-scrollbar-track {
    background: #333;
}

.chat-history::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.chat-history li {
    position: relative;
}

.chat-history li a {
    background-color: #404040;
    margin-bottom: 10px;
}

.chat-history li a.active {
    background-color: #555; /* Active chat color */
}

.chat-history li .delete-chat {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    background: none;
    border: none;
}

.chat-history li:hover .delete-chat {
    opacity: 1;
}

.delete-chat svg {
    stroke: #E0E0E0;
    transition: stroke 0.3s;
}

.delete-chat:hover svg {
    stroke: #FF6B6B;
}

.profile-section {
    margin-top: auto;
    position: relative;
}

.profile-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background-color: #444;
    border-radius: 10px;
    padding: 10px 0;
}

.profile-menu.open {
    display: block;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #E0E0E0;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.profile-menu-item:hover {
    background-color: #555;
}

.profile-menu-item svg {
    margin-right: 10px;
    transition: transform 0.3s;
    stroke: #E0E0E0;
}

.profile-menu-item:hover .settings-icon {
    transform: rotate(45deg);
}

.profile-menu-item:hover .logout-icon {
    transform: translateX(5px);
}

.profile-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #E0E0E0;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
    background-color: #252525;
}

.profile-button:hover {
    background-color: #444;
}

.profile-button a {
    display: flex;
    align-items: center;
    color: #E0E0E0;
    text-decoration: none;
}

.profile-button svg {
    margin-right: 10px;
    stroke: #E0E0E0;
}

.arrow-icon {
    transition: transform 0.3s;
}

.arrow-icon.open {
    transform: rotate(180deg);
}

.chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden; /* Prevent content from overflowing chat area */
}

.welcome-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: opacity 0.5s ease-in-out;
}

.welcome-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background-color: transparent;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    font-size: 1.2em;
    font-weight: 700;
    color: #E0E0E0;
}

.chat-header.in-chat {
    opacity: 1;
}

.background-blurs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    transition: opacity 1s ease-in-out;
}

.background-blurs.fade-out {
    opacity: 0;
}

.blur-sphere1, .blur-sphere2, .blur-sphere3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.blur-sphere1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #FF00FF, #00FFFF);
    top: 10%;
    left: 20%;
    animation: move-sphere1 20s infinite alternate;
}

.blur-sphere2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #FFFF00, #FF00FF);
    top: 50%;
    left: 60%;
    animation: move-sphere2 25s infinite alternate;
}

.blur-sphere3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #00FFFF, #FFFF00);
    top: 70%;
    left: 10%;
    animation: move-sphere3 15s infinite alternate;
}

@keyframes move-sphere1 {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 50px); }
}

@keyframes move-sphere2 {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, -50px); }
}

@keyframes move-sphere3 {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, -100px); }
}

.chat-messages {
    flex-grow: 1;
    padding: 80px 20px 120px; /* Adjust padding */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1;
    min-width: 0; /* Allow flex item to shrink */
}

/* Stylish scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.initial-text {
    text-align: center;
}

/* Initial Text */
.initial-text h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin: 0;
}

.initial-text .model-display-name { /* New style for the model name */
    font-size: 2.5em; /* Slightly smaller than main H1 */
    font-weight: 700;
    color: #E0E0E0;
    margin-top: 10px;
    margin-bottom: 10px;
}

.initial-text p {
    font-size: 1.5em;
    color: #888;
    margin-top: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 70%;
    overflow-wrap: break-word; /* Ensure long words break and wrap */
    white-space: normal; /* Allow text to wrap normally */
}

.user-message {
    background-color: #444;
    align-self: flex-end;
}

.chat-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    background: linear-gradient(to top, #2c2c2c 0%, #2c2c2c 50%, transparent 100%);
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-wrapper {
    display: flex;
    flex-grow: 1;
    align-items: center;
    background-color: #333333;
    border: 1px solid #444;
    border-radius: 15px;
    padding: 5px 15px;
    position: relative; /* For loader positioning */
}

#chat-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #E0E0E0;
    font-size: 1.2em;
    padding: 10px;
    outline: none;
}

#action-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative; /* For loader positioning */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Chat Actions Menu --- */
.chat-actions-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.chat-actions-menu.visible {
    opacity: 1;
    visibility: visible;
}

.chat-actions-trigger {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.chat-actions-trigger svg {
    stroke: #E0E0E0;
    transition: stroke 0.3s;
}

.chat-actions-trigger:hover svg {
    stroke: #fff;
}

.chat-actions-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background-color: #333;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.chat-actions-menu.open .chat-actions-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-actions-header {
    display: flex;
    align-items: center;
    padding: 5px 5px 10px 5px;
    border-bottom: 1px solid #444;
    margin-bottom: 10px;
}

.chat-actions-header svg {
    stroke: #E0E0E0;
    margin-right: 10px;
}

.chat-actions-header span {
    font-weight: 700;
}

.chat-actions-buttons {
    display: flex;
    flex-direction: column;
}

.chat-action-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #E0E0E0;
    padding: 10px 5px;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
}

.chat-action-btn:hover {
    background-color: #444;
}

.chat-action-btn svg {
    margin-right: 10px;
    stroke: #E0E0E0;
}

.chat-action-btn:hover:first-child svg {
    stroke: #FF6B6B; /* Red for delete */
}

.chat-action-btn:hover:last-child svg {
    stroke: #6BFFB8; /* Green for download */
}

/* Voice Message Styles */
.voice-message-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%; /* Ensure it takes full width */
}

.playback-seek-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: #888;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.playback-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
}

.playback-seek-bar::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
}

.play-pause-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-button svg {
    fill: #E0E0E0;
}

.voice-message-status {
    font-size: 0.9em;
    color: #AAA;
    margin-top: 5px;
}

.voice-message-transcription {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #555;
    font-size: 0.95em;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
}

.voice-message-transcription.expanded {
    max-height: none;
    overflow: visible;
}

.voice-message-transcription.collapsed {
    max-height: 3em; /* Show only a few lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-message-bubble.processing .voice-message-status {
    color: orange;
}

.voice-message-bubble.done .voice-message-status {
    color: green;
}

.voice-message-bubble.error .voice-message-status {
    color: red;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.record-icon.recording-animation {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Voice Message Styles */
.voice-message-bubble {
    display: flex;
    align-items: center;
    background-color: #444;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 10px;
    max-width: 70%;
    align-self: flex-start; /* Default for incoming messages */
    color: #E0E0E0;
}

.voice-message-bubble.user-message {
    align-self: flex-end; /* For outgoing messages */
    background-color: #3A3A3A; /* Changed from blue to dark gray */
}

.voice-message-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.voice-message-icon {
    fill: #E0E0E0;
}

.voice-message-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.voice-message-spectrogram {
    width: 100%;
    height: 30px;
    /* background-color: #666; */ /* Removed background from CSS */
    border-radius: 5px;
    margin-bottom: 5px;
}


.voice-message-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.playback-seek-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: #888;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.playback-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
}

.playback-seek-bar::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
}

.play-pause-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-button svg {
    fill: #E0E0E0;
}

.voice-message-status {
    font-size: 0.9em;
    color: #AAA;
    margin-top: 5px;
}

.voice-message-transcription {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #555;
    font-size: 0.95em;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
}

.voice-message-transcription.expanded {
    max-height: none;
    overflow: visible;
}

.voice-message-transcription.collapsed {
    max-height: 3em; /* Show only a few lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-message-bubble.processing .voice-message-status {
    color: orange;
}

.voice-message-bubble.done .voice-message-status {
    color: green;
}

.voice-message-bubble.error .voice-message-status {
    color: red;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.record-icon.recording-animation {
    animation: pulse 1.5s infinite ease-in-out;
}

/* No Chats Message */
.no-chats-message {
    text-align: center;
    color: #888; /* Gray text */
    font-size: 0.9em;
    padding: 20px;
    font-style: italic;
}

/* Template Chats Section */
.template-chats-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.template-chats-section h3 {
    color: #E0E0E0;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: center;
}

.template-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-card {
    background-color: #404040;
    margin-bottom: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    color: #E0E0E0;
    text-decoration: none;
    transition: background-color 0.3s;
    cursor: pointer;
    min-height: 40px; /* Ensure consistent height */
}

.template-card span {
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Show ellipsis for overflow */
    flex-grow: 1; /* Allow text to take available space */
    font-size: 1em; /* Explicitly set font size */
}

.template-card .difficulty-icon {
    margin-right: 10px;
    width: 24px !important; /* Explicitly set width */
    height: 24px !important; /* Explicitly set height */
    transform: scale(1.1); /* Slightly enlarge the SVG content */
}

.template-card[data-difficulty="hard"] .difficulty-icon {
    transform: scale(1.2); /* More aggressive scale for the hard difficulty icon */
}

.template-card:hover {
    background-color: #555;
}

.template-card .difficulty-icon {
    margin-right: 10px;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Interlocutor Details in Welcome Screen */
.interlocutor-details {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(44, 44, 44, 0.3); /* Even more transparent background */
    border-radius: 10px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(20px); /* Increased blur for stronger effect */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Slightly more visible border */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Stronger shadow */
}

.interlocutor-details h2 {
    font-size: 1.3em;
    color: #E0E0E0;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border */
    padding-bottom: 5px;
}

.interlocutor-details p {
    font-size: 1em;
    color: #BBB;
    margin-bottom: 5px;
}

/* Model Name outside Interlocutor Details */
.welcome-screen .model-name {
    text-align: center;
    font-size: 1.1em;
    color: #E0E0E0;
    margin-top: 20px; /* Space above the glassy box */
    margin-bottom: 10px; /* Space below the model name */
}

/* Loading Indicator for GPT-5 */
.loading-indicator {
    width: 24px;
    height: 24px;
    background-color: #E0E0E0;
    border-radius: 5px;
    animation: pulse-loading 1.5s infinite ease-in-out;
    display: none; /* Hidden by default */
}

@keyframes pulse-loading {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.gpt-message {
    background-color: #3A3A3A; /* Darker gray for GPT messages */
    align-self: flex-start; /* Align to the left */
}

/* Force chat message container to respect its parent's width */
.chat-messages {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure individual chat messages are constrained */
.chat-message {
    max-width: 70% !important; /* Re-apply max-width with !important */
    box-sizing: border-box !important;
}


/* Error Message Styling */
.error-message {
    background-color: #5a2828; /* Dark red background */
    color: #ffcccc; /* Light red text */
    align-self: flex-start; /* Align to the left */
    border: 1px solid #ff6b6b; /* Red border */
}

/* End of Chat Styles */
.chat-divider {
    border: none;
    border-top: 1px solid #555;
    margin: 20px 0;
}

.end-of-chat-container {
    text-align: center;
    padding: 20px;
}

.end-of-chat-status {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.end-of-chat-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #888;
}

.end-of-chat-loader .loading-indicator {
    /* Re-use existing loading indicator animation */
    display: block !important; /* Ensure it's visible */
}

/* Statistics Screen Styles */
.stats-screen {
    display: flex;
    gap: 40px;
    padding: 20px;
    background-color: #444; /* Changed to match user message background */
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid #555;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInStats 0.5s ease-out forwards;
}

@keyframes fadeInStats {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-left, .stats-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stats-left {
    gap: 25px;
}

.stats-right {
    align-items: center;
    justify-content: center;
}

.stat-item {
    width: 100%;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #AAA;
}

.stat-value {
    font-weight: bold;
    color: #E0E0E0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #2C2C2C;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%; /* Start at 0 */
    background-color: #4CAF50; /* Default to green */
    border-radius: 4px;
    transition: width 1.5s ease-in-out;
}

.radial-progress-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

.radial-progress-container svg {
    transform: rotate(-90deg);
}

.radial-progress-bg, .radial-progress-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.radial-progress-bg {
    stroke: #333;
}

.radial-progress-fill {
    stroke: #4CAF50; /* Default to green */
    stroke-dasharray: 0, 283; /* 2 * PI * 45 */
    transition: stroke-dasharray 1.5s ease-in-out;
}

.radial-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.final-score {
    font-size: 2.5em;
    font-weight: 700;
    color: #E0E0E0;
}

.final-score-label {
    font-size: 0.8em;
    color: #AAA;
}

.stat-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-icon {
    width: 24px;
    height: 24px;
}

.summary-text {
    font-size: 1.1em;
    font-weight: bold;
}

/* Upload Button Styles */
.upload-btn {
    background-color: #444;
    border: none;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.upload-btn:hover {
    background-color: #555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.upload-btn svg {
    transition: transform 0.3s;
}

.upload-btn:hover svg {
    transform: scale(1.1);
}

/* System Message Styling */
.system-message {
    text-align: center;
    font-style: italic;
    color: #AAA; /* Lighter gray color */
    font-size: 0.9em;
    width: 100%;
    align-self: center;
}

.document-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 10px;
}

.document-upload-area p {
    margin: 0 0 10px;
    color: #ccc;
}

#upload-document-btn {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.document-upload-message {
    background-color: #3a3a3a;
    border: 1px solid #555;
    padding: 20px;
    border-radius: 10px;
    margin: 10px auto;
    width: 80%;
    max-width: 500px;
}

.document-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.document-upload-area p {
    margin: 0 0 10px;
    color: #ccc;
}

.upload-document-btn {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}


.model-selection.active {
    background-color: #555; /* Or any color that indicates it's active */
}

.model-selection.active span {
    font-weight: bold;
}

.model-selection.active svg {
    fill: #fff; /* Or a brighter color */
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .main-container {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        position: relative;
        overflow: hidden; /* Contain the absolute children */
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        z-index: 20;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
    }

    .chat-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translateX(0);
        transition: transform 0.4s ease-in-out;
    }

    .sidebar-toggle {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 15;
        background: none;
        border: none;
        cursor: pointer;
    }

    .sidebar-toggle svg {
        stroke: #E0E0E0;
    }

    /* State when sidebar is open */
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .chat-area {
        transform: translateX(240px);
        box-shadow: -10px 0 20px rgba(0,0,0,0.3);
    }

    .chat-header {
        display: none;
    }

    .chat-input-area .input-wrapper {
        flex-shrink: 1;
        min-width: 0;
    }

    .chat-input-area {
        padding-left: 5px;
        padding-right: 5px;
        gap: 5px;
    }

    .stats-screen {
        flex-direction: column;
        gap: 20px;
    }
}