* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #343541;
    color: #ececf1;
}

.chat-container {
    display: flex;
    height: 100vh;
}

/* Sidebar styles */
.sidebar {
    width: 260px;
    background-color: #202123;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.user-section {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.login-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #4d4d4f;
    background-color: #ffffff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.google-btn:hover {
    background-color: #f1f1f1;
}

.google-btn i {
    color: #4285F4;
}

#logout-btn {
    padding: 8px;
    border-radius: 5px;
    border: none;
    background-color: #4a4b53;
    color: #ececf1;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#logout-btn:hover {
    background-color: #5c5d69;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.profile-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.hidden {
    display: none !important;
}

.new-chat {
    margin-bottom: 10px;
}

#new-chat-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid #4d4d4f;
    border-radius: 5px;
    background-color: transparent;
    color: #ececf1;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
}

#new-chat-btn:hover {
    background-color: #2b2c2f;
}

.conversation-history {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.history-placeholder {
    color: #8e8ea0;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
    font-style: italic;
}

.conversation-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.conversation-item:hover {
    background-color: #2b2c2f;
}

.conversation-item.active {
    background-color: #343541;
}

.conversation-item .delete-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: #8e8ea0;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.conversation-item:hover .delete-btn {
    opacity: 1;
}

.sidebar-footer {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.clear-btn {
    width: 100%;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #4d4d4f;
    background-color: transparent;
    color: #8e8ea0;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #2b2c2f;
}

/* Main content styles */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.welcome-message {
    margin: auto;
    text-align: center;
}

.welcome-message h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.chat-message {
    padding: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    background-color: #343541;
}

.assistant-message {
    background-color: #444654;
}

.message-content {
    line-height: 1.5;
}

.message-content a {
    color: #7c84f8;
    text-decoration: none;
    border-bottom: 1px solid rgba(124, 132, 248, 0.3);
    transition: border-bottom 0.2s ease;
}

.message-content a:hover {
    border-bottom: 1px solid rgba(124, 132, 248, 0.8);
}

/* Image styling for messages */
.image-container {
    margin-top: 15px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.image-container img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.01);
}

.message-metadata {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: #8e8ea0;
    margin-top: 10px;
}

/* Input area styles */
.chat-input-container {
    padding: 15px 20px;
    background-color: #343541;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    background-color: #40414f;
    border-radius: 10px;
    padding: 10px 15px;
    position: relative;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.input-wrapper:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(124, 132, 248, 0.3);
}

#chat-input {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    color: #ececf1;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    outline: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 50px;
    padding-left: 5px;
}

#chat-input:focus {
    border-color: #8e8ea0;
}

#chat-input:disabled {
    background-color: #2d2d3a;
    border-color: #3a3a45;
    color: #8e8ea0;
    cursor: not-allowed;
}

/* Send button styling */
#send-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #7c84f8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

#send-btn:hover {
    background-color: #444654;
    transform: translateY(-2px);
}

#send-btn:disabled {
    color: #4d4d56;
    cursor: not-allowed;
    opacity: 0.6;
}

.send-icon {
    width: 20px;
    height: 20px;
}

.disclaimer {
    text-align: center;
    margin-top: 10px;
    color: #8e8ea0;
    font-size: 12px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #343541;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal h3 {
    margin-bottom: 10px;
    color: #ececf1;
}

.modal p {
    color: #c9c9d1;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

#clear-confirm-btn {
    background-color: #ef4444;
    color: white;
}

#clear-cancel-btn {
    background-color: #4b5563;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Login overlay styles */
.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 53, 65, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.login-overlay-content {
    background-color: #202123;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-overlay h2 {
    margin-bottom: 15px;
    color: #ffffff;
}

.login-overlay p {
    margin-bottom: 25px;
    color: #ececf1;
}

.login-overlay .google-btn {
    margin: 0 auto;
    max-width: 250px;
}

/* Upload button styling */
.upload-image-btn {
    background: transparent;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.upload-image-btn:hover {
    background-color: #444654;
    color: #fff;
    transform: translateY(-1px);
}

.upload-image-btn i {
    font-size: 18px;
}

/* Image preview styling */
.image-preview-container {
    margin: 10px 0;
    width: 100%;
    padding: 0 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 120px;
    max-height: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #565869;
    transition: all 0.2s ease;
}

.image-preview:hover {
    border-color: #7c84f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.image-preview img {
    width: 100%;
    height: 100%;
    max-height: 86px;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-image-btn:hover {
    opacity: 1;
    background: rgba(240, 55, 55, 0.9);
    transform: scale(1.1);
}

/* Upload loading indicator */
.upload-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 8px;
    z-index: 5;
    font-size: 12px;
}

.upload-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
} 