/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bg-color: #ffffff;
    --bg-secondary: #ffffff;
    --border-color: #000000;
    --text-primary: #000000;
    --text-secondary: #000000;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    line-height: 1.6;
}

/* App Container */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}



.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Settings Panel */
.settings-panel {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.settings-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-header p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.settings-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    padding: 0;
}

.settings-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
}

.settings-item select,
.settings-item input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s;
}

.settings-item select:focus,
.settings-item input[type="password"]:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.settings-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.save-btn {
    width: 100%;
    padding: 12px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.settings-status {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    background: #000000;
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: #000000;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}



/* Professional Loading Indicators */
.professional-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Advanced Search Indicators */
.search-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    font-size: 11px;
    color: #000000;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-indicator::before {
    content: '';
    font-size: 10px;
}

/* Professional Message Enhancements */
.message.ai .message-content {
    position: relative;
}

/* Source Citations */
.source-citation {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 4px;
    font-size: 10px;
    color: #000000;
    text-decoration: none;
    margin: 2px;
    transition: all 0.2s;
}

.source-citation:hover {
    background: rgba(0, 123, 255, 0.2);
    transform: translateY(-1px);
}

.message-content a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: currentColor;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-content a:hover {
    opacity: 1;
    text-decoration-color: currentColor;
}

.message.user .message-content a {
    color: #333333;
    text-decoration-color: rgba(51, 51, 51, 0.7);
}

.message.user .message-content a:hover {
    text-decoration-color: #333333;
}

/* Main Container */
.container {
    display: flex;
    width: 100%;
    height: 100vh;
    margin: 0;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Main Content */
.main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    height: 100vh;
}

/* Main Header */
.main-header {
    display: none;
}

.main-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.model-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #000000;
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
}

.model-label {
    font-size: 1rem;
}

#currentModelDisplay {
    color: #000000;
    font-weight: 600;
}

/* Header */
.header {
    padding: 24px 32px;
    border-bottom: 1px solid #000000;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.header h2 {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    margin: 0;
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-start;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 32px;
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
}

.welcome-content {
    max-width: 100%;
    padding: 0;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.welcome-content p {
    font-size: 16px;
    color: #000000;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Seções capabilities e prompt-suggestions removidas para interface acadêmica limpa */

/* Messages */
.messages-container {
    flex: 1;
    overflow-y: auto;
    display: none;
    background: #ffffff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message {
    width: 100%;
    padding: 0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.ai {
    align-items: flex-start;
}

.message-wrapper {
    display: flex;
    align-items: flex-start;
    max-width: 75%;
    margin: 0;
    padding: 0;
}

.message.user .message-wrapper {
    flex-direction: row-reverse;
}

.message.ai .message-wrapper {
    flex-direction: row;
}

.message-avatar {
    display: none;
}

/* Markdown formatting styles */
.message-content h1 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 12px 0 8px 0;
    color: inherit;
    border-bottom: 2px solid currentColor;
    padding-bottom: 6px;
}

.message-content h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 10px 0 6px 0;
    color: inherit;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
}

.message-content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 8px 0 4px 0;
    color: inherit;
}

.message-content h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 6px 0 4px 0;
    color: inherit;
}

.message-content h5 {
    font-size: 1em;
    font-weight: 600;
    margin: 4px 0 2px 0;
    color: inherit;
}

.message-content h6 {
    font-size: 0.9em;
    font-weight: 600;
    margin: 4px 0 2px 0;
    color: inherit;
}

.message-content hr {
    border: none;
    border-top: 1px solid currentColor;
    margin: 12px 0;
    opacity: 0.3;
}

.message-content ul {
    margin: 8px 0;
    padding-left: 16px;
}

.message-content ol {
    margin: 8px 0;
    padding-left: 16px;
}

.message-content li {
    margin: 2px 0;
    line-height: 1.5;
}

.message-content blockquote {
    border-left: 3px solid currentColor;
    margin: 8px 0;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.05);
    font-style: italic;
    color: inherit;
    border-radius: 0 4px 4px 0;
}

.message.user .message-content blockquote {
    background-color: rgba(0, 0, 0, 0.1);
}

.message-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

.message.user .message-content pre {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.message-content code {
    background-color: rgba(0, 0, 0, 0.08);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: inherit;
}

.message.user .message-content code {
    background-color: rgba(0, 0, 0, 0.15);
}

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

.message-content p {
    margin: 6px 0;
    line-height: 1.5;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
    color: inherit;
}

.message-content {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #000000;
    word-wrap: break-word;
    position: relative;
    max-width: 100%;
}

.message.user .message-content {
    background: #f1f3f4;
    color: #333333;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message.ai .message-content {
    background: transparent;
    color: #000000;
    padding: 8px 0;
}

/* Message Actions */
.message-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    padding-right: 4px;
}

