/* Import modern monospace font for code */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&display=swap');

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

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(0deg, #fff 0%, #f8f6ff 100%);
}



body.dark-mode {
    background: #18181b;
    color: #f3f3f3;
}


body.dark-mode .container,
body.dark-mode .empty-section,
body.dark-mode .content-area,
body.dark-mode .tab-content,
body.dark-mode .content-panel,
body.dark-mode .plan-content-full,
body.dark-mode .execution-block-full,
body.dark-mode .platform-status-box,
body.dark-mode .default-message {
    background: #23232a !important;
    color: #f3f3f3 !important;
    transition: background 0.3s, color 0.3s;
}
body.dark-mode .chat-section {
    background: #101014 !important;
    color: #f3f3f3 !important;
}
body.dark-mode .chat-input-container {
    background: transparent !important;
}
body.dark-mode .chat-input {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border-color: #333 !important;
}
body.dark-mode .send-button {
    background: #5529D6 !important;
    color: #fff !important;
}
body.dark-mode .send-button:hover {
    background: #3e1e9c !important;
}
body.dark-mode .message.user {
    background: #5529D6 !important;
    color: #fff !important;
}
body.dark-mode .message.agent, body.dark-mode .message.bot {
    background: #23232a !important;
    color: #f3f3f3 !important;
}
body.dark-mode .tab-navigation,
body.dark-mode .tab-navigation-pill {
    background: #23232a !important;
    border-color: #333 !important;
}

/* Dark mode sliding background */
body.dark-mode .tab-navigation-pill::before {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
    box-shadow: 
        0 4px 12px rgba(124, 58, 237, 0.4),
        0 2px 4px rgba(124, 58, 237, 0.2) !important;
}

body.dark-mode .tab-button {
    color: #bbb !important;
    background: transparent !important;
}
body.dark-mode .tab-button.active {
    color: #fff !important;
    background: transparent !important; /* Background handled by sliding indicator */
}
body.dark-mode .platform-status-box {
    background: #18181b !important;
    border-color: #333 !important;
}
body.dark-mode .platform-status-box.all-ready {
    background: #1e2d1e !important;
    border-color: #22c55e !important;
}
body.dark-mode .platform-status-box.partial {
    background: #2d261a !important;
    border-color: #f59e0b !important;
}
body.dark-mode .platform-status-box.none-ready {
    background: #2d1a1a !important;
    border-color: #ef4444 !important;
}
/* Dark mode overrides for code elements */
body.dark-mode .code-editor {
    background: #1e1e1e !important;
    border-color: #333 !important;
}

body.dark-mode #codePanel.code-editor-active {
    background: #1e1e1e !important;
}

body.dark-mode .code-content {
    background: #1e1e1e !important;
}

body.dark-mode .code-content pre,
body.dark-mode .code-content code {
    color: #d4d4d4 !important;
}

body.dark-mode .code-block-full,
body.dark-mode .execution-block-full {
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
    border-color: #333 !important;
}

body.dark-mode .line-numbers {
    background: #252526 !important;
    color: #858585 !important;
    border-right: 1px solid #333 !important;
}
body.dark-mode .message-content code,
body.dark-mode .plan-content-full code {
    background: #23232a !important;
    color: #eab308 !important;
}
body.dark-mode .plan-content-full pre {
    background: #18181b !important;
    border-color: #333 !important;
    color: #f3f3f3 !important;
}
body.dark-mode .custom-toast {
    background: #23232a !important;
    color: #fff !important;
}
body.dark-mode .copy-btn {
    background: #23232a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}
body.dark-mode .copy-btn:hover {
    background: #333 !important;
}
body.dark-mode #darkModeToggle {
    background: #23232a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}
body.dark-mode #darkModeToggle svg {
    stroke: #f3f3f3 !important;
}

/* Timer Styles */
.timer-container {
    position: absolute;
    top: 18px;
    right: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
    z-index: 20;
    min-width: 60px;
    height: 38px;
}

.timer-display {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 14px;
    color: #5529D6;
    text-align: center;
    line-height: 1;
}

.timer-controls {
    display: flex;
    gap: 4px;
}

.timer-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #666;
    transition: color 0.2s;
    font-size: 12px;
}

.timer-btn:hover {
    color: #5529D6;
}

