/* New AI Logo - Transparent background and adaptive theming */
img[src*="nexorax-logo.svg"] {
    background: transparent !important;
    /* AI logo naturally transparent - no background needed */
    backdrop-filter: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    /* Smooth transitions for theme changes */
    transition: filter 0.3s ease, opacity 0.3s ease;
    /* Ensure crisp rendering */
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Light mode - optimal visibility */
img[src*="nexorax-logo.svg"] {
    filter: brightness(1) contrast(1) saturate(1.1);
    opacity: 1;
}

/* Dark mode - enhanced visibility and glow effect */
.dark img[src*="nexorax-logo.svg"] {
    /* Enhance brightness and add subtle glow for dark backgrounds */
    filter: brightness(1.2) contrast(1.1) saturate(1.2) drop-shadow(0 0 8px rgba(168, 85, 247, 0.3));
    opacity: 0.95;
}

/* Hover effects for interactive elements */
img[src*="nexorax-logo.svg"]:hover {
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.dark img[src*="nexorax-logo.svg"]:hover {
    filter: brightness(1.3) contrast(1.2) saturate(1.3) drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
    transform: scale(1.02);
}

/* Modern Settings Modal Styles - Easy to Read */
.modern-settings-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    will-change: transform, opacity;
    transform: translate3d(0, 15px, 0) scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 480px;
}

.modern-settings-card.show {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}

.modern-settings-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.modern-settings-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    opacity: 0.9;
}

.modern-settings-header > * {
    position: relative;
    z-index: 1;
}