.message.ai .message-actions {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 4px;
}

.message.user:hover .message-actions,
.message.ai:hover .message-actions {
    opacity: 1;
    visibility: visible;
}

.message-action-btn {
    background: transparent;
    border: none;
    color: #999999;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.15s ease;
    padding: 0;
    margin: 0;
}

.message-action-btn:hover {
    color: #333333;
}

.edit-btn:hover {
    color: #333333;
}

.copy-btn:hover {
    color: #333333;
}

/* Edit Interface */


/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 4px;
    color: #333333;
    font-weight: 400;
    font-size: 13px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333333;
}

.toast-error {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333333;
}

/* Line-by-line fade animation */
.fade-line {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Smooth fade transition for AI messages */
.message.ai .message-content {
    transition: none; /* Remove transitions during animation */
}

/* Input Container */
.input-container {
    padding: 20px 40px 32px 40px;
    background: #ffffff;
    position: relative;
    z-index: 10;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.input-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 16px 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-main {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* Attach Option Button */
.attach-option-btn {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    color: #212529;
    transition: all 0.3s ease;
}

.attach-option-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attach-option-btn.has-files {
    background: linear-gradient(135deg, #212529 0%, #000000 100%);
    color: white;
    border-color: #212529;
}

.attach-option-btn.has-files:hover {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    border-color: #495057;
}

.attach-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #000000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

/* Attached Files Container */
.attached-files-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.attached-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #212529 0%, #000000 100%);
    border-bottom: 1px solid #343a40;
}

.attached-files-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.attached-files-title i {
    color: #ffffff;
}

.clear-all-files-btn {
    background: #ffffff;
    border: none;
    color: #000000;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.clear-all-files-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.attached-files-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Attached Files Preview */
.attached-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.attached-file-preview:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-info i {
    font-size: 18px;
    color: #212529;
    width: 20px;
    text-align: center;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    line-height: 1.3;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

.remove-file-btn {
    background: #000000;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.remove-file-btn:hover {
    background: #343a40;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-file-btn:active {
    transform: scale(0.95);
}

.input-wrapper:hover::before {
    opacity: 1;
}

.input-wrapper:focus-within::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.model-selector {
    display: none;
}

#messageInput {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    background: transparent;
    color: #1a1a1a;
    min-height: 28px;
    max-height: 200px;
    padding: 14px 0;
    border-radius: 0;
    transition: color 0.2s ease;
}

#messageInput::placeholder {
    color: rgba(26, 26, 26, 0.5);
    opacity: 1;
    font-weight: 400;
    transition: color 0.2s ease;
}

#messageInput:focus::placeholder {
    color: rgba(26, 26, 26, 0.3);
}

.voice-btn {
    background: transparent;
    color: #8b8b8b;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    margin-left: 8px;
    position: relative;
    overflow: hidden;
}

.voice-btn:hover {
    background: transparent;
    color: #333;
}

.voice-btn.recording {
    background: #ff4444;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.voice-btn.recording:hover {
    background: #cc3333;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.send-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.send-btn:hover::before {
    left: 100%;
}

/* Input Options Styles */
.input-options {
    display: flex;
    gap: 5px;
    margin-top: 12px;
    padding: 0;
}

.input-option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.8) 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.input-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.4s ease;
}

.input-option-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.input-option-btn:hover::before {
    left: 100%;
}

.input-option-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.input-option-btn i {
    font-size: 13px;
    color: #333333;
    transition: color 0.2s ease;
}

.input-option-btn:hover i {
    color: #1a1a1a;
}

/* Thinking Status Styles */
.thinking-status {
    max-width: 768px;
    margin: 0 auto 20px auto;
    padding: 20px 24px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03);
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thinking-status:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cccccc;
}

/* Animação especial para o Modo Gênio */
.thinking-status.genius-thinking {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.08), 
        rgba(139, 92, 246, 0.06), 
        rgba(168, 85, 247, 0.04)
    );
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.1),
        0 8px 24px rgba(99, 102, 241, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: geniusGlow 3s ease-in-out infinite;
}

.thinking-status.genius-thinking::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(99, 102, 241, 0.4), 
        rgba(139, 92, 246, 0.3), 
        transparent
    );
    animation: geniusShimmer 2.5s infinite;
}