/* Dark mode timer styles */
body.dark-mode .timer-container {
    background: #23232a !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

body.dark-mode .timer-display {
    color: #8b5cf6 !important;
}

body.dark-mode .timer-btn {
    color: #ccc !important;
}

body.dark-mode .timer-btn:hover {
    color: #8b5cf6 !important;
}

/* Responsive timer */
@media (max-width: 768px) {
    .timer-container {
        right: 70px;
        padding: 6px 10px;
        height: 36px;
        min-width: 55px;
    }
    
    .timer-display {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .timer-container {
        right: 60px;
        padding: 5px 8px;
        height: 34px;
        min-width: 50px;
    }
    
    .timer-display {
        font-size: 11px;
    }
}
body.dark-mode .spinner {
    border-top: 2px solid #5529D6 !important;
    border-color: #333 #333 #333 #5529D6 !important;
}
body.dark-mode .modal, body.dark-mode #deployAgentModal, body.dark-mode #deployConfirmationModal {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border-color: #333 !important;
}
body.dark-mode .platform-item {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border-color: #333 !important;
}
body.dark-mode .status-ready {
    color: #22c55e !important;
}
body.dark-mode .status-missing {
    color: #f59e0b !important;
}
body.dark-mode .notification-dot {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 2px solid #23232a !important;
}
body.dark-mode .default-message,
body.dark-mode .default-message h2,
body.dark-mode .default-message div,
body.dark-mode .default-message span,
body.dark-mode .default-message p {
    color: #f3f3f3 !important;
    background: transparent !important;
}
body.dark-mode .default-message .welcome-icon {
    opacity: 0.9;
}
body.dark-mode .default-message .default-message h2 {
    color: #fff !important;
}
body.dark-mode .default-message .default-message div {
    color: #e0e0e0 !important;
}
body.dark-mode .default-message .default-message span {
    color: #b3b3b3 !important;
}
body.dark-mode .agent-status-fixed .agent-label {
    color: #bbb !important;
}
body.dark-mode .agent-name {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border-left: 4px solid #5529D6 !important;
    transition: background 0.3s, color 0.3s, border-left-color 0.3s;
}
body.dark-mode .agent-name.agent-processing {
    border-left-color: #3b82f6 !important;
}
body.dark-mode .agent-name.agent-receiving {
    border-left-color: #22c55e !important;
}
body.dark-mode .agent-name.agent-error {
    border-left-color: #ef4444 !important;
}
body.dark-mode .agent-name.agent-ready {
    border-left-color: #5529D6 !important;
}

/* Dark mode support for research chips */
body.dark-mode .research-sources h4 {
    color: #e0e0e0 !important;
}

body.dark-mode .research-chip {
    background: rgba(35, 35, 42, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e0e0e0 !important;
    box-shadow: 0 2px 12px 0 rgba(94, 45, 238, 0.15) !important;
}

body.dark-mode .research-chip:hover {
    background: rgba(94, 45, 238, 0.2) !important;
    border-color: rgba(94, 45, 238, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px 0 rgba(94, 45, 238, 0.25) !important;
}
/* Code syntax highlighting dark mode overrides */
body.dark-mode .python-keyword { color: #569cd6 !important; }
body.dark-mode .python-string { color: #ce9178 !important; }
body.dark-mode .python-docstring { color: #6a9955 !important; }
body.dark-mode .python-fstring { color: #d7ba7d !important; }
body.dark-mode .python-comment { color: #6a9955 !important; }
body.dark-mode .python-decorator { color: #dcdcaa !important; }
body.dark-mode .python-number { color: #b5cea8 !important; }
body.dark-mode .python-builtin { color: #4ec9b0 !important; }
body.dark-mode .python-operator { color: #d4d4d4 !important; }
body.dark-mode .python-function { color: #dcdcaa !important; }
body.dark-mode .json-key { color: #92c5f7 !important; }
body.dark-mode .json-string { color: #ce9178 !important; }
body.dark-mode .json-number { color: #b5cea8 !important; }
body.dark-mode .json-boolean { color: #569cd6 !important; }
body.dark-mode .json-null { color: #569cd6 !important; }
body.dark-mode .json-punctuation { color: #d4d4d4 !important; }

.container {
    display: flex;
    height: 100vh;
    border: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* Left Half - Chat Section */
.chat-section {
    width: 40%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    z-index: 1;
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
    position: relative;
    overflow: hidden;
}

.chat-messages {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 100px 20px 100px 20px; /* Increased top padding to avoid overlap with status container */
    overflow-y: auto;
    color: #fff;
    /* Hide scrollbar while maintaining scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Responsive Chat Messages Padding */
@media (max-width: 768px) {
    .chat-messages {
        padding: 80px 15px 90px 15px;
    }
    
    .chat-input-container {
        left: 15px;
        right: 15px;
        padding: 8px 18px 8px 8px;
    }
}

@media (max-width: 576px) {
    .chat-messages {
        padding: 70px 10px 80px 10px;
    }
    
    .chat-input-container {
        left: 10px;
        right: 10px;
        padding: 8px 18px 8px 6px;
    }
}

/* Hide scrollbar for WebKit browsers */
.chat-messages::-webkit-scrollbar {
    display: none;
}

.chat-input-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: transparent;
    border-radius: 18px;
    box-shadow: none;
    padding: 8px 18px 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 800px;
    margin: 0 auto;
    z-index: 10;
}

/* Remove dark background for dark mode on chat-section and input in light mode */
body:not(.dark-mode) .chat-section,
body:not(.dark-mode) .chat-input-container {
    background: transparent !important;
}

/* Ensure chat messages have no solid background in light mode */
body:not(.dark-mode) .chat-messages {
    background: transparent !important;
}

/* Make sure the purple blob is visible behind the glass */
#bodyBgLeft {
    z-index: 0;
}

/* Ensure main content is above the blob */
.container {
    position: relative;
    z-index: 1;
}

.chat-input {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
    flex: 1;
    font-size: 1.08em;
    color: #444;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
}

.chat-input::placeholder {
    color: #444;
    opacity: 0.7;
}

.chat-input:focus {
    border-color: #5529D6;
}

.chat-input::placeholder {
    color: #444;
    font-weight: 400;
    opacity: 0.7;
}

.send-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5e2dee 60%, #937bf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px 0 rgba(94, 45, 238, 0.15);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    padding: 0;
}

.send-button:hover {
    background: linear-gradient(135deg, #4c1d95 60%, #5e2dee 100%);
    box-shadow: 0 4px 16px 0 rgba(94, 45, 238, 0.18);
}

.send-button img {
    width: 22px;
    height: 19px;
    display: block;
}

.send-button:active {
    transform: translateY(1px);
}

/* Right Half - Status and Tabbed Content */
.empty-section {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: #333;
    font-size: 14px;
    border: none !important;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15) !important;
    width: 60%;
}

/* Top Section - Now just for Tab Navigation */
.top-section {
    display: block;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
    position: relative;
    padding: 25px 200px 25px 200px;
    min-height: 100px;
}

/* Responsive Top Section Padding */
@media (max-width: 1400px) {
    .top-section {
        padding: 25px 150px 25px 150px;
        min-height: 90px;
    }
}

@media (max-width: 1200px) {
    .top-section {
        padding: 20px 100px 20px 100px;
        min-height: 80px;
    }
}

@media (max-width: 992px) {
    .top-section {
        padding: 15px 60px 15px 60px;
        min-height: 70px;
    }
}

@media (max-width: 768px) {
    .top-section {
        padding: 12px 30px 12px 30px;
        min-height: 60px;
    }
}

@media (max-width: 576px) {
    .top-section {
        padding: 10px 15px 10px 15px;
        min-height: 50px;
    }
}

/* Agent Status - Fixed Position on Left */
.agent-status-fixed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    min-height: 60px;
    width: 100%;
    flex-shrink: 0;
    z-index: 11;
    position: relative;
    background: transparent;
    border: none;
}

.agent-info {
    display: flex;
    flex-direction: column;
}

.agent-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-name {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    min-width: 120px;

    /* Add transition for smooth outline changes */
    transition: all 0.3s ease;
    position: relative;
}

/* Agent Name Processing State - Blue Pulsing Outline */
.agent-name.agent-processing {
    animation: agentProcessingPulse 2s infinite;
    border-left: 4px solid #3b82f6;
}

/* Agent Name Receiving State - Green Moving Outline */
.agent-name.agent-receiving {
    animation: agentReceivingPulse 1.5s infinite;
    border-left: 4px solid #22c55e;
}

/* Agent Name Error State - Red Pulsing Outline */
.agent-name.agent-error {
    animation: agentErrorPulse 1s infinite;
    border-left: 4px solid #ef4444;
}

/* Agent Name Ready State - Subtle Ready Pulse */
.agent-name.agent-ready {
    animation: agentReadyPulse 3s infinite;
    border-left: 4px solid #007bff;
}

/* Keyframes for Agent Name Outline Animations */
@keyframes agentProcessingPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
        border-left-color: #3b82f6;
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
        border-left-color: #1d4ed8;
    }
}

@keyframes agentReceivingPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
        border-left-color: #22c55e;
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        border-left-color: #15803d;
    }
}

@keyframes agentErrorPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-left-color: #ef4444;
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        border-left-color: #dc2626;
    }
}

@keyframes agentReadyPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(7, 123, 255, 0.1);
        border-left-color: #007bff;
    }
    50% { 
        box-shadow: 0 0 0 3px rgba(7, 123, 255, 0);
        border-left-color: #0056b3;
    }
}

.processing-status {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Hide the processing status - functionality moved to agent name outline */
    display: none;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #28a745;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #d4edda;
    /* Hidden - functionality moved to agent name outline */
    display: none;
}

.status-text.processing {
    color: #856404;
    background-color: #fff3cd;
    /* Hidden - functionality moved to agent name outline */
    display: none;
}

/* Content Area - Full Height Below Top Section */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    height: 100%;
    position: relative;
}

/* Default Message */
.default-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-align: center;
    padding: 40px 20px;
    min-height: 0;
    min-width: 0;
    height: 100%;
}

/* New Welcome Screen Styles */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
    margin-bottom: 32px;
    transform: translateY(-40px);
}

.floating-logo-container {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.logo-glow {
    position: absolute;
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, transparent 70%);
    filter: blur(20px);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

body.dark-mode .logo-glow {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.3) 0%, transparent 70%);
    filter: blur(25px);
}

.floating-logo {
    position: relative;
    width: 100%;
    height: 100%;
    animation: floatAnimation 6s ease-in-out infinite;
    z-index: 1;
}

.welcome-message {
    text-align: center;
    margin-bottom: 8px;
}

.flow-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 32px 0;
    font-size: 15px;
    color: #666;
    justify-content: center;
    opacity: 0.7;
}

/* Quick Action Cards */
.quick-cards {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 16px auto 0;
    max-width: 900px;
    padding: 0 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 28px -1px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.card-text {
    font-size: 14px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

/* Dark mode support for cards */
/* Dark mode overrides */
body.dark-mode {
    background: #1a1a1a;
}

body.dark-mode .greeting,
body.dark-mode .prompt-question {
    color: #ffffff;
}

body.dark-mode .highlight {
    color: #ffffff;
    font-weight: 600;
}

body.dark-mode .flow-steps {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .flow-arrow {
    color: #9333EA;
    opacity: 0.9;
}

body.dark-mode .glass-card {
    background: #1E1E1E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .glass-card:hover {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .card-text {
    color: #ffffff;
    opacity: 0.9;
}

body.dark-mode .version-badge {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

.flow-arrow {
    color: #9333EA;
    font-weight: 400;
    opacity: 0.8;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.greeting {
    font-size: 42px;
    color: #1a1a1a;
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.1;
}

.prompt-question {
    font-size: 42px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 2px;
}

.highlight {
    color: #9333EA;
    font-weight: inherit;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.default-message h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.default-message p {
    font-size: 14px;
    opacity: 0.8;
}

/* ============= NEW TAB SYSTEM ARCHITECTURE ============= */

/* Tab Navigation - Absolutely Centered in White Space */
.tab-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
    z-index: 10;
    pointer-events: none;
}

.tab-navigation-pill {
    pointer-events: all;
}

.tab-navigation-pill {
    display: flex;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Sliding background indicator for smooth transitions */
.tab-navigation-pill::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: var(--sliding-bg-width, 140px); /* Use CSS variable for dynamic width */
    height: calc(100% - 12px);
    background: linear-gradient(135deg, #5e2dee, #4a1fb8);
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(94, 45, 238, 0.4),
        0 2px 4px rgba(94, 45, 238, 0.2);
    transform: translateX(var(--sliding-bg-x, 0px)); /* Use CSS variable for position */
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

/* Enhanced animation state for smoother transitions */
.tab-navigation-pill.tab-animating::before {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .tab-navigation-pill::before,
    .tab-navigation-pill.tab-animating::before {
        transition: transform 0.2s ease,
                    width 0.2s ease;
    }
    
    .tab-button {
        transition: color 0.2s ease,
                    font-weight 0.15s ease,
                    transform 0.15s ease;
    }
    
    .tab-icon {
        transition: opacity 0.2s ease,
                    transform 0.2s ease;
    }
    
    /* Faster timestamp animations for reduced motion */
    .message.bot .message-time {
        transition: opacity 0.2s ease,
                    transform 0.2s ease;
    }
}

/* Responsive Tab Navigation Pill */
@media (max-width: 1200px) {
    .tab-navigation-pill {
        padding: 5px;
        border-radius: 14px;
    }
}

@media (max-width: 992px) {
    .tab-navigation-pill {
        padding: 4px;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .tab-navigation-pill {
        padding: 3px;
        border-radius: 10px;
    }
}

@media (max-width: 576px) {
    .tab-navigation-pill {
        padding: 2px;
        border-radius: 8px;
    }
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    border-radius: 12px;
    position: relative;
    min-width: 140px;
    justify-content: center;
    letter-spacing: 0.025em;
    z-index: 2; /* Above sliding background */
    /* Enhanced fluid transitions */
    transition: 
        color 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        font-weight 0.3s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Responsive Tab Button Sizing */
@media (max-width: 1200px) {
    .tab-button {
        min-width: 120px;
        padding: 12px 20px;
        font-size: 14px;
        gap: 8px;
    }
}

@media (max-width: 992px) {
    .tab-button {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .tab-button {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
        gap: 4px;
        border-radius: 10px;
    }
}

@media (max-width: 576px) {
    .tab-button {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 11px;
        gap: 3px;
        border-radius: 8px;
    }
}



.tab-button.active {
    color: white;
    background: transparent; /* Background now handled by sliding indicator */
    font-weight: 600;
    transform: translateY(-1px) scale(1.02); /* Subtle lift and scale */
}

/* Instant feedback on click */
.tab-button:active {
    transform: translateY(0px) scale(0.96);
    transition: transform 0.15s cubic-bezier(0.4, 0, 1, 1);
}

.tab-button.active:active {
    transform: translateY(0px) scale(0.98);
    transition: transform 0.15s cubic-bezier(0.4, 0, 1, 1);
}

/* Tab Icon Styling */
.tab-icon {
    flex-shrink: 0;
    opacity: 0.7;
    transition: 
        opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.tab-button.active .tab-icon {
    opacity: 1;
    transform: scale(1.05) translateY(-1px);
}

/* Hover effects for non-active tabs */
.tab-button:not(.active):hover {
    color: #5529D6;
    transform: translateY(-0.5px);
}

.tab-button:not(.active):hover .tab-icon {
    opacity: 1;
    color: #5529D6;
}

/* Responsive Design for Pill Navigation */
@media (max-width: 768px) {
    .tab-navigation {
        padding: 12px 16px;
    }
    
    .tab-navigation-pill {
        border-radius: 14px;
        padding: 4px;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 100px;
        gap: 8px;
    }
    
    .tab-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 80px;
        gap: 6px;
    }
    
    .tab-icon {
        width: 12px;
        height: 12px;
    }
}

/* Notification dot for new content - Updated for pill design */
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.2);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }
}



/* Tab Content - New Clean Architecture */
.tab-content {
    flex: 1;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
    height: 100%;
}

/* Base Tab Panel Styling */
.content-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    /* Smooth, elegant tab switching animation */
    transition: 
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(8px);
    overflow-y: auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    height: 100%;
}

/* Active Tab Panel */
.content-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1;
}

/* ============= PLAN TAB STYLING ============= */
#planPanel {
    /* Uses base content-panel styling */
}

/* ============= EXECUTION TAB STYLING ============= */
#executionPanel {
    /* Uses base content-panel styling */
}

/* ============= CODE TAB STYLING ============= */

/* Standard Code Panel (before enhancement) */
#codePanel {
    /* Uses base content-panel styling */
}

/* Enhanced Code Panel (after enhancement) */
#codePanel.code-editor-active {
    padding: 3px;
    overflow: hidden;
    background: #f8f9fa !important; /* Light mode background */
}

/* Code Editor Container */
.code-editor {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #f8f9fa; /* Light mode background */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9; /* Light mode border */
    font-family: 'Fira Code', 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    margin: 3px;
    z-index: 1;
}

/* Line Numbers Panel */
.line-numbers {
    background: #f1f3f4; /* Light mode background */
    color: #6b7280; /* Light mode text color */
    padding: 18px 10px;
    text-align: right;
    border-right: 1px solid #e1e5e9; /* Light mode border */
    user-select: none;
    min-width: 40px;
    font-size: 13px;
    overflow: hidden;
    flex-shrink: 0;
}

.line-number {
    display: block;
    line-height: 1.5;
    padding: 0 8px;
    font-variant-numeric: tabular-nums;
}

.line-number:hover {
    background: #e5e7eb; /* Light mode hover */
}

/* Code Content Panel */
.code-content {
    flex: 1;
    overflow: auto;
    background: #f8f9fa; /* Light mode background */
    height: 100%;
}

.code-content pre {
    margin: 0;
    padding: 18px;
    background: transparent;
    color: #374151 !important; /* Light mode text color */
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
    overflow: visible;
}

.code-content code {
    background: transparent;
    color: #374151 !important; /* Light mode text color */
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    display: block;
}

/* Plan Content Styling */
.plan-content-full {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    position: relative; /* Allow absolute positioning of platform box */
}

.plan-content-full h1,
.plan-content-full h2,
.plan-content-full h3,
.plan-content-full h4,
.plan-content-full h5,
.plan-content-full h6 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.plan-content-full h1 { font-size: 20px; }
.plan-content-full h2 { font-size: 18px; }
.plan-content-full h3 { font-size: 16px; }
.plan-content-full h4,
.plan-content-full h5,
.plan-content-full h6 { font-size: 14px; }

.plan-content-full ul,
.plan-content-full ol {
    margin: 12px 0;
    padding-left: 24px;
}

.plan-content-full li {
    margin: 6px 0;
}

.plan-content-full code {
    background-color: #f1f3f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #e91e63;
}

.plan-content-full pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.plan-content-full pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.plan-content-full strong {
    font-weight: 600;
    color: #2c3e50;
}

.plan-content-full em {
    font-style: italic;
    color: #6c757d;
}

/* Platform Status Box Styling - Small Top-Right Corner */
.platform-status-box {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 180px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.platform-status-box.all-ready {
    border-color: #22c55e;
    background: #f0fdf4;
}

.platform-status-box.partial {
    border-color: #f59e0b;
    background: #fffbeb;
}

.platform-status-box.none-ready {
    border-color: #ef4444;
    background: #fef2f2;
}

.platform-status-box h4 {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: center;
    justify-content: center;
}

.platform-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.platform-summary {
    text-align: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.status-ready {
    color: #059669;
    font-weight: 600;
    font-size: 10px;
}

.status-missing {
    color: #d97706;
    font-weight: 600;
    font-size: 10px;
}

.plan-content-container {
    /* Container for actual plan content */
    position: relative;
    padding-top: 0;
    margin-right: 200px; /* Make space for platform status box */
}

/* Code Content Styling */
.code-block-full {
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa; /* Light mode background */
    color: #1f2937; /* Light mode text color */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 6px;
    border: 1px solid #e1e5e9; /* Light mode border */
    overflow-x: auto;
}

.code-block-full code {
    display: block;
}

/* Execution Result Styling */
.execution-block-full {
    margin: 0;
    padding: 20px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 6px;
    overflow-x: auto;
}

.execution-block-full code {
    display: block;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

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

/* Deploy buttons container */
.deploy-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ADK Deploy button styling */
#deployADKButton {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#deployADKButton:hover {
    background: #218838;
}

#deployADKButton:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive design for deploy buttons */
@media (max-width: 768px) {
    .deploy-buttons-container {
        flex-direction: column;
        gap: 8px;
    }
    
    #deployAgentButton,
    #deployADKButton {
        width: 100%;
        max-width: 200px;
    }
}

/* Chat Messages Styling */
.message {
    margin-bottom: 15px;
    padding: 24px 28px;
    border-radius: 24px;
    max-width: 80%;
    word-wrap: break-word;
    clear: both;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #222;
    /* Smooth entrance animation */
    animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom;
    /* Hardware acceleration for smoother animations */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    /* Very subtle hover effect */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.message:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 26px 0 rgba(31, 38, 135, 0.1);
}

.message.user {
    float: right;
    background: #5e2dee;
    color: #fff;
    border-radius: 24px 24px 4px 24px;
    box-shadow: 0 4px 24px 0 rgba(94, 45, 238, 0.10);
    /* Remove glass effect for user bubble */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    /* User message enters from right */
    animation: messageSlideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.message.agent, .message.bot {
    float: left;
    background: rgba(255,255,255,0.8); /* slightly less opaque for more blob visibility */
    color: #222;
    border-radius: 24px 24px 24px 4px;
    box-shadow: 0 4px 16px 0 rgba(94, 45, 238, 0.10); /* more subtle shadow */
    backdrop-filter: blur(24px); /* more blur */
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.35);
    /* Agent message enters from left */
    animation: messageSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .message,
body.dark-mode .message.user,
body.dark-mode .message.agent,
body.dark-mode .message.bot {
    background: #23232a !important;
    color: #f3f3f3 !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Smooth Message Entrance Animations */
@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes messageSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px) translateY(10px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateX(-2px) translateY(-1px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

@keyframes messageSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px) translateY(10px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateX(2px) translateY(-1px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .message {
        animation: messageSlideInReduced 0.2s ease-out;
    }
    
    .message.user,
    .message.agent, 
    .message.bot {
        animation: messageSlideInReduced 0.2s ease-out;
    }
}

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

/* Subtle Agent Name Change Animation */
.message-header.name-changing {
    animation: agentNameChange 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agentNameChange {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.985);
        opacity: 0.85;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Reduced motion for agent name changes */
@media (prefers-reduced-motion: reduce) {
    .message-header.name-changing {
        animation: agentNameChangeReduced 0.2s ease-out;
    }
    
    @keyframes agentNameChangeReduced {
        0% {
            opacity: 0.8;
        }
        100% {
            opacity: 1;
        }
    }
}

/* Agent timestamp fade-in animation */
.message-time {
    font-size: 11px;
    color: #bbb;
    text-align: right;
    margin-top: 2px;
    opacity: 0.7;
}

/* Hide agent timestamps initially, show user timestamps immediately */
.message.bot .message-time {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.message.user .message-time {
    opacity: 0.7; /* User timestamps always visible */
}

/* Fade-in class for agent timestamps after streaming completes */
.message.bot .message-time.show {
    opacity: 0.7;
    transform: translateY(0);
}

/* Dark mode timestamp styling */
body.dark-mode .message-time {
    color: #999;
}

/* Typing cursor removed per user request */

/* Responsive animation adjustments */
@media (max-width: 768px) {
    .message {
        animation-duration: 0.3s;
    }
    
    .message.user,
    .message.agent, 
    .message.bot {
        animation-duration: 0.3s;
    }
    
    .message-header.name-changing {
        animation-duration: 0.3s;
    }
    
    /* Mobile responsive animations */
    
    @keyframes messageSlideInRight {
        0% {
            opacity: 0;
            transform: translateX(20px) translateY(8px) scale(0.96);
        }
        100% {
            opacity: 1;
            transform: translateX(0) translateY(0) scale(1);
        }
    }
    
    @keyframes messageSlideInLeft {
        0% {
            opacity: 0;
            transform: translateX(-20px) translateY(8px) scale(0.96);
        }
        100% {
            opacity: 1;
            transform: translateX(0) translateY(0) scale(1);
        }
    }
}

.message-header {
    display: inline-block;
    background: #5e2dee;
    color: #fff;
    font-weight: 500;
    font-size: 0.90em;
    border-radius: 12px;
    padding: 3px 12px;
    margin-bottom: 8px;
    margin-left: 2px;
    box-shadow: 0 2px 8px 0 rgba(94, 45, 238, 0.10);
    letter-spacing: 0.01em;
    /* Smooth transitions for agent name changes */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.message-content {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.5;
}

/* Message Content Formatting */
.message-content p {
    margin: 8px 0;
    line-height: 1.5;
}

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

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

.message-content ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

.message-content li {
    margin: 4px 0;
    line-height: 1.4;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 { font-size: 18px; }
.message-content h2 { font-size: 16px; }
.message-content h3 { font-size: 15px; }
.message-content h4,
.message-content h5,
.message-content h6 { font-size: 14px; }

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

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

.message-content code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.message-content pre {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.message-content pre code {
    background: none;
    padding: 0;
}

/* Duplicate removed - moved above */

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2a2a2a;
}

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Python Syntax Highlighting - Light Mode */
.python-keyword { color: #0066cc; font-weight: bold; } /* Blue for keywords */
.python-string { color: #008000; } /* Green for strings */
.python-comment { color: #6a737d; font-style: italic; } /* Gray for comments */
.python-number { color: #d73a49; } /* Red for numbers */
.python-function { color: #6f42c1; } /* Purple for functions */
.python-operator { color: #24292e; } /* Dark gray for operators */
.python-builtin { color: #005cc5; } /* Blue for builtins */

/* JSON Syntax Highlighting - Light Mode */
.json-key { color: #032f62; } /* Dark blue for keys */
.json-string { color: #008000; } /* Green for strings */
.json-number { color: #d73a49; } /* Red for numbers */
.json-boolean { color: #0066cc; } /* Blue for booleans */
.json-null { color: #0066cc; } /* Blue for null */
.json-punctuation { color: #24292e; } /* Dark gray for punctuation */

/* ============= ENHANCED EXECUTION RESULT DISPLAY ============= */

/* Main container for enhanced execution content */
.execution-enhanced-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

/* ============= EXECUTION HEADER SECTION ============= */
.execution-header-section {
    background: #2d3748;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #38a169;
}

.execution-header-section h3 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.execution-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.execution-function {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.execution-function .label {
    color: #a0aec0;
    font-size: 14px;
    font-weight: 500;
}

.execution-function .value {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: #1a202c;
    padding: 4px 8px;
    border-radius: 4px;
}

.execution-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.execution-stats .status {
    color: #38a169;
    font-size: 14px;
    font-weight: 600;
}

.execution-stats .tokens {
    color: #4299e1;
    font-size: 14px;
    font-weight: 500;
}

.execution-stats .duration {
    color: #ed8936;
    font-size: 14px;
    font-weight: 500;
}

/* ============= STRUCTURED DATA SECTION ============= */
.execution-structured-section {
    background: #1a202c;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #4299e1;
}

.execution-structured-section h3 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.structured-data-content {
    background: #0d1117;
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #30363d;
}

.structured-data-content pre {
    margin: 0;
    padding: 16px;
    background: transparent;
    color: #e6edf3;
    font-family: 'Fira Code', 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.structured-data-content code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Enhanced JSON syntax highlighting for structured data */
.json-enhanced {
    color: #e6edf3 !important;
}

.json-enhanced .json-key { color: #7dd3fc !important; }
.json-enhanced .json-string { color: #a5f3fc !important; }
.json-enhanced .json-number { color: #86efac !important; }
.json-enhanced .json-boolean { color: #fbbf24 !important; }
.json-enhanced .json-null { color: #f87171 !important; }
.json-enhanced .json-punctuation { color: #e6edf3 !important; }

/* ============= FORMATTED SUMMARY SECTION ============= */
.execution-summary-section {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #805ad5;
}

.execution-summary-section h3 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-content {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
}

.summary-content p {
    margin: 0;
    word-wrap: break-word;
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 768px) {
    .execution-enhanced-content {
        gap: 12px;
    }
    
    .execution-header-section,
    .execution-structured-section,
    .execution-summary-section {
        padding: 12px;
    }
    
    .execution-header-section h3,
    .execution-structured-section h3,
    .execution-summary-section h3 {
        font-size: 14px;
    }
    
    .execution-stats {
        gap: 12px;
    }
    
    .execution-function {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    
    .structured-data-content pre {
        padding: 12px;
        font-size: 13px;
    }
}

@media (min-width: 768px) and (max-width: 1366px) {
  .container {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .chat-section {
    width: 45%;
    min-width: 320px;
    max-width: 100vw;
  }
  .empty-section {
    width: 55%;
    min-width: 400px;
    max-width: 100vw;
  }
  .top-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    overflow-x: visible;
  }
  .tab-navigation {
    position: static;
    margin-top: 8px;
    width: 100%;
    justify-content: flex-start;
    left: unset;
    right: unset;
    top: unset;
    bottom: unset;
    transform: none;
    display: flex;
    align-items: center;
  }
  .tab-navigation-pill {
    padding: 2px;
    gap: 4px;
  }
  .tab-button {
    min-width: 90px;
    padding: 10px 10px;
    font-size: 14px;
  }
}

@media (max-width: 1500px) {
  .top-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tab-navigation {
    position: static;
    margin-top: 8px;
    width: 100%;
    justify-content: flex-start;
    left: unset;
    right: unset;
    top: unset;
    bottom: unset;
    transform: none;
    display: flex;
    align-items: center;
  }
}

/* Content Panel Scrollbars */
.content-panel::-webkit-scrollbar {
    width: 8px;
}

.content-panel::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.content-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.content-panel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .chat-section,
    .empty-section {
        width: 100%;
        height: 50vh;
    }
    
    /* Stack top section vertically on mobile */
    .top-section {
        flex-direction: column;
        position: static;
    }
    
    .agent-status-fixed {
        padding: 12px 16px;
        min-height: 60px;
        width: auto;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tab-navigation {
        position: static;
        padding: 12px 16px;
        pointer-events: all;
    }
    
    .tab-navigation-pill {
        pointer-events: all;
    }
    
    .agent-name {
        font-size: 14px;
        min-width: 100px;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .content-panel {
        padding: 16px;
    }
}

/* Toast Notification */
.custom-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #222;
    color: #fff;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.05em;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    transition: opacity 0.3s, transform 0.4s;
    white-space: pre-line;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Typing Animation */
.typing-animation {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    min-height: 24px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #888;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Agent Status Pulse Animations */
.status-text.pulse-processing {
    animation: pulseBlue 2s infinite;
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.status-text.pulse-receiving {
    animation: pulseGreen 1.5s infinite;
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.status-text.pulse-error {
    animation: pulseRed 1s infinite;
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.status-text.pulse-ready {
    animation: pulseReady 3s infinite;
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

@keyframes pulseBlue {
    0%, 100% { 
        background-color: rgba(59, 130, 246, 0.1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
        color: #3b82f6;
    }
    50% { 
        background-color: rgba(59, 130, 246, 0.2);
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
        color: #1d4ed8;
    }
}

@keyframes pulseGreen {
    0%, 100% { 
        background-color: rgba(34, 197, 94, 0.1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }
    50% { 
        background-color: rgba(34, 197, 94, 0.2);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        color: #15803d;
    }
}

@keyframes pulseRed {
    0%, 100% { 
        background-color: rgba(239, 68, 68, 0.1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }
    50% { 
        background-color: rgba(239, 68, 68, 0.2);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        color: #dc2626;
    }
}

@keyframes pulseReady {
    0%, 100% { 
        background-color: rgba(148, 163, 184, 0.05);
        color: #64748b;
    }
    50% { 
        background-color: rgba(148, 163, 184, 0.1);
        color: #475569;
    }
}

/* Code Editor Styles - Now integrated with new tab system above */

/* Enhanced Python Syntax Highlighting - Light Mode */
.python-keyword {
    color: #0066cc !important; /* Blue for keywords */
    font-weight: 500;
}

.python-string {
    color: #008000 !important; /* Green for strings */
}

.python-docstring {
    color: #6a737d !important; /* Gray for docstrings */
    font-style: italic;
}

.python-fstring {
    color: #22863a !important; /* Darker green for f-strings */
}

.python-comment {
    color: #6a737d !important; /* Gray for comments */
    font-style: italic;
}

.python-number {
    color: #d73a49 !important; /* Red for numbers */
}

.python-decorator {
    color: #6f42c1 !important; /* Purple for decorators */
    font-weight: 500;
}

.python-builtin {
    color: #4ec9b0 !important;
}

.python-function-def {
    color: #dcdcaa !important;
    font-weight: 600;
}

.python-class-def {
    color: #4ec9b0 !important;
    font-weight: 600;
}

.python-operator {
    color: #d4d4d4 !important;
    font-weight: 500;
}

/* Base enhanced class */
.python-enhanced {
    color: #d4d4d4 !important;
}

/* Code Content Scrollbars */
.code-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.code-content::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 6px;
}

.code-content::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 6px;
    border: 2px solid #1e1e1e;
}

.code-content::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

.code-content::-webkit-scrollbar-corner {
    background: #1e1e1e;
}

/* ============= RESEARCH AGENT CHIP STYLES ============= */

/* Research sources section */
.research-sources {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.research-sources h4 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Research chips container */
.research-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Individual research chip styling - Updated to match purple glassmorphism theme */
.research-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 2px 12px 0 rgba(94, 45, 238, 0.08);
}

.research-chip:hover {
    background: rgba(94, 45, 238, 0.1);
    border-color: rgba(94, 45, 238, 0.3);
    text-decoration: none;
    color: #5e2dee;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px 0 rgba(94, 45, 238, 0.15);
}

.research-chip:active {
    background: rgba(94, 45, 238, 0.15);
    border-color: rgba(94, 45, 238, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px 0 rgba(94, 45, 238, 0.12);
}

/* Google logo styling in chips */
.google-logo {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Chip text styling */
.chip-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive design for research chips */
@media (max-width: 768px) {
    .research-chips-container {
        gap: 6px;
    }
    
    .research-chip {
        font-size: 12px;
        padding: 5px 12px;
        gap: 6px;
    }
    
    .google-logo {
        width: 14px;
        height: 14px;
    }
    
    .research-sources h4 {
        font-size: 13px;
    }

    /* Platform Status Box - Mobile Responsive */
    .platform-status-box {
        position: relative;
        width: 100%;
        margin-bottom: 16px;
        padding: 12px;
    }

    .plan-content-container {
        margin-right: 0;
    }
}

/* Simplified Execution Display */
.execution-simple-content {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.execution-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.execution-status h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status indicator removed - simplified layout */

.execution-result {
    margin-top: 15px;
}

.execution-result pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

.execution-result code {
    background-color: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

/* Deploy button styling */
#executionTopRightButton {
    padding: 8px 12px;
    background: #5529D6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

#executionTopRightButton:hover {
    background: #3e1e9c;
    transform: translateY(-1px);
}

#executionTopRightButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .execution-simple-content {
        margin: 10px;
        padding: 15px;
    }
    
    .execution-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .execution-status h3 {
        font-size: 16px;
    }
    
    #executionTopRightButton {
        align-self: flex-end;
        margin-top: 10px;
    }
}

#codeEditorContainer {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}
body.dark-mode .tab-content {
    border-top: 1px solid #23232a !important;
}
body.dark-mode .platform-status-box {
    background: #18181b !important;
    border-color: #22c55e !important;
    color: #f3f3f3 !important;
}
body.dark-mode .platform-status-box h4,
body.dark-mode .platform-status-box .platform-summary,
body.dark-mode .platform-status-box .status-ready,
body.dark-mode .platform-status-box .status-missing {
    color: #a7ffb0 !important;
}
body.dark-mode .platform-item {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border: 1px solid #22c55e !important;
}
body.dark-mode .plan-content-full,
body.dark-mode .plan-content-full *,
body.dark-mode .plan-content-full h1,
body.dark-mode .plan-content-full h2,
body.dark-mode .plan-content-full h3,
body.dark-mode .plan-content-full h4,
body.dark-mode .plan-content-full h5,
body.dark-mode .plan-content-full h6 {
    color: #f3f3f3 !important;
    background: transparent !important;
}
body.dark-mode .plan-content-full strong {
    color: #e0e0e0 !important;
}
body.dark-mode .plan-content-full code,
body.dark-mode .plan-content-full pre {
    background: #23232a !important;
    color: #eab308 !important;
    border-color: #333 !important;
}
body.dark-mode .plan-content-full a {
    color: #82aaff !important;
}
body.dark-mode .execution-status,
body.dark-mode .execution-header-section {
    background: #23232a !important;
    color: #f3f3f3 !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode #executionTopRightButton {
    background: #5529D6 !important;
    color: #fff !important;
    border: none !important;
}
body.dark-mode #executionTopRightButton:hover {
    background: #3e1e9c !important;
}
body.dark-mode .execution-simple-content {
    background: #23232a !important;
    border: 1px solid #333 !important;
}
body.dark-mode .execution-result pre {
    background: #18181b !important;
    border: 1px solid #333 !important;
}
body.dark-mode .execution-status h3,
body.dark-mode .execution-header-section h3 {
    color: #fff !important;
}
@media (max-width: 900px) {
  body.dark-mode .container,
  body.dark-mode .empty-section,
  body.dark-mode .content-panel {
    background: #23232a !important;
  }
}
@media (max-width: 768px) {
  body.dark-mode .container,
  body.dark-mode .empty-section,
  body.dark-mode .content-panel {
    background: #23232a !important;
  }
}
@media (max-width: 480px) {
  body.dark-mode .container,
  body.dark-mode .empty-section,
  body.dark-mode .content-panel {
    background: #23232a !important;
  }
}
body.dark-mode .top-section {
    background: #23232a !important;
    border-bottom: 1px solid #333 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
}
body, .container, .content-panel, .top-section, .plan-content-full, .platform-status-box, .tab-navigation, .code-editor, .default-message, .tab-button, .agent-name, .platform-item, .execution-status, .execution-header-section, .execution-simple-content, .copy-btn, #darkModeToggle, .custom-toast, .chat-section, .chat-input, .send-button, .message, .plan-content-full pre, .plan-content-full code, .platform-summary, .platform-status-box h4, .platform-status-box .status-ready, .platform-status-box .status-missing, .line-numbers, .code-content, .code-block-full, .execution-block-full, .platform-status-box .platform-item {
    transition: background 0.4s cubic-bezier(.4,0,.2,1), color 0.4s cubic-bezier(.4,0,.2,1), border-color 0.4s cubic-bezier(.4,0,.2,1);
}
.offcanvas-backdrop.show {
    opacity: 0.5;
    background-color: #000;
    transition: opacity 0.15s linear;
}
#bodyBgLeft {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 100%;
    width: auto;
    z-index: 0;
    pointer-events: none;
}
#bodyBgLeft img {
    height: 140%;
    width: auto;
    position: absolute;
    left: -60px;
    bottom: -60px;
    opacity: 1;
    display: block;
    user-select: none;
    pointer-events: none;
}
.agent-label-bubble {
    display: inline-block;
    background: #5e2dee;
    color: #fff;
    font-weight: 600;
    font-size: 0.97em;
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 10px;
    margin-left: 2px;
    box-shadow: 0 2px 8px 0 rgba(94, 45, 238, 0.10);
    letter-spacing: 0.01em;
}

/* Avatar Status Component - Floating Island */
.avatar-status-component {
    position: absolute;
    top: 16px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
    z-index: 10;
    pointer-events: auto;
    width: fit-content;
    max-width: calc(100% - 40px);
}

/* Responsive Avatar Status Component */
@media (max-width: 768px) {
    .avatar-status-component {
        top: 12px;
        left: 15px;
        padding: 6px 12px;
        gap: 8px;
        border-radius: 12px;
        max-width: calc(100% - 30px);
    }
}

@media (max-width: 576px) {
    .avatar-status-component {
        top: 10px;
        left: 10px;
        padding: 5px 10px;
        gap: 6px;
        border-radius: 10px;
        max-width: calc(100% - 20px);
    }
}

.avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
    object-fit: cover;
    object-position: center;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #64748b;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

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

.avatar-agent-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.avatar-status-text {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Avatar Text */
@media (max-width: 768px) {
    .avatar-agent-name {
        font-size: 13px;
    }
    
    .avatar-status-text {
        font-size: 11px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 576px) {
    .avatar-agent-name {
        font-size: 12px;
    }
    
    .avatar-status-text {
        font-size: 10px;
        letter-spacing: 0.2px;
    }
}

/* Status Indicator States - Updated Colors */
.status-indicator.indicator-processing {
    animation: indicatorProcessingPulse 2s infinite;
    background: #3b82f6; /* Blue for analyzing */
}

.status-indicator.indicator-receiving {
    animation: indicatorReceivingPulse 1.5s infinite;
    background: #fb923c; /* Orange for receiving */
}

.status-indicator.indicator-error {
    animation: indicatorErrorPulse 1s infinite;
    background: #ef4444; /* Red for error */
}

.status-indicator.indicator-ready {
    animation: indicatorReadyPulse 3s infinite;
    background: #22c55e; /* Green for idle/ready */
}

/* Keyframes for Status Indicator Animations */
@keyframes indicatorProcessingPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #3b82f6;
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #1d4ed8;
    }
}

@keyframes indicatorReceivingPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #fb923c;
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(251, 146, 60, 0), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #ea580c;
    }
}

@keyframes indicatorErrorPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #ef4444;
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #dc2626;
    }
}

@keyframes indicatorReadyPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #22c55e;
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0), 0 1px 3px 0 rgba(0, 0, 0, 0.2);
        background: #15803d;
    }
}

/* Dark mode support for avatar component */
body.dark-mode .avatar-status-component {
    background: rgba(35, 35, 42, 0.8) !important;
    border: none !important;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .agent-avatar {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .avatar-agent-name {
    color: #f3f3f3 !important;
}

body.dark-mode .avatar-status-text {
    color: #bbb !important;
}

/* Thinking animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Rotating circular overlay animation for thinking */
@keyframes rotateOverlay {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode for thinking indicator */
body.dark-mode #thinkingInChat {
    background: #23232a !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.dark-mode #thinkingInChat span {
    color: #ffffff !important;
    opacity: 0.9;
}

body.dark-mode #thinkingInChat .rotator {
    border-top-color: #ffffff !important;
    border-right-color: rgba(255, 255, 255, 0.5) !important;
    opacity: 0.9;
}

/* Simple fade in animation for thinking element */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 0.9;
        transform: scale(1);
    }
}