.settings-icon-container {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.settings-icon-container svg {
    width: 24px;
    height: 24px;
}

.modern-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.modern-settings-content {
    padding: 20px;
    max-height: 65vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.modern-settings-content::-webkit-scrollbar {
    width: 6px;
}

.modern-settings-content::-webkit-scrollbar-track {
    background: transparent;
}

.modern-settings-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cbd5e0, #a0aec0);
    border-radius: 6px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.modern-settings-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.modern-settings-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
    background: #ffffff;
}

.modern-settings-item:active {
    transform: translateY(0);
}

.settings-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.settings-item-icon svg {
    width: 20px;
    height: 20px;
}

.ai-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.theme-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.about-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.danger-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.settings-item-content {
    flex: 1;
    min-width: 0;
}

.settings-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.settings-item-subtitle {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.settings-item-arrow,
.settings-item-chevron {
    margin-left: 12px;
}

/* Theme Toggle Switch - Compact */
.theme-toggle-switch {
    margin-left: 8px;
}

.toggle-track {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 10px;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .toggle-track {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dark .toggle-thumb {
    transform: translateX(20px);
}

/* Model Options Dropdown - Compact */
.model-options {
    margin-top: 8px;
    padding: 6px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    animation: slideDown 0.3s ease-out;
}

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

.model-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.model-option:hover {
    background: rgba(59, 130, 246, 0.1);
}

.model-radio {
    margin-right: 10px;
    accent-color: #3b82f6;
}

.model-option-content {
    flex: 1;
}

.model-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1px;
}

.model-description {
    font-size: 11px;
    color: #64748b;
}

.model-check {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.model-check svg {
    width: 18px;
    height: 18px;
}

.model-option:has(.model-radio:checked) .model-check {
    opacity: 1;
}

/* Dark Mode Styles for Settings */
.dark .modern-settings-card {
    background: #1a202c;
    border-color: #2d3748;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark .modern-settings-content {
    scrollbar-color: #4a5568 transparent;
}

.dark .settings-section-title {
    color: #a0aec0;
}

.dark .modern-settings-item {
    background: #2d3748;
    border-color: #4a5568;
}

.dark .modern-settings-item:hover {
    background: #374151;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark .settings-item-title {
    color: #f7fafc;
}

.dark .settings-item-subtitle {
    color: #a0aec0;
}

.dark .model-options {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.dark .model-option:hover {
    background: rgba(102, 126, 234, 0.15);
}

.dark .model-name {
    color: #f7fafc;
}

.dark .model-description {
    color: #a0aec0;
}

/* Responsive Design for Settings Modal */
@media (max-width: 640px) {
    .modern-settings-card {
        margin: 12px;
        max-width: calc(100vw - 24px);
    }
    
    .modern-settings-header {
        padding: 14px 16px;
    }
    
    .modern-settings-header h2 {
        font-size: 17px !important;
    }
    
    .modern-settings-header p {
        font-size: 12px !important;
    }
    
    .settings-icon-container {
        width: 32px;
        height: 32px;
    }
    
    .settings-icon-container svg {
        width: 18px;
        height: 18px;
    }
    
    .modern-close-btn {
        width: 28px;
        height: 28px;
    }
    
    .modern-close-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .modern-settings-content {
        padding: 12px;
    }
    
    .settings-item-icon {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
    
    .settings-item-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .settings-item-title {
        font-size: 13px;
    }
    
    .settings-item-subtitle {
        font-size: 10px;
    }
    
    .modern-settings-item {
        padding: 10px;
    }
}

/* Sidebar Mobile Optimization */
@media (max-width: 768px) {
    #sidebar {
        width: 280px;
    }
    
    #sidebar .p-4 {
        padding: 12px !important;
    }
    
    #sidebar h1 {
        font-size: 18px !important;
    }
    
    #sidebar img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .new-chat-button {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
    
    .new-chat-button svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .chat-item {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    .chat-item .font-medium {
        font-size: 13px !important;
    }
    
    .chat-item .text-xs {
        font-size: 11px !important;
    }
    
    .chat-item button {
        padding: 6px !important;
    }
    
    .chat-item button svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    #settingsBtn {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    
    #settingsBtn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    #noChatHistory svg {
        width: 40px !important;
        height: 40px !important;
    }
    
    #noChatHistory p {
        font-size: 12px !important;
    }
}

/* Modern AI Loading Animation like Replit */
.ai-loading {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Dark mode support for ai-loading */
.dark .ai-loading,
[data-theme="dark"] .ai-loading,
body.dark-mode .ai-loading {
    background: #1e293b;
    border: 1px solid #374151;
}

.dark .ai-loading-text,
[data-theme="dark"] .ai-loading-text,
body.dark-mode .ai-loading-text {
    color: #94a3b8;
}

.ai-loading-text {
    color: #64748b;
    font-size: 14px;
    margin-right: 8px;
}

.ai-loading-dots {
    display: flex;
    gap: 2px;
}

.ai-loading-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: replitTyping 1.2s infinite ease-in-out;
}

.ai-loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.ai-loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.ai-loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes replitTyping {
    0%, 60%, 100% {
        transform: translateY(0px);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Old cursor removed - using new implementation below */


/* Removed quick suggestion styles */

/* Enhanced input area styles */
.home-input-area {
    backdrop-filter: blur(20px);
}

/* ChatGPT-style message styling - Clean without bubbles */
.message-bubble {
    margin-bottom: 24px;
    width: 100%;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 17px;
}

.message-content p {
    margin-bottom: 16px;
    text-indent: 0;
}

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

/* User message styling */
.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
    padding: 0 20px;
}

.user-message .message-wrapper {
    max-width: 55%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.user-message .message-content {
    background: #f7f7f8;
    color: #1f2937;
    padding: 8px 12px 6px 12px;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    max-width: 100%;
    word-wrap: break-word;
    border: 1px solid #e5e7eb;
}

/* AI message styling */
.ai-message {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
    padding: 0 20px;
}

.ai-message .message-wrapper {
    max-width: 90%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ai-message .message-content {
    background: transparent;
    color: #374151;
    padding: 0;
    max-width: 100%;
    word-wrap: break-word;
}

/* Avatar styling - HIDDEN */
.avatar {
    display: none;
}

.user-avatar {
    display: none;
}

.ai-avatar {
    display: none;
}

/* Dark mode support */
.dark .user-message .message-content,
[data-theme="dark"] .user-message .message-content,
body.dark-mode .user-message .message-content {
    background: #444654;
    color: white;
    border-color: #565869;
}

.dark .ai-message .message-content,
[data-theme="dark"] .ai-message .message-content,  
body.dark-mode .ai-message .message-content {
    color: #d1d5db;
}

/* Responsive design */
@media (max-width: 768px) {
    .user-message, .ai-message {
        padding: 0 12px;
    }
    
    .user-message .message-wrapper {
        max-width: 75%;
    }
    
    .ai-message .message-wrapper {
        max-width: 95%;
    }
    
    .message-content {
        font-size: 15px;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
    }
}

/* Markdown styling */
.message-content h1, .message-content h2, .message-content h3, 
.message-content h4, .message-content h5, .message-content h6 {
    font-weight: bold;
    margin: 0.5rem 0;
}

.message-content h1 { font-size: 1.5rem; }
.message-content h2 { font-size: 1.3rem; }
.message-content h3 { font-size: 1.1rem; }

.message-content strong, .message-content b {
    font-weight: bold;
}

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

.message-content ul, .message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin: 0.25rem 0;
}

.message-content code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.message-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.message-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 0.5rem 0;
    font-style: italic;
    color: #6b7280;
}

/* Dark mode cho Markdown */
.dark .message-content code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.dark .message-content pre {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .message-content blockquote {
    color: #9ca3af;
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9) rotateX(10deg); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotateX(0deg); 
    }
}

.typing-indicator {
    animation: typingPulse 1.5s infinite;
}

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

/* .message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
} */

.sidebar-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.chat-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    transform-origin: left center;
}

.chat-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.chat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chat-item:hover::before {
    left: 100%;
}

.chat-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.chat-item:hover::after {
    transform: scaleY(1);
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(-90deg);
    }
    70% {
        transform: scale(0.9) rotate(-45deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.float {
    /* Removed annoying float animation */
}

.glow {
    /* Removed annoying glow animation */
}

.pulse-ring {
    /* Removed annoying pulse animation */
}

.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.heartbeat {
    /* Removed annoying heartbeat animation */
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rotate-in {
    animation: rotateIn 0.5s ease-out;
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cbd5e0, #a0aec0);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #a0aec0, #718096);
    transform: scaleX(1.2);
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .text-6xl { font-size: 2.5rem !important; }
    .text-xl { font-size: 1.1rem !important; }
    .w-80 { width: 16rem !important; }
    .p-6 { padding: 1rem !important; }
    .mb-12 { margin-bottom: 1.5rem !important; }
    .mb-8 { margin-bottom: 1rem !important; }
}

.chat-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.input-area {
    margin-bottom: 0;
    padding-bottom: 0;
}

.chat-container > .border-t {
    margin-top: auto;
}

.home-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dark { 
    background-color: #0f0f23 !important; 
    color: #f8fafc !important;
    transition: none !important;
}

/* Dark mode cho tất cả elements - No transitions for instant dark mode */
.dark .bg-white { background-color: transparent !important; }
.dark .bg-gray-50 { background-color: #0f0f23 !important; }
.dark .bg-gray-100 { background-color: #16213e !important; }
.dark .bg-gray-200 { background-color: #1a1a2e !important; }
.dark .text-gray-900 { color: #f8fafc !important; }
.dark .text-gray-700 { color: #e2e8f0 !important; }
.dark .text-gray-600 { color: #cbd5e1 !important; }
.dark .text-gray-500 { color: #94a3b8 !important; }
.dark .text-gray-400 { color: #64748b !important; }
.dark .text-gray-800 { color: #f1f5f9 !important; }
.dark .border-gray-300 { border-color: #334155 !important; }
.dark .border-gray-200 { border-color: #1e293b !important; }

/* ChatGPT-style backgrounds */
#chatScreen { 
    background-color: #ffffff !important; 
}
#messagesContainer { 
    background-color: #ffffff !important; 
}
.chat-container { 
    background-color: #ffffff !important; 
}

/* Dark mode cho chat screen background */
.dark #chatScreen { background-color: #212121 !important; }
.dark #messagesContainer { background-color: #212121 !important; }
.dark .chat-container { background-color: #212121 !important; }

/* Dark mode cho home screen */
.dark .bg-gradient-to-br { 
    background: linear-gradient(to bottom right, #0f172a, #1e293b) !important; 
}

/* Dark mode cho message bubbles */
.dark .ai-bubble {
    background: #2f2f2f !important;
    color: #ffffff !important;
}

/* Dark mode cho chat messages */
.dark .bg-blue-600 { background-color: #2563eb !important; }
.dark .border-gray-200 { border-color: #374151 !important; }

/* Dark mode cho glass effect */
.dark .glass-effect { 
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.9) !important;
}

/* Dark mode cho hover effects */
.dark .hover\:bg-gray-100:hover { background-color: #334155 !important; }
.dark .hover\:bg-gray-50:hover { background-color: #1e293b !important; }
.dark .hover\:text-red-500:hover { color: #ef4444 !important; }
.dark .hover\:text-blue-500:hover { color: #3b82f6 !important; }

/* Dark mode cho input fields */
.dark input[type="text"], .dark textarea {
    background-color: #2f3349 !important;
    border-color: #404356 !important;
    color: #dcddde !important;
}

.dark input[type="text"]:focus, .dark textarea:focus {
    border-color: #5865f2 !important;
    background-color: #363a4f !important;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.4) !important;
}

.dark input[type="text"]::placeholder, .dark textarea::placeholder {
    color: #72767d !important;
}

/* Dark mode for sidebar and chat history - Professional theme */
.dark .sidebar {
    background-color: #2b2d42 !important;
    border-color: #404356 !important;
}

/* Dark mode for chat history items */
.dark .chat-item {
    background-color: #363a4f !important;
    border-color: #404356 !important;
    color: #dcddde !important;
}

.dark .chat-item:hover {
    background-color: #484c64 !important;
}

.dark .chat-item h3, .dark .chat-item .chat-title {
    color: #dcddde !important;
}

.dark .chat-item p, .dark .chat-item .chat-date {
    color: #8e9297 !important;
}

/* Dark mode for sidebar header */
.dark .sidebar h2, .dark .sidebar h3 {
    color: #dcddde !important;
}

/* Dark mode for new chat button */
.dark .new-chat-button {
    background-color: #404356 !important;
    color: #dcddde !important;
    border-color: #484c64 !important;
}

.dark .new-chat-button:hover {
    background-color: #484c64 !important;
}

/* Chat input now uses same styling as home input - no specific rules needed */

/* Dark mode cho chat input container */
.dark .bg-white\/95 {
    background: transparent !important;
    border: none !important;
}

.dark .backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

.dark .border-gray-200\/50 {
    border-color: rgba(55, 65, 81, 0.5) !important;
}

/* Dark mode cho modals */
.dark #settingsContent, .dark #aboutContent, .dark #clearAllContent, .dark #feedbackContent {
    background-color: #1a1a2e !important;
    color: #f1f5f9 !important;
}

/* Dark mode cho dynamic modals */
.dark .bg-white {
    background-color: #1a1a2e !important;
}

.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark .text-gray-600 {
    color: #cbd5e1 !important;
}

/* Dark mode cho message bubbles */
.dark .message-bubble .bg-white {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #374151 !important;
}

/* Nút sidebar toggle mobile và desktop */
#sidebarToggle:hover {
    transform: scale(1.05);
}

#desktopSidebarToggle:hover {
    transform: scale(1.05);
}

/* Nút đóng sidebar */
#closeSidebar:hover {
    transform: scale(1.05);
}

/* Material UI Inspired Styles */

/* Button styles */
.btn-material {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    text-decoration: none;
    user-select: none;
}

.btn-material:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    transform: translateY(-1px);
}

.btn-material:active {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

.btn-secondary {
    background: #f5f5f5;
    color: #424242;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #eeeeee;
    border-color: #bdbdbd;
}

/* Input styles */
.glow-input-container {
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    border-radius: 8px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: text;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.glow-input-container:hover {
    border-color: #bdbdbd;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.glow-input-container:focus-within {
    border-color: #1976d2;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1), 0 2px 8px rgba(0,0,0,0.12);
}

.glow-input {
    background: transparent !important;
    border: none !important;
    color: #212121 !important;
    z-index: 2;
    position: relative;
    width: 100%;
    padding: 10px 50px 10px 14px;
    resize: none;
    outline: none;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
}

.glow-input::placeholder {
    color: #757575 !important;
    opacity: 1;
}

/* Material Dark mode cho input */
.dark .glow-input-container {
    border-color: #424242;
    background-color: #303030;
}

.dark .glow-input-container:hover {
    border-color: #616161;
    background-color: #424242;
}

.dark .glow-input-container:focus-within {
    border-color: #42a5f5;
    background-color: #424242;
    box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.15), 0 2px 8px rgba(0,0,0,0.3);
}

.dark .glow-input {
    color: #ffffff !important;
}

.dark .glow-input::placeholder {
    color: #bdbdbd !important;
}

/* New Chat Button Styles */
.new-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    height: 44px;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    margin-bottom: 16px;
}

.new-chat-button:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.plus-icon {
    width: 18px;
    height: 18px;
    border: 1.2px solid #5f6368;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plus-icon::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 1.2px;
    background-color: #5f6368;
    border-radius: 0.6px;
}

.plus-icon::after {
    content: '';
    position: absolute;
    width: 1.2px;
    height: 8px;
    background-color: #5f6368;
    border-radius: 0.6px;
}

.button-text {
    font-size: 14px;
    color: #3c4043;
    font-weight: 400;
    letter-spacing: 0.01em;
    user-select: none;
}

/* Removed duplicate - using earlier definition with better colors */

.dark .plus-icon {
    border-color: #9ca3af;
}

.dark .plus-icon::before,
.dark .plus-icon::after {
    background-color: #9ca3af;
}

.dark .button-text {
    color: #f3f4f6;
}

/* NexoraX Message Input Styles */
.nexorax-message-input-wrapper {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    position: relative;
}

.nexorax-message-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nexorax-message-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #1f2937;
    padding: 8px 0;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.nexorax-message-input::placeholder {
    color: #9ca3af;
}

.nexorax-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexorax-mic-button {
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nexorax-mic-button:hover {
    background-color: #f3f4f6;
}

.nexorax-mic-button svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.nexorax-send-button {
    width: 36px;
    height: 36px;
    background-color: #a78bfa;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nexorax-send-button:hover {
    background-color: #8b5cf6;
    transform: scale(1.05);
}

.nexorax-send-button svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Dark mode for NexoraX message input - Updated to match new theme */
.dark .nexorax-message-input-wrapper {
    background-color: #2f3349;
    border-color: #404356;
}

.dark .nexorax-message-input-wrapper:focus-within {
    border-color: #5865f2;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.4);
}

.dark .nexorax-message-input {
    color: #dcddde;
}

.dark .nexorax-message-input::placeholder {
    color: #72767d;
}

.dark .nexorax-mic-button:hover {
    background-color: #404356;
}

.dark .nexorax-mic-button svg {
    color: #d1d5db;
}

/* Responsive */
@media (max-width: 640px) {
    .nexorax-message-input {
        font-size: 16px;
    }
}

/* Replit-style Input Components */
.replit-input-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.replit-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.replit-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #1f2937;
    padding: 0;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.replit-input::placeholder {
    color: #9ca3af;
}

.replit-send-btn {
    margin-left: 12px;
    width: 32px;
    height: 32px;
    background-color: #3b82f6;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.replit-send-btn:hover {
    background-color: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(88, 101, 242, 0.3);
}

.replit-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.replit-send-btn svg {
    color: white;
}

/* Dark mode for Replit-style input - Professional dark theme */
.dark .replit-input-container {
    background-color: #2f3349;
    border-color: #404356;
    border-width: 1px;
}

.dark .replit-input-container:focus-within {
    border-color: #5865f2;
    background-color: #363a4f;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.4);
}

.dark .replit-input {
    color: #dcddde;
    background-color: transparent;
}

.dark .replit-input::placeholder {
    color: #72767d;
}

.dark .replit-send-btn {
    background-color: #5865f2;
}

.dark .replit-send-btn:hover {
    background-color: #4752c4;
}

/* Chat input area improvements */
.chat-container .fixed {
    background: transparent;
}

.dark .chat-container .fixed {
    background: transparent;
}

/* Improve messages container for better scrolling */
#messagesContainer {
    padding-bottom: 120px !important; /* Increase bottom padding */
    margin-bottom: 0;
    scroll-behavior: smooth;
}

/* Auto scroll to bottom when new messages appear */
.message-bubble:last-child {
    margin-bottom: 20px;
}

/* ChatGPT-style input container */
.chatgpt-input-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    gap: 8px;
    overflow: hidden;
}

.chatgpt-input-container:focus-within {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.1);
}

/* Attachment buttons */
.attachment-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.attachment-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.attachment-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Input field */
.chatgpt-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #374151;
    padding: 12px 0;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    min-height: 24px;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
}

.chatgpt-input::placeholder {
    color: #9ca3af;
}

/* Send button - New Design */
.chatgpt-send-btn {
    width: 32px;
    height: 32px;
    background-color: #3b82f6;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
    position: relative;
}

.chatgpt-send-btn:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

.chatgpt-send-btn:active {
    transform: scale(0.95);
}

.chatgpt-send-btn:before {
    content: "↑";
    font-size: 16px;
    line-height: 1;
    color: white;
    display: block;
}

/* Dark mode for ChatGPT input */
.dark .chatgpt-input-container,
[data-theme="dark"] .chatgpt-input-container,
body.dark-mode .chatgpt-input-container {
    background-color: #2f2f2f;
    border-color: #4d4d4f;
}

.dark .chatgpt-input-container:focus-within,
[data-theme="dark"] .chatgpt-input-container:focus-within,
body.dark-mode .chatgpt-input-container:focus-within {
    border-color: #565869;
}

.dark .chatgpt-input,
[data-theme="dark"] .chatgpt-input,
body.dark-mode .chatgpt-input {
    color: #ececec;
}

.dark .chatgpt-input::placeholder,
[data-theme="dark"] .chatgpt-input::placeholder,
body.dark-mode .chatgpt-input::placeholder {
    color: #8e8ea0;
}

.dark .attachment-btn,
[data-theme="dark"] .attachment-btn,
body.dark-mode .attachment-btn {
    color: #8e8ea0;
}

.dark .attachment-btn:hover,
[data-theme="dark"] .attachment-btn:hover,
body.dark-mode .attachment-btn:hover {
    background-color: #3f3f46;
    color: #ececec;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chatgpt-input-container {
        max-width: calc(100% - 24px);
        margin: 0 12px;
        padding: 12px 16px;
        min-height: 56px;
        gap: 12px;
    }
    
    .chatgpt-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 0;
        min-height: 20px;
        line-height: 1.4;
        -webkit-appearance: none;
        -webkit-border-radius: 0;
        border-radius: 0;
    }
    
    .attachment-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .chatgpt-send-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .chatgpt-send-btn:before {
        font-size: 18px;
    }
    
    .attachment-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .attachment-buttons {
        flex-shrink: 0;
    }
    
    /* Mobile-specific fixes */
    #messagesContainer {
        padding-bottom: 140px !important;
    }
    
    /* Better mobile input focus */
    .chatgpt-input-container:focus-within {
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
        border-color: #3b82f6;
    }
    
    /* Prevent mobile safari zoom and improve typing */
    .chatgpt-input {
        -webkit-user-select: text;
        -webkit-touch-callout: default;
        user-select: text;
    }
    
    /* Better mobile button interactions */
    .chatgpt-send-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .attachment-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Dark mode for input area background */
.dark .fixed,
[data-theme="dark"] .fixed,
body.dark-mode .fixed {
    background: linear-gradient(180deg, transparent 0%, rgba(17,24,39,0.8) 20%, #111827 100%) !important;
}

/* ========================================= */
/* New Modern Input Container Design */
/* ========================================= */

.new-input-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
}

.new-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Attachment button */
.new-attachment-btn {
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    flex-grow: 0;
    order: 1;
    box-sizing: border-box;
}

.new-attachment-btn:hover {
    background-color: #f3f4f6;
}

.new-attachment-btn svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* Input field */
.new-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #1f2937;
    padding: 10px 12px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    resize: none;
    min-height: 20px;
    order: 2;
    min-width: 0;
    box-sizing: border-box;
    flex-grow: 1;
    flex-shrink: 1;
}

.new-input::placeholder {
    color: #9ca3af;
}

/* Microphone button */
.new-mic-btn {
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    flex-grow: 0;
    order: 2.5;
    box-sizing: border-box;
    position: relative;
}

.new-mic-btn:hover {
    background-color: #f3f4f6;
}

.new-mic-btn.recording {
    background-color: #fef2f2;
    animation: pulse-recording 1.5s infinite;
}

.new-mic-btn.recording .mic-icon {
    display: none;
}

.new-mic-btn.recording .mic-recording-icon {
    display: block !important;
    color: #dc2626;
}

.new-mic-btn svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

@keyframes pulse-recording {
    0%, 100% {
        background-color: #fef2f2;
        transform: scale(1);
    }
    50% {
        background-color: #fee2e2;
        transform: scale(1.05);
    }
}

/* Send button - positioned at right inside input container */
.new-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    flex-grow: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    order: 3;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    margin-left: auto;
}

.new-send-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.new-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.new-send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Dark mode support */
.dark .new-input-container,
[data-theme="dark"] .new-input-container,
body.dark-mode .new-input-container {
    background-color: #374151;
    border-color: #4b5563;
}

.dark .new-input-container:focus-within,
[data-theme="dark"] .new-input-container:focus-within,
body.dark-mode .new-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark .new-input,
[data-theme="dark"] .new-input,
body.dark-mode .new-input {
    color: #f9fafb;
}

.dark .new-input::placeholder,
[data-theme="dark"] .new-input::placeholder,
body.dark-mode .new-input::placeholder {
    color: #9ca3af;
}

.dark .new-attachment-btn:hover,
[data-theme="dark"] .new-attachment-btn:hover,
body.dark-mode .new-attachment-btn:hover {
    background-color: #4b5563;
}

.dark .new-attachment-btn svg,
[data-theme="dark"] .new-attachment-btn svg,
body.dark-mode .new-attachment-btn svg {
    color: #d1d5db;
}

.dark .new-mic-btn:hover,
[data-theme="dark"] .new-mic-btn:hover,
body.dark-mode .new-mic-btn:hover {
    background-color: #4b5563;
}

.dark .new-mic-btn svg,
[data-theme="dark"] .new-mic-btn svg,
body.dark-mode .new-mic-btn svg {
    color: #d1d5db;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .new-input-container {
        border-radius: 12px;
        padding: 4px;
        gap: 4px;
        max-width: calc(100% - 16px);
        margin: 0 8px;
        min-height: 48px;
    }
    
    .new-attachment-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .new-attachment-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .new-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 8px 10px;
        min-height: 16px;
        -webkit-appearance: none;
        -webkit-user-select: text;
        -webkit-touch-callout: default;
        user-select: text;
        flex: 1;
        min-width: 0;
    }
    
    .new-send-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .new-send-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Better mobile focus states */
    .new-input-container:focus-within {
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* ======================== */
/* TYPING EFFECT ANIMATION  */
/* ======================== */

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    background-color: #3b82f6;
    width: 2px;
    height: 1.2em;
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
    opacity: 1;
}

/* Dark mode cursor */
.dark .typing-cursor,
[data-theme="dark"] .typing-cursor,
body.dark-mode .typing-cursor {
    background-color: #60a5fa;
}

/* Cursor blinking animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Typing container */
.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    min-height: 1.2em;
}

/* Enhanced typing effect for titles - JS-controlled only */
.typing-title {
    /* Removed CSS animation - using JS for better control */
}

/* Subtitle typing effect - JS-controlled only */
.typing-subtitle {
    /* Removed CSS animation - using JS for better control */
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* AI response typing effect */
.ai-typing {
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
    padding: 2px 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive typing effects */
@media (max-width: 768px) {
    .typing-title {
        animation-duration: 1.5s;
    }
    
    .typing-subtitle {
        animation-duration: 1.2s;
        animation-delay: 2s;
    }
    
    .typing-cursor {
        width: 1.5px;
        margin-left: 1px;
    }
}

/* Reduced motion accessibility - comprehensive coverage */
@media (prefers-reduced-motion: reduce) {
    .typing-title,
    .typing-subtitle,
    .ai-typing {
        animation: none !important;
        width: auto !important;
        opacity: 1 !important;
    }
    
    .typing-cursor {
        animation: none !important;
        opacity: 0 !important; /* Hide cursor completely for reduced motion users */
    }
    
    /* Disable all typing animations */
    .typing-text {
        animation: none !important;
    }
}

/* ======================== */
/* Replit-style Input Dark Mode Support */
/* ======================== */

/* Dark mode for fieldset and input containers */
.dark fieldset div[class*="bg-white"] {
    background-color: #374151 !important;
    border-color: #4b5563;
}

.dark fieldset input {
    color: #f9fafb !important;
}

.dark fieldset input::placeholder {
    color: #9ca3af !important;
}

.dark fieldset button[class*="border-gray-200"] {
    border-color: #6b7280 !important;
    color: #d1d5db !important;
}

.dark fieldset button[class*="border-gray-200"]:hover {
    background-color: #4b5563 !important;
    border-color: #9ca3af !important;
}