@keyframes geniusGlow {
    0%, 100% {
        box-shadow: 
            0 2px 8px rgba(99, 102, 241, 0.1),
            0 8px 24px rgba(99, 102, 241, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 4px 16px rgba(99, 102, 241, 0.15),
            0 12px 32px rgba(99, 102, 241, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

@keyframes geniusShimmer {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.thinking-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thinking-indicator {
    display: flex;
    align-items: center;
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: #000000;
    border-radius: 50%;
    animation: thinkingPulse 1.6s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.thinking-text {
    font-size: 15px;
    color: #070707;
    font-weight: 400;
    letter-spacing: 0.025em;
    line-height: 1.4;
}

@keyframes thinkingPulse {
    0%, 80%, 100% {
        transform: scale(0.7);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a1a1a 0%, #404040 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px) scale(1.02);
}

.send-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.send-btn:disabled {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    cursor: not-allowed;
    color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: none;
}

.send-btn:disabled::before {
    display: none;
}

.input-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(26, 26, 26, 0.6);
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

.input-footer:hover {
    color: rgba(26, 26, 26, 0.8);
}

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

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    border: 3px solid #ffffff;
    border-top: 3px solid #000000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.02em;
}

.modal-close {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    font-size: 14px;
    color: #666666;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000000;
    transform: scale(1.05);
}

.modal-body {
    padding: 20px 28px 28px 28px;
    max-height: 65vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Model List Styles */
.model-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-selection-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.model-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    margin-bottom: 8px;
}

.model-item:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.model-item.selected {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.model-radio {
    display: flex;
    align-items: center;
    position: relative;
}

.model-radio input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    margin: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.model-item.selected .radio-custom {
    border-color: #000000;
    background: #000000;
    transform: scale(1.1);
}

.model-item.selected .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    animation: radioCheck 0.2s ease-out;
}

@keyframes radioCheck {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.model-info {
    flex: 1;
}

.model-name {
    font-weight: 600;
    color: #000000;
    font-size: 15px;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.tool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-name {
    font-weight: 600;
    color: #000000;
    font-size: 16px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.tool-description {
    font-weight: 400;
    color: #666666;
    font-size: 13px;
    letter-spacing: -0.01em;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-item:hover .tool-description {
    color: #555555;
}

.tool-item.selected .tool-description {
    color: #333333;
}

.tool-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.tool-status i {
    font-size: 24px;
    color: #cccccc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-item:hover .tool-status i {
    color: #999999;
    transform: scale(1.1);
}

.tool-item.selected .tool-status i {
    color: #000000;
    transform: scale(1.2);
}

.tool-item.selected .tool-status i::before {
    content: '\f205';
}

.model-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}



/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.model-check {
    color: #000000;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.model-item.selected .model-check {
    opacity: 1;
}





/* Tools Grid Styles */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    margin-bottom: 12px;
}

.tool-item:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tool-item.selected {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-icon i {
    font-size: 20px;
    color: #666666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-item:hover .tool-icon {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.tool-item:hover .tool-icon i {
    color: #333333;
}

.tool-item.selected .tool-icon {
    background: #000000;
    transform: scale(1.1);
}

.tool-item.selected .tool-icon i {
    color: #ffffff;
}

/* Tool items layout improvements */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-icon i {
    font-size: 18px;
    color: #333333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tool-name {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.tool-description {
    font-size: 12px;
    color: #666666;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4;
}

.tool-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.tool-status i {
    font-size: 16px;
    color: #666666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-item:hover .tool-icon {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tool-item:hover .tool-icon i {
    color: #000000;
}

.tool-item:hover .tool-status i {
    color: #333333;
}

.tool-item.selected {
    background: rgba(0, 0, 0, 0.03);
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-item.selected .tool-icon {
    background: #000000;
    transform: translateY(-1px) scale(1.05);
}

.tool-item.selected .tool-icon i {
    color: #ffffff;
}

.tool-item.selected .tool-status i {
    color: #000000;
}

.tool-item.selected .tool-radio .radio-custom {
    opacity: 1;
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-weight: 500;
    color: #000000;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        margin: 0;
        border: none;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .main-header {
        padding: 12px 16px;
    }
    
    .input-container {
        padding: 16px;
    }
    
    .messages-container {
        padding: 16px;
    }
}

/* Scrollbar - Hidden */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Hide scrollbar for Firefox */
* {
    scrollbar-width: none;
}

/* Hide scrollbar for IE and Edge */
* {
    -ms-overflow-style: none;
}

/* Code blocks */
pre {
    background: #000000;
    color: #FFFFFF;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid #000000;
}

code {
    background: #000000;
    color: #FFFFFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}