
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
            background: #212121;
            color: #e8eaed;
            min-height: 100vh;
            overflow-x: hidden;
        }
        
        /* Animated background */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.05) 0%, transparent 50%);
            pointer-events: none;
            z-index: -1;
        }
        
        .login-container {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
        }
        
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
        }

        .header-buttons {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .header-logo {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .mobile-logo {
            display: flex;
            align-items: center;
        }
        
        .header-btn {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.1);
            color: #e8eaed;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }
        
        .header-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
        }
        
        .logo-section {
            text-align: center;
            margin-bottom: 40px;
            animation: slideUp 0.8s ease-out;
        }
        
        .logo {
            font-size: 4rem;
            font-weight: 300;
            color: #e8eaed;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }
        
        .logo-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            font-weight: bold;
        }
        
        .subtitle {
            color: #9aa0a6;
            font-size: 1.1rem;
            max-width: 600px;
            line-height: 1.5;
            margin: 0 auto;
        }
        
        .main-input {
            width: 100%;
            max-width: 800px;
            margin: 40px auto;
            position: relative;
            animation: slideUp 0.8s ease-out 0.2s both;
        }
        
        .input-container {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 25px;
            padding: 20px 25px;
            backdrop-filter: blur(20px);
            transition: all 0.3s ease;
            position: relative;
        }
        
        .input-container:hover {
            border-color: rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.08);
        }
        
        .input-container:focus-within {
            border-color: #667eea;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
        
        .main-input input {
            width: 100%;
            background: none;
            border: none;
            color: #e8eaed;
            font-size: 16px;
            outline: none;
            padding-right: 100px;
        }
        
        .main-input input::placeholder {
            color: #9aa0a6;
        }
        
        .input-actions {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .action-btn {
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            color: #e8eaed;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .action-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.2);
        }

        /* Pill select to replace Auto button */
        .action-select {
            padding: 8px 10px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            color: #e8eaed;
            font-size: 13px;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            backdrop-filter: blur(10px);
        }
        .action-select:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.2);
        }
        
        .voice-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .voice-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: scale(1.05);
        }
        
        .auth-section {
            animation: slideUp 0.8s ease-out 0.4s both;
            margin-top: 30px;
        }
        
        .auth-card {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 30px;
            backdrop-filter: blur(20px);
            max-width: 3700px;
            margin: 0 auto;
            text-align: center;
        }
        
        .auth-card h3 {
            color: #e8eaed;
            margin-bottom: 10px;
            font-size: 1.3rem;
            font-weight: 500;
        }
        
        .auth-card p {
            color: #9aa0a6;
            margin-bottom: 25px;
            line-height: 1.4;
        }
        
        .auth-buttons {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
        }
        
        .btn-primary {
            flex: 1;
            padding: 12px 20px;
            background: #e8eaed;
            color: #212121;
            border: none;
            border-radius: 20px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-primary:hover {
            background: #f1f3f4;
            transform: translateY(-1px);
        }
        
        .btn-secondary {
            flex: 1;
            padding: 12px 20px;
            background: transparent;
            color: #e8eaed;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.3);
        }
        
        .skip-link {
            color: #667eea;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }
        
        .skip-link:hover {
            color: #764ba2;
        }

        /* Form styles */
        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .auth-form input,
        .auth-form select {
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            color: #e8eaed;
            font-size: 14px;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .auth-form input:focus,
        .auth-form select:focus {
            outline: none;
            border-color: #667eea;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }

        .auth-form input::placeholder {
            color: #9aa0a6;
        }

        .auth-form select {
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            padding-right: 40px;
        }

        .auth-form select option {
            background: #1a1a1a;
            color: #e8eaed;
            padding: 8px;
        }
        
        .chat-interface {
            display: none;
            height: 100vh;
            background: #212121;
        }

        /* Grok-like glow theme for agents page when chatting */
        .grok-active .chat-container::before {
            content: '';
            position: absolute;
            inset: -20% -10% -20% -10%;
            background: radial-gradient(1200px 600px at 10% 90%, rgba(120,119,198,0.18), transparent 60%),
                        radial-gradient(900px 500px at 90% 10%, rgba(255,119,198,0.14), transparent 60%),
                        radial-gradient(700px 400px at 50% 40%, rgba(102,126,234,0.12), transparent 60%);
            filter: blur(40px);
            pointer-events: none;
            z-index: 0;
            animation: floatGlow 12s ease-in-out infinite alternate;
        }
        .grok-active .chat-header,
        .grok-active .chat-input-container {
            background: rgba(26, 26, 26, 0.75);
            border-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 10px 30px rgba(102,126,234,0.15);
        }
        .grok-active .message.agent .message-content {
            background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.06));
            border: 1px solid rgba(255, 255, 255, 0.12);
        }
        .grok-active .message.user .message-content {
            background: linear-gradient(135deg, #6a7ae6, #8a5acb);
        }
        @keyframes floatGlow {
            from { transform: translateY(-10px); }
            to { transform: translateY(10px); }
        }
        
        .chat-container {
            display: flex;
            height: 100vh;
            position: relative;
            padding-bottom: 60px; /* Espacio para el footer fijo */
            transition: padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Sin padding cuando el footer está oculto */
        .chat-container.no-footer {
            padding-bottom: 0;
        }
        
        .mobile-header {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(33, 33, 33, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 15px 20px;
            z-index: 1000;
            align-items: center;
            gap: 15px;
        }
        
        .hamburger {
            width: 24px;
            height: 24px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .hamburger span {
            width: 100%;
            height: 2px;
            background: #e8eaed;
            border-radius: 1px;
            transition: all 0.3s ease;
        }
        
        .sidebar {
            width: 260px;
            background: #171717;
            border-right: 1px solid #2a2a2a;
            display: flex;
            flex-direction: column;
            transition: all 0.3s ease;
            position: relative;
        }
        
        .sidebar-header {
            padding: 16px 20px;
            border-bottom: 1px solid #2a2a2a;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .sidebar-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #ffffff;
            font-size: 18px;
            font-weight: 600;
            text-decoration: none;
        }

        .sidebar-logo img {
            width: 32px;
            height: 32px;
            border-radius: 6px;
        }
        
        .new-chat-btn {
            width: 100%;
            padding: 12px 16px;
            background: #2a2a2a;
            color: #ffffff;
            border: 1px solid #3a3a3a;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            margin-bottom: 16px;
        }

        .new-chat-btn:hover {
            background: #3a3a3a;
            border-color: #4a4a4a;
        }
        
        .conversations {
            flex: 1;
            padding: 10px;
            overflow-y: auto;
        }
        
        .conversation-item {
            padding: 12px 16px;
            margin-bottom: 4px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            color: #a0a0a0;
            position: relative;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .conversation-item:hover {
            background: #2a2a2a;
            color: #ffffff;
        }
        
        .conversation-item.active {
            background: #3a3a3a;
            color: #ffffff;
            font-weight: 500;
        }
        
        .main-chat {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #0f0f0f;
            position: relative;
        }
        
        .chat-header {
            padding: 16px 24px;
            border-bottom: 1px solid #2a2a2a;
            background: #0f0f0f;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .chat-title {
            font-size: 1.5rem;
            color: #e8eaed;
            font-weight: 500;
        }
        
        .tech-badge {
            background: #2a2a2a;
            color: #a0a0a0;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            border: 1px solid #3a3a3a;
        }
        
        .agent-selection {
            padding: 40px 30px;
            text-align: center;
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow-y: auto;
        }
        
        .agent-selection h2 {
            color: #e8eaed;
            margin-bottom: 10px;
            font-size: 2rem;
            font-weight: 400;
        }
        
        .agent-selection p {
            color: #9aa0a6;
            margin-bottom: 40px;
            font-size: 1.1rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.5;
        }
        
        .agents-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .agent-btn {
            padding: 30px 25px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.4s ease;
            text-align: center;
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(10px);
        }
        
        .agent-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
            transition: left 0.6s ease;
        }
        
        .agent-btn:hover::before {
            left: 100%;
        }
        
        .agent-btn:hover {
            border-color: #667eea;
            transform: translateY(-8px);
            background: rgba(102, 126, 234, 0.1);
            box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
        }
        
        .agent-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 15px;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            font-weight: 600;
            transition: transform 0.3s ease;
        }
        
        .agent-btn:hover .agent-icon {
            transform: scale(1.1);
        }
        
        .agent-name {
            font-size: 1.2rem;
            font-weight: 600;
            color: #e8eaed;
            margin-bottom: 8px;
        }
        
        .agent-desc {
            font-size: 0.9rem;
            color: #9aa0a6;
            line-height: 1.4;
        }
        
        .file-upload {
            margin-top: 30px;
            padding: 25px;
            border: 2px dashed rgba(255, 255, 255, 0.2);
            border-radius: 16px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
            backdrop-filter: blur(10px);
            max-width: 500px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .file-upload:hover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }
        
        .file-upload input {
            display: none;
        }
        
        .file-upload-icon {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: #9aa0a6;
        }
        
        .file-upload-text {
            color: #9aa0a6;
            line-height: 1.4;
        }
        
        .chat-messages {
            flex: 1;
            padding: 16px 24px;
            overflow-y: auto;
            background: #0f0f0f;
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
        }
        
        .message {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            animation: messageSlide 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            width: 100%;
            clear: both;
            opacity: 0;
            transform: translateY(20px);
            animation-fill-mode: forwards;
        }
        
        .message.user {
            flex-direction: row-reverse;
            justify-content: flex-start;
        }
        
        .message.agent {
            justify-content: flex-start;
        }
        
        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            color: white;
            font-size: 13px;
            flex-shrink: 0;
            margin-top: 2px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .message-avatar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, 
                rgba(255, 255, 255, 0.1) 0%, 
                transparent 50%, 
                rgba(255, 255, 255, 0.1) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .message:hover .message-avatar::before {
            opacity: 1;
        }
        
        .message.user .message-avatar {
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        
        .message.agent .message-avatar {
            background: linear-gradient(135deg, #4caf50, #388e3c);
        }
        
        .message-content {
            max-width: 70%;
            padding: 16px 20px;
            border-radius: 18px;
            line-height: 1.5;
            word-wrap: break-word;
            word-break: break-word;
            position: relative;
        }
        
        .message.user .message-content {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border-bottom-right-radius: 4px;
            margin-left: auto;
        }
        
        .message.agent .message-content {
            background: rgba(255, 255, 255, 0.08);
            color: #e8eaed;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-bottom-left-radius: 4px;
            margin-right: auto;
            padding: 20px 24px;
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        /* Estilos específicos para Markdown en mensajes del agente */
        .message.agent .message-content h1,
        .message.agent .message-content h2,
        .message.agent .message-content h3,
        .message.agent .message-content h4,
        .message.agent .message-content h5,
        .message.agent .message-content h6 {
            color: #ffffff;
            font-weight: 600;
            margin-top: 1.5em;
            margin-bottom: 0.8em;
            line-height: 1.3;
        }

        .message.agent .message-content h1 {
            font-size: 1.5em;
            border-bottom: 2px solid rgba(255, 255, 255, 0.2);
            padding-bottom: 0.5em;
        }

        .message.agent .message-content h2 {
            font-size: 1.3em;
            color: #e3f2fd;
        }

        .message.agent .message-content h3 {
            font-size: 1.2em;
            color: #bbdefb;
        }

        .message.agent .message-content h4 {
            font-size: 1.1em;
            color: #90caf9;
        }

        .message.agent .message-content p {
            margin-bottom: 1em;
            line-height: 1.6;
            color: #e8eaed;
        }

        .message.agent .message-content ul,
        .message.agent .message-content ol {
            margin-left: 1.5em;
            margin-bottom: 1em;
            padding-left: 0;
        }

        .message.agent .message-content li {
            margin-bottom: 0.5em;
            line-height: 1.5;
        }

        .message.agent .message-content ul li {
            list-style-type: disc;
        }

        .message.agent .message-content ol li {
            list-style-type: decimal;
        }

        /* Estilos para bloques de código */
        .message.agent .message-content pre {
            background: #1e1e1e;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 16px;
            margin: 1em 0;
            overflow-x: auto;
            font-family: 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.4;
            color: #d4d4d4;
            position: relative;
        }

        .message.agent .message-content pre code {
            background: none;
            padding: 0;
            border-radius: 0;
            color: inherit;
            font-size: inherit;
        }

        /* Estilos para código inline */
        .message.agent .message-content code {
            background: rgba(255, 255, 255, 0.1);
            color: #ffd700;
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9em;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* Estilos para enlaces */
        .message.agent .message-content a {
            color: #64b5f6;
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: all 0.3s ease;
        }

        .message.agent .message-content a:hover {
            color: #90caf9;
            border-bottom-color: #90caf9;
        }

        /* Estilos para citas */
        .message.agent .message-content blockquote {
            border-left: 4px solid #667eea;
            padding-left: 16px;
            margin: 1em 0;
            color: #b0bec5;
            font-style: italic;
            background: rgba(102, 126, 234, 0.05);
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
        }

        /* Estilos para tablas */
        .message.agent .message-content table {
            border-collapse: collapse;
            width: 100%;
            margin: 1em 0;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            overflow: hidden;
        }

        .message.agent .message-content th,
        .message.agent .message-content td {
            padding: 12px 16px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .message.agent .message-content th {
            background: rgba(102, 126, 234, 0.1);
            font-weight: 600;
            color: #e3f2fd;
        }

        /* Estilos para texto fuerte y énfasis */
        .message.agent .message-content strong {
            color: #ffffff;
            font-weight: 600;
        }

        .message.agent .message-content em {
            color: #bbdefb;
            font-style: italic;
        }

        /* Estilos para listas de tareas */
        .message.agent .message-content input[type="checkbox"] {
            margin-right: 8px;
            accent-color: #667eea;
        }

        /* Mejorar el espaciado general del contenido markdown */
        .message.agent .message-content > *:first-child {
            margin-top: 0;
        }

        .message.agent .message-content > *:last-child {
            margin-bottom: 0;
        }

        /* Estilos para elementos de código con colores específicos */
        .message.agent .message-content pre.hljs,
        .message.agent .message-content pre code.hljs {
            background: #1e1e1e !important;
        }

        /* Mejorar la tipografía general del contenido markdown */
        .message.agent .message-content {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
            font-size: 15px;
            line-height: 1.6;
        }

        /* Estilos para separadores horizontales */
        .message.agent .message-content hr {
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            margin: 2em 0;
        }

        /* Estilos para texto con formato especial */
        .message.agent .message-content mark {
            background: rgba(255, 235, 59, 0.3);
            color: #fff;
            padding: 2px 4px;
            border-radius: 3px;
        }

        /* Estilos para texto pequeño */
        .message.agent .message-content small {
            font-size: 0.85em;
            color: #b0bec5;
        }

        /* Estilos para texto con subrayado */
        .message.agent .message-content u {
            text-decoration: underline;
            text-decoration-color: #667eea;
            text-decoration-thickness: 2px;
        }
        
        .chat-input-container {
            padding: 16px 24px;
            border-top: 1px solid #2a2a2a;
            background: #0f0f0f;
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
        }
        
        .chat-input {
            display: flex;
            gap: 15px;
            align-items: flex-end;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        .chat-input-wrapper {
            flex: 1;
            position: relative;
        }
        
        .chat-input input {
            width: 100%;
            padding: 12px 80px 12px 16px;
            background: #2a2a2a;
            border: 1px solid #3a3a3a;
            border-radius: 12px;
            color: #ffffff;
            font-size: 14px;
            transition: all 0.2s ease;
            box-sizing: border-box;
        }
        
        .chat-input input:focus {
            outline: none;
            border-color: #667eea;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
        
        .chat-input input::placeholder {
            color: #9aa0a6;
        }
        
        .attach-btn {
            position: absolute;
            right: 40px;
            top: 50%;
            transform: translateY(-50%);
            width: 28px;
            height: 28px;
            background: #3a3a3a;
            color: #ffffff;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            z-index: 10;
        }

        .attach-btn:hover {
            background: #4a4a4a;
            transform: translateY(-50%) scale(1.05);
        }
        
        .send-btn {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 28px;
            height: 28px;
            background: #4a4a4a;
            color: #ffffff;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            z-index: 10;
        }
        
        .send-btn:hover {
            transform: translateY(-50%) scale(1.05);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        .send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: translateY(-50%) scale(1);
        }
        
        .footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(135deg, 
                rgba(26, 26, 26, 0.95) 0%, 
                rgba(30, 30, 30, 0.9) 100%);
            backdrop-filter: blur(20px);
            border-top: 1px solid transparent;
            padding: 16px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            z-index: 1000;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateY(0);
            opacity: 1;
        }

        /* Footer oculto cuando hay agente activo */
        .footer.hidden {
            transform: translateY(100%);
            opacity: 0;
            pointer-events: none;
        }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 32px;
            right: 32px;
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(102, 126, 234, 0.3) 20%, 
                rgba(102, 126, 234, 0.1) 50%, 
                rgba(102, 126, 234, 0.3) 80%, 
                transparent 100%);
        }

        /* Asegurar que el contenido principal tenga espacio para el footer */
        
        .social-links {
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .social-link {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.1) 0%, 
                rgba(255, 255, 255, 0.05) 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #9aa0a6;
            text-decoration: none;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 14px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            position: relative;
            overflow: hidden;
        }

        .social-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.2) 0%, 
                rgba(118, 75, 162, 0.2) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 50%;
        }
        
        .social-link:hover::before {
            opacity: 1;
        }
        
        .social-link:hover {
            background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.2) 0%, 
                rgba(118, 75, 162, 0.2) 100%);
            color: #667eea;
            transform: translateY(-2px) scale(1.1);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
            border-color: rgba(102, 126, 234, 0.3);
        }

        .social-link i {
            transition: transform 0.3s ease;
        }

        .social-link:hover i {
            transform: scale(1.2);
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes messageSlide {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Responsive Design */
        @media (max-width: 768px) {
            .login-container {
                padding: 15px;
            }
            
            .header {
                padding: 15px 20px;
            }
            
            .logo {
                font-size: 2.5rem;
            }
            
            .main-input {
                margin: 30px auto;
            }
            
            .input-container {
                padding: 15px 20px;
            }
            
            .input-actions {
                position: static;
                margin-top: 15px;
                transform: none;
                justify-content: center;
            }
            
            .main-input input {
                padding-right: 0;
                margin-bottom: 15px;
            }
            
            .auth-card {
                padding: 25px 20px;
            }
            
            .auth-buttons {
                flex-direction: column;
            }
            
            .mobile-header {
                display: flex;
            }
            
            .sidebar {
                position: fixed;
                left: 0;
                top: 0;
                height: 100vh;
                z-index: 999;
                transform: translateX(-100%);
            }
            
            .sidebar.open {
                transform: translateX(0);
            }
            
            .main-chat {
                width: 100%;
                padding-top: 0;
            }
            
            .chat-header {
                display: none !important;
            }
            
            .agent-selection {
                padding: 30px 20px;
                padding-top: 100px;
            }
            
            .agents-grid {
                grid-template-columns: 1fr !important;
                gap: 15px;
                max-width: 100%;
                margin: 0 auto 30px auto;
            }
            
            .agent-btn {
                padding: 25px 20px;
            }
            
            .chat-messages {
                padding: 15px 20px;
                padding-top: 80px;
                padding-bottom: 80px;
                gap: 12px;
            }
            
            .message-content {
                max-width: 80%;
                padding: 12px 16px;
                font-size: 15px;
            }

            /* Estilos markdown responsivos para móviles */
            .message.agent .message-content h1 {
                font-size: 1.3em;
            }

            .message.agent .message-content h2 {
                font-size: 1.2em;
            }

            .message.agent .message-content h3 {
                font-size: 1.1em;
            }

            .message.agent .message-content pre {
                padding: 12px;
                font-size: 13px;
                margin: 0.8em 0;
            }

            .message.agent .message-content code {
                font-size: 0.85em;
                padding: 1px 4px;
            }

            .message.agent .message-content ul,
            .message.agent .message-content ol {
                margin-left: 1.2em;
            }
            
            .message-avatar {
                width: 32px;
                height: 32px;
                font-size: 12px;
            }
            
            .chat-input-container {
                padding: 15px 20px;
                padding-bottom: 75px;
            }
            
            .chat-input input {
                padding: 12px 70px 12px 16px;
                font-size: 16px; /* Evitar zoom en iOS */
            }
            
            .attach-btn {
                width: 32px;
                height: 32px;
                right: 44px;
                font-size: 14px;
            }
            
            .send-btn {
                width: 32px;
                height: 32px;
                right: 8px;
                font-size: 14px;
            }
            
            .footer {
                flex-direction: column;
                gap: 10px;
                text-align: center;
                padding: 12px 20px;
            }
            
            .social-links {
                gap: 12px;
            }
        }
        
        @media (max-width: 480px) {
            .logo {
                font-size: 2rem;
                flex-direction: column;
                gap: 10px;
            }
            
            .subtitle {
                font-size: 1rem;
            }
            
            .agent-selection h2 {
                font-size: 1.5rem;
            }
            
            .message-content {
                max-width: 85%;
                padding: 10px 12px;
                font-size: 14px;
            }
            
            .message-avatar {
                width: 30px;
                height: 30px;
                font-size: 11px;
            }
        }
        
        /* Dark scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* Eliminar padding del body y html */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* Chat container ocupa toda la pantalla */
.chat-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    padding-bottom: 0;
}

/* Sidebar ocupa altura completa */
.sidebar {
    width: 260px;
    height: 100vh;
    background: #171717;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

/* Main chat ocupa el espacio restante */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    margin-left: 260px; /* Para no solaparse con el sidebar */
    height: 100vh;
    width: calc(100vw - 260px);
}

/* Ajustar header del chat */
.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a2a;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Ajustar área de mensajes para ocupar espacio disponible */
.chat-messages {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    margin: 0;
}

/* Ajustar selección de agentes */
.agent-selection {
    flex: 1;
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

/* Ajustar input para que quede pegado al fondo */

/* Ocultar header móvil por defecto */
.mobile-header {
    display: none;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-chat {
        margin-left: 0;
        width: 100vw;
    }
    
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
    }
    
    .chat-messages {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    .chat-input-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #0f0f0f;
        z-index: 1000;
    }
}

/* Ajustar grid de agentes para pantallas grandes */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Eliminar márgenes innecesarios */
.agent-selection h2 {
    margin-top: 0;
}

/* Ajustar conversaciones para ocupar altura completa */
.conversations {
    flex: 1;
    overflow-y: auto;